mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-08-01 05:48:37 +00:00
Merge commit 'dabc40cb19
' as 'ext/detours'
This commit is contained in:
commit
77523940b3
178 changed files with 102613 additions and 0 deletions
35
ext/detours/samples/findfunc/findfunc.cpp
Normal file
35
ext/detours/samples/findfunc/findfunc.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Detour Test Program (findfunc.cpp of findfunc.exe)
|
||||
//
|
||||
// Microsoft Research Detours Package
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <detours.h>
|
||||
#include "target.h"
|
||||
|
||||
int __cdecl main(void)
|
||||
{
|
||||
printf("findfunc.exe: Starting.\n");
|
||||
fflush(stdout);
|
||||
|
||||
printf("DLLs:\n");
|
||||
for (HMODULE hModule = NULL; (hModule = DetourEnumerateModules(hModule)) != NULL;) {
|
||||
CHAR szName[MAX_PATH] = { 0 };
|
||||
GetModuleFileNameA(hModule, szName, sizeof(szName) - 1);
|
||||
printf(" %p: %s\n", hModule, szName);
|
||||
}
|
||||
|
||||
DWORD dwCount = 10000;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
printf("findfunc.exe: Calling (%ld).\n", dwCount);
|
||||
dwCount = Target(dwCount) + 10000;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
///////////////////////////////////////////////////////////////// End of File.
|
Loading…
Add table
Add a link
Reference in a new issue