Andrew Eikum aeikum@codeweavers.com writes:
@@ -72,11 +73,19 @@ static BOOL load_driver(const WCHAR *name) }
#define LDFC(n) do { drvs.p##n = (void*)GetProcAddress(drvs.module, #n);\
if(!drvs.p##n) return FALSE; } while(0);
if(!drvs.p##n) { FreeLibrary(drvs.module); return FALSE; } } while(0);
- LDFC(InitializeDriver); LDFC(GetEndpointIDs); LDFC(GetAudioEndpoint);
#undef LDFC
- hr = drvs.pInitializeDriver();
- if(FAILED(hr)){
TRACE("Driver initialization failed: %08x\n", hr);
FreeLibrary(drvs.module);
return hr;
- }
If you are going to call it on load, you could just as well do the init in the driver on DLL_PROCESS_ATTACH and avoid the extra method.