How to change parameter in C#.
Hi everone.
I have a Dll this is code by C++. And have function pointer after.
void GetFileList(char[] lpsz, FileInfo[] fileInfo, long* count);
with: FileInfo is struct{
char szname[256];
char pathname[256];
}FileInfo;
I use DllImport in C# to import mydll
My code:
" [DllImport( "MyDll")]
unsafe public static extern void GetFileList(string lpsz, FileInfo [] fileInfo, long* count);
with define FileInfo in C# is struct:
public struct{
string szname;
string pathname;
}
I call GetFileList("e:\\dll.zip", fileInfo, &count) ;
But I can not receive fileInfo.
fileInfo.szname = null;
with count is True.
please tell me as soon as possible .
how to define fileInfo in C# to receive.
thank for any help.
Report this post to a moderator | IP: Logged
12-30-2003 08:01 AM