本文整理汇总了C++中HardHook::setup方法的典型用法代码示例。如果您正苦于以下问题:C++ HardHook::setup方法的具体用法?C++ HardHook::setup怎么用?C++ HardHook::setup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HardHook
的用法示例。
在下文中一共展示了HardHook::setup方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dllmainProcAttach
static void dllmainProcAttach(char *procname) {
Mutex::init();
char *p = strrchr(procname, '\\');
if (!p) {
// No blacklisting if the file has no path
} else if (GetProcAddress(NULL, "mumbleSelfDetection") != NULL) {
ods("Lib: Attached to overlay helper or Mumble process. Blacklisted - no overlay injection.");
bBlackListed = TRUE;
bMumble = TRUE;
} else {
if (dllmainProcAttachCheckProcessIsBlacklisted(procname, p)) {
ods("Lib: Process %s is blacklisted - no overlay injection.", procname);
return;
}
}
OSVERSIONINFOEX ovi;
memset(&ovi, 0, sizeof(ovi));
ovi.dwOSVersionInfoSize = sizeof(ovi);
GetVersionEx(reinterpret_cast<OSVERSIONINFO *>(&ovi));
bIsWin8 = (ovi.dwMajorVersion >= 7) || ((ovi.dwMajorVersion == 6) && (ovi.dwBuildNumber >= 9200));
ods("Lib: bIsWin8: %i", bIsWin8);
hHookMutex = CreateMutex(NULL, false, "MumbleHookMutex");
if (hHookMutex == NULL) {
ods("Lib: CreateMutex failed");
return;
}
if(!createSharedDataMap())
return;
if (! bMumble) {
// Hook our own LoadLibrary functions so we notice when a new library (like the d3d ones) is loaded.
hhLoad.setup(reinterpret_cast<voidFunc>(LoadLibraryA), reinterpret_cast<voidFunc>(MyLoadLibrary));
hhLoadW.setup(reinterpret_cast<voidFunc>(LoadLibraryW), reinterpret_cast<voidFunc>(MyLoadLibraryW));
checkHooks(true);
ods("Lib: Injected into %s", procname);
}
}
示例2: HookResizeRaw
static void HookResizeRaw(voidFunc vfResize) {
ods("DXGI: Injecting ResizeBuffers Raw");
hhResize.setup(vfResize, reinterpret_cast<voidFunc>(myResize));
}
示例3: HookPresentRaw
static void HookPresentRaw(voidFunc vfPresent) {
ods("DXGI: Injecting Present");
hhPresent.setup(vfPresent, reinterpret_cast<voidFunc>(myPresent));
}
示例4: HookCreateRawEx
static void HookCreateRawEx(voidFunc vfCreate) {
ods("D3D9: Injecting CreateDeviceEx Raw");
hhCreateDeviceEx.setup(vfCreate, reinterpret_cast<voidFunc>(myCreateDeviceEx));
}
示例5: HookAddRelease
static void HookAddRelease(voidFunc vfAdd, voidFunc vfRelease) {
ods("D3D10: Injecting device add/remove");
hhAddRef.setup(vfAdd, reinterpret_cast<voidFunc>(myAddRef));
hhRelease.setup(vfRelease, reinterpret_cast<voidFunc>(myRelease));
}
示例6: HookPresentRaw
static void HookPresentRaw(voidFunc vfPresent) {
hhPresent.setup(vfPresent, reinterpret_cast<voidFunc>(myPresent));
}