Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. C++ dll in C#

C++ dll in C#

Scheduled Pinned Locked Moved C#
helpcsharpc++
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vijaywithu
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups