2
Answers

How to change parameter in c#.

tamnt7152004

tamnt7152004

20y
2.5k
1
Hi everone. I have a Dll which is code by C++. And have function pointer after. with : 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 This dll : 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 receive fileInfo. thank you.

Answers (2)