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
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

uzir39 reputationPosted Jan 10, 2004, 2:59 AM EST
sacrespRank #1,944 · 754 reputationPosted Feb 27, 2004, 9:52 PM EST
Andy_push4 reputationPosted Apr 28, 2004, 5:16 PM EDT