T
Thomas183
Hi,
I have a unmanaged c++ dll, and want to call a function
"dlltest(mystruct a)"of it.
The Parameter mystruct is a struct which consists of a array of
strings:
struct mystruct
{
char * myArray[100];
}
I searched the net for on hole day, to find a way to marshal this.
I have tried the following in C#:
[ StructLayout (LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public struct x_struct
{
[MarshalAs(UnmanagedType.LPArray, SizeConst=2)]
public [] string d;
};
[DllImport ("MyFile.dll", callingConvention.StdCall)]]
public static extern string dlltest(x_struct X);
The dll is in the system32 dir and functions with other structs (only
int) worked fine.
But with this one i get a EntryPointNotFound exception.
Thanks for your help
Thomas
mailto: (e-mail address removed)
I have a unmanaged c++ dll, and want to call a function
"dlltest(mystruct a)"of it.
The Parameter mystruct is a struct which consists of a array of
strings:
struct mystruct
{
char * myArray[100];
}
I searched the net for on hole day, to find a way to marshal this.
I have tried the following in C#:
[ StructLayout (LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public struct x_struct
{
[MarshalAs(UnmanagedType.LPArray, SizeConst=2)]
public [] string d;
};
[DllImport ("MyFile.dll", callingConvention.StdCall)]]
public static extern string dlltest(x_struct X);
The dll is in the system32 dir and functions with other structs (only
int) worked fine.
But with this one i get a EntryPointNotFound exception.
Thanks for your help
Thomas
mailto: (e-mail address removed)