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];
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top