HMODULE h = LoadLibrary("mydll.dll");
if(!h)
{
MessageBox(0, "Could not load the dll", "Error", MB_ICONERROR);
ExitProcess(0);
}
FARPROC p = GetProcAddress(h, "Initialize");
if(!p)
{
MessageBox(0, "Could not load the function", "Error", MB_ICONERROR);
ExitProcess(0);
}
__asm call p
ExitThread(0);