
- use LdrRegisterDllNotification instead of LoadLibraryExW for patching ** LoadLibraryExW is currently still hooked for the UpdatePack7 compatibility fix, I'm looking into other alternatives - more robust error checking - refactored a lot of code to be more reusable - header guards - better logging framework - tighter permissions on the unload event - probably other stuff I forgot about
14 lines
334 B
C
14 lines
334 B
C
#include <Windows.h>
|
|
#include <Msiquery.h>
|
|
#include <tchar.h>
|
|
|
|
__declspec(dllexport)
|
|
UINT __stdcall AIHelper_SetUnloadEvent(MSIHANDLE hInstall) {
|
|
HANDLE hEvent = OpenEvent(EVENT_MODIFY_STATE, FALSE, _T("Global\\wufuc_UnloadEvent"));
|
|
if ( hEvent ) {
|
|
SetEvent(hEvent);
|
|
CloseHandle(hEvent);
|
|
}
|
|
return 1;
|
|
}
|