I did not find anything useful related to this problem after seriously hiding google, so I will ask for it here.
I have a program created in C # that inserts a DLL into another process, quite trivial. It calls CreateRemoteThread and LoadLibrary from kernel32.dll using [DllImport].
My DLL will load once and then wait for authentication from a C # program, due to security reasons I cannot transfer this data using sockets. Therefore, I have a DLL export that I plan to call from a C # program with authentication data.
The exported function takes two arguments:
extern "C" __declspec(dllexport) void DoStuff( const char* ccString1, const char* ccString2 ){
Since the DLL is not in the same address space as the C # program, I cannot use [DllImport] to get and call the exported function.
My second idea was to use CreateRemoteThread to call the function, although this can only be passed to one argument, while I need two, it will also be difficult, because I will need to call GetProcAddress, I canโt just call the exported function directly.
So how could I achieve this?
thanks
source share