Skip to content

Commit

Permalink
sapi: Free typelib on DLL detach.
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunren authored and julliard committed Feb 20, 2024
1 parent 164520f commit afac7d7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions dlls/sapi/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,21 @@ HRESULT WINAPI DllGetClassObject( REFCLSID clsid, REFIID iid, void **obj )

return IClassFactory_QueryInterface( cf, iid, obj );
}

/******************************************************************
* DllMain
*/
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, void *reserved )
{
switch (reason)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls( hinst );
break;
case DLL_PROCESS_DETACH:
if (reserved) break;
release_typelib();
break;
}
return TRUE;
}

0 comments on commit afac7d7

Please sign in to comment.