C++ dll in C#
-
hi I am using one C++ dll in my C# compact frame work application C# private void button1_Click(object sender, EventArgs e) { try { Message("vijay"); //OpenDatabase(hDB, guid); } catch (DllNotFoundException de) { MessageBox.Show(de.Message, "Dll not found"); } catch (EntryPointNotFoundException ent) { MessageBox.Show(ent.Message, "Entry point ex"); } catch (MissingMethodException me) { MessageBox.Show(me.Message, CallingConvention.Winapi.ToString()); } } ____________________ C++ dll: #include "windbase.h" #include <string.h> CEOID CeOid = 0; CEGUID guid; BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { return TRUE; } extern "C" __declspec(dllexport) void __stdcall Message(TCHAR* p_szMessage) { MessageBox(NULL, p_szMessage, _T("Message from DLL"), MB_OK); } _________ This is my code but it is showing that message missing exception. Can Any one help me in figuring out the error area. Thanks in Advance