ptrUser_hInstance = GetModuleHandle(TEXT("engine.dll")); //Pointer if (ptrUser_hInstance) { FARPROC UsernameProcID = GetProcAddress (ptrUser_hInstance, "?GetUserAccount@UNetworkHandler@@UAEPAGXZ" ); pICFUNC GetUsername; GetUsername = pICFUNC(UsernameProcID); /* The actual call to the function contained in the dll */ Name = GetUsername(); //returns username MessageBox(NULL, (LPCWSTR)Name, (LPCWSTR)L"Username: ", MB_ICONINFORMATION | MB_OK); /* Release the Dll */ FreeLibrary(ptrUser_hInstance); }