зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1240607 - Force CreateWindow hooks to be detours. r=jmathies
This commit is contained in:
Родитель
2a2dcf9916
Коммит
1880f9540d
|
@ -501,24 +501,26 @@ CreateWindowAHook(LPCSTR aClassName, LPCSTR aWindowName, DWORD aStyle, int aX,
|
||||||
void
|
void
|
||||||
InitCreateWindowHook()
|
InitCreateWindowHook()
|
||||||
{
|
{
|
||||||
|
// Forcing these interceptions to be detours due to conflicts with
|
||||||
|
// NVIDIA Optimus DLLs that are injected into our process.
|
||||||
sUser32Interceptor.Init("user32.dll");
|
sUser32Interceptor.Init("user32.dll");
|
||||||
if (!sCreateWindowExWStub) {
|
if (!sCreateWindowExWStub) {
|
||||||
sUser32Interceptor.AddHook("CreateWindowExW",
|
sUser32Interceptor.AddDetour("CreateWindowExW",
|
||||||
reinterpret_cast<intptr_t>(CreateWindowExWHook),
|
reinterpret_cast<intptr_t>(CreateWindowExWHook),
|
||||||
(void**) &sCreateWindowExWStub);
|
(void**) &sCreateWindowExWStub);
|
||||||
}
|
}
|
||||||
if (!sCreateWindowExAStub) {
|
if (!sCreateWindowExAStub) {
|
||||||
sUser32Interceptor.AddHook("CreateWindowExA",
|
sUser32Interceptor.AddDetour("CreateWindowExA",
|
||||||
reinterpret_cast<intptr_t>(CreateWindowExAHook),
|
reinterpret_cast<intptr_t>(CreateWindowExAHook),
|
||||||
(void**) &sCreateWindowExAStub);
|
(void**) &sCreateWindowExAStub);
|
||||||
}
|
}
|
||||||
if (!sCreateWindowWStub) {
|
if (!sCreateWindowWStub) {
|
||||||
sUser32Interceptor.AddHook("CreateWindowW",
|
sUser32Interceptor.AddDetour("CreateWindowW",
|
||||||
reinterpret_cast<intptr_t>(CreateWindowWHook),
|
reinterpret_cast<intptr_t>(CreateWindowWHook),
|
||||||
(void**) &sCreateWindowWStub);
|
(void**) &sCreateWindowWStub);
|
||||||
}
|
}
|
||||||
if (!sCreateWindowAStub) {
|
if (!sCreateWindowAStub) {
|
||||||
sUser32Interceptor.AddHook("CreateWindowA",
|
sUser32Interceptor.AddDetour("CreateWindowA",
|
||||||
reinterpret_cast<intptr_t>(CreateWindowAHook),
|
reinterpret_cast<intptr_t>(CreateWindowAHook),
|
||||||
(void**) &sCreateWindowAStub);
|
(void**) &sCreateWindowAStub);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче