Possible Duplicate:
Have to use C# dll to call C++ dll?
This is my first program related to importing external dll to my C# code. I created a DLl (Win 32 Dynamic Link Library) from visual C++ code. Let me paste the content of .cpp and .h file:
#include...
#
using namespace std;
BOOL APIENTRY DllMain( HANDLE hModule,DWORD ul_reason_for_call, LPVOID lpReserved)
{
return TRUE;
}
unsigned char* decrypt(string stringKSN, string key){ #### some code
convert(key_new);
return key_new
}
void convert(char * a) { ## return "some_value"
}
I build the visual c++ project and it created a finalDLL.dll.Now i want to use this dll into my c# code. I searched it on google and found that we can import the dll in c# project with the help of p/invoke exports. But when i compare the sample code with the above one it was totally different.
I am not able to test whether finalDLL.dll is corrected or corrupted?
Please help me to complete my import task.