Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing an array of strings

Status
Not open for further replies.

kliz0328

Programmer
Nov 7, 2005
138
US
We have a C# wrapper and are currently passing values as sbyte[], I was wondering how to pass strings instead of bytes? Below is some sample code that outlined hot to pass sbyte[], is there anyway to pass it as string?
Code:
[MarshalAs(UnmanagedType.ByValArray, SizeConst=7*80)]
		public sbyte[] AHScheduleType;
		[MarshalAs(UnmanagedType.ByValArray, SizeConst=7*80)]
		public sbyte[] InsPlanType;
		[MarshalAs(UnmanagedType.ByValArray, SizeConst=4*80)]
		public sbyte[] InsType;
		[MarshalAs(UnmanagedType.ByValArray, SizeConst=24*80)]
		public sbyte[] AvailablePaymentFrequencyName;
		[MarshalAs(UnmanagedType.ByValArray, SizeConst=24*80)]
		public sbyte[] AvailablePaymentFrequencyCode;
		[MarshalAs(UnmanagedType.ByValArray, SizeConst=24*80)]
		public sbyte[] AvailableLoanTypeName;
		[MarshalAs(UnmanagedType.ByValArray, SizeConst=24*80)]
		public sbyte[] AvailableLoanTypeCode;
		[MarshalAs(UnmanagedType.ByValArray, SizeConst=10*5*80)]
		public sbyte[] AvailableSolveType;
		[MarshalAs(UnmanagedType.ByValArray, SizeConst=10*5*80)]
		public sbyte[] AvailableSolveCode;
		[MarshalAs(UnmanagedType.ByValArray, SizeConst=24*80)]
		public sbyte[] DPName;
		[MarshalAs(UnmanagedType.ByValArray, SizeConst=24*80)]
		public sbyte[] DPDescription;
		[MarshalAs(UnmanagedType.ByValArray, SizeConst=24*80)]
		public sbyte[] DPCode;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top