summaryrefslogtreecommitdiff
path: root/inject
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2015-08-24 10:12:02 +0100
committerJose Fonseca <jfonseca@vmware.com>2015-08-24 10:12:02 +0100
commitba0d9915742b28a6e705aa1af4310bb26a3098f2 (patch)
tree98ff9d096bf8d7f9e8b2f892032d7fde486f725e /inject
parent645df01a38e993d78adde2e44ba158143ea9f112 (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.cpp5
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);
}
/*