How to get normal DLL method name

Stanislav Blinov stanislav.blinov at gmail.com
Sat Feb 15 16:53:00 PST 2014


On Sunday, 16 February 2014 at 00:46:13 UTC, Denis Mezhov wrote:
> Sorry
>
> // Not work
> FARPROC fp = GetProcAddress(h, "dllprint");
> if fp is null)
> {
>     printf("error loading symbol()\n");
> }
>
> // It work
> FARPROC fp = GetProcAddress(h, "D7dllmain8dllprintFZv");
>
> if fp is null)
> {
>     printf("error loading symbol()\n");
> }

How about this:

// in dll:

extern(C) void dllprint() { /* ... */ }

// in main:

auto fp = GetProcAddress(h, "dllprint");

?


More information about the Digitalmars-d-learn mailing list