Question

Hi I've created a C++ DLL which I import to C# application to re-use a function. the function code in C++ is static bool IsSomethingAttached(char *Arg1[])

When I use DllImport as below in C# program, [DllImport("DllName")] I get the error as EntryPointNotFound exception.

I used

**DumpBin /symbols Dllname.dll** for getting the mangled name.

1) But I do not know how to exactly get the mangled name. Few posts say we should use /exports but /exports instead of /symbols just give the summary and I do not get mangled name. Pl help

2) How to use undname.exe to get the decorated name from undecorated name?

Was it helpful?

Solution

Use,

/ALL Displays all available information except code disassembly. Use the /DISASM option to display disassembly. You can use /RAWDATA:NONE with the /ALL option to omit the raw binary details of the file. Because the /ALL option is simply a combination of all the other options, an example is not needed.

you can use exports and .def file in C++ to get undecorated name in c#. here no need of the dumpBin

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top