I have a function in C ++ void someFunc(char* arg1, int* arg2)that I want to marshal parameters since I use this function in C # (after importing the DLL).
Can you tell me how I should understand, since I am confused here.
[DllImport(Dllname)]
extern void someFunc([MarshallAsAttribute(UnmanagedType,LPStr)] string arg1, IntPtr arg2);
Should I use IntPtr here? I can not pass the address of any int variable from C # so that it falls into a pointer to C ++?
source
share