Commit e56a302f authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Alexandre Julliard

dsound: Increase dll refcount and disable thread calls.

parent 9c18d92f
......@@ -585,16 +585,13 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
INIT_GUID(DSOUND_renderer_guids[i], 0xbd6dd71a, 0x3deb, 0x11d1, 0xb1, 0x71, 0x00, 0xc0, 0x4f, 0xc2, 0x00, 0x00 + i);
INIT_GUID(DSOUND_capture_guids[i], 0xbd6dd71b, 0x3deb, 0x11d1, 0xb1, 0x71, 0x00, 0xc0, 0x4f, 0xc2, 0x00, 0x00 + i);
}
DisableThreadLibraryCalls(hInstDLL);
/* Increase refcount on dsound by 1 */
GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (LPCWSTR)hInstDLL, &hInstDLL);
break;
case DLL_PROCESS_DETACH:
TRACE("DLL_PROCESS_DETACH\n");
break;
case DLL_THREAD_ATTACH:
TRACE("DLL_THREAD_ATTACH\n");
break;
case DLL_THREAD_DETACH:
TRACE("DLL_THREAD_DETACH\n");
break;
default:
TRACE("UNKNOWN REASON\n");
break;
......
......@@ -970,6 +970,14 @@ START_TEST(dsound)
hDsound = LoadLibrary("dsound.dll");
if (hDsound)
{
ok( FreeLibrary(hDsound), "FreeLibrary(1) returned %d\n", GetLastError());
ok( FreeLibrary(hDsound), "FreeLibrary(2) returned %d\n", GetLastError());
ok(!FreeLibrary(hDsound), "DirectSound DLL still loaded\n");
}
hDsound = LoadLibrary("dsound.dll");
if (hDsound)
{
trace("DLL Version: %s\n", get_file_version("dsound.dll"));
pDirectSoundEnumerateA = (void*)GetProcAddress(hDsound,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment