diff options
author | Jose Fonseca <jfonseca@vmware.com> | 2015-08-24 10:12:02 +0100 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2015-08-24 10:12:02 +0100 |
commit | ba0d9915742b28a6e705aa1af4310bb26a3098f2 (patch) | |
tree | 98ff9d096bf8d7f9e8b2f892032d7fde486f725e /inject | |
parent | 645df01a38e993d78adde2e44ba158143ea9f112 (diff) |
inject: Defer pfnCreateProcessAsUserW check until it's actually used.
Noticed while investigating
https://github.com/apitrace/apitrace/issues/378
Diffstat (limited to 'inject')
-rw-r--r-- | inject/injectee.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/inject/injectee.cpp b/inject/injectee.cpp index 0d9cfcec..f78b8d25 100644 --- a/inject/injectee.cpp +++ b/inject/injectee.cpp @@ -243,6 +243,10 @@ MyCreateProcessAsUserW(HANDLE hToken, lpCommandLine); } + // Certain WINE versions (at least 1.6.2) don't export + // kernel32.dll!CreateProcessAsUserW + assert(pfnCreateProcessAsUserW); + BOOL bRet; bRet = pfnCreateProcessAsUserW(hToken, lpApplicationName, @@ -1074,7 +1078,6 @@ DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) HMODULE hKernel32 = GetModuleHandleA("kernel32.dll"); assert(hKernel32); pfnCreateProcessAsUserW = (PFNCREATEPROCESSASUSERW)GetProcAddress(hKernel32, "CreateProcessAsUserW"); - assert(pfnCreateProcessAsUserW); } /* |