I have a C dll that exports a function that looks like this:
void GetSectionData(TCHAR name [], char **Address, DWORD * Size)
The function gets a name and returns the Address after it was allocated with *Size bytes. Here is an example of how to use the function in C:
char *addr[64]:
DWORD Size[64];
TCHAR name[260];
sprintf( name, "myDll.dll);
GetSectionAddress(name, &addr[index],&Size[index]);
I want to use this dll function in C# without unsafe.
My function Declaration should use the DllImport attribute but I dont know how to declare the parameters, mainly the Address and Size parameters (I assume that name can be declared as StringBuilder):
[DllImport("myDll.dll")]
public static extern void GetSectionData(?)