none
How to convert unsigned short pointer and byte pointer to C# dllImport? RRS feed

  • Question

  • The following is the C++ implementation to do dllImport.

     

    extern "C" __declspec(dllimport)long GetVersion(unsigned short *);
    extern "C" __declspec(dllimport)long ReadStatusMsg(BYTE * );

     

    Since it involves pointers, how to convert or marshal unsigned short * and BYTE * to C# dllimport?

     

    Your help is greatly appreciated.

     

    Thanks.

    Wednesday, April 2, 2008 12:39 PM

Answers

  • This depends on how exactly is the memory area pointed by the pointer like and used inside the C++ function. Could you please clarify?
    Friday, April 4, 2008 2:04 AM

All replies