Я реализовал DLL для подключения функций в целевом процессе с помощью Microsoft Detours. Однако когда я запускаю файл withdll.exe, который входит в состав Detours, я получаю следующую ошибку:
B:>withdll.exe /d:[...]\IniHook.dll HookTarget.exe
withdll.exe: Error: [...]\IniHook.dll does not export ordinal #1.
See help entry DetourCreateProcessWithDllEx in Detours.chm.
Однако я не могу найти файл Detours.chm, чтобы узнать, что делать.
В чем может быть проблема и как ее исправить?
Мой код ловушки:
#include "pch.h"
#define WIN32_LEAN_AND_MEAN
#include
#include
#include
#pragma comment(lib, "detours.lib")
typedef DWORD(WINAPI* GetPrivateProfileStringW_t)(LPCWSTR app, LPCWSTR key, LPCWSTR def, LPWSTR result, DWORD size, LPCWSTR file_name);
GetPrivateProfileStringW_t TrueGetPrivateProfileStringW = nullptr;
DWORD WINAPI HookedGetPrivateProfileStringW(LPCWSTR app, LPCWSTR key, LPCWSTR def, LPWSTR result, DWORD size, LPCWSTR file_name)
{
std::wcout
Подробнее здесь: https://stackoverflow.com/questions/793 ... et-process