how to convert such struct of C++ to csharp codes?

  • Thread starter Thread starter ari
  • Start date Start date
A

ari

hi all,
How to translate such struct to csharp codes?

typedef struct{
char *FileName[200];
HANDLE gHandle[200];
char cbDir[LEN_FILEPATH];
WORD wAddress[MAX_CARD_NO];
DWORD* FileCount;
int FileFlag[200];
}TPD_PIF;

regards,
Ari
 
class TPD_PIF
{
string fileName;
IntPtr []gHandle = new IntPtr[200];
string cbDir;
short []wAddress = new short[MAX_CARD_NO];
IntPtr fileCount; //Instead, you can use an int and pass it by ref.
int [] fileFlag = new int[200];
 
Back
Top