我收到错误
error C3861: 'DetourTransactionBegin': identifier not found
error C3861: 'DetourUpdateThread': identifier not found
error C3861: 'DetourAttach': identifier not found
error C3861: 'DetourAttach': identifier not found
error C3861: 'DetourAttach': identifier not found
error C3861: 'DetourAttach': identifier not found
error C3861: 'DetourTransactionCommit': identifier not found
error C3861: 'DetourTransactionBegin': identifier not found
error C3861: 'DetourUpdateThread': identifier not found
error C3861: 'DetourDetach': identifier not found
error C3861: 'DetourDetach': identifier not found
error C3861: 'DetourDetach': identifier not found
error C3861: 'DetourDetach': identifier not found
error C3861: 'DetourTransactionCommit': identifier not found
有错误的代码:
DetourTransactionBegin();
DetourUpdateThread( GetCurrentThread() );
DetourAttach( &(PVOID &)Real_Send, Mine_Send );
DetourAttach( &(PVOID &)Real_Recv, Mine_Recv );
DetourAttach( &(PVOID &)Real_RecvFrom, Mine_RecvFrom );
DetourAttach( &(PVOID &)Real_WSARecvEx, Mine_WSARecvEx );
DetourTransactionCommit();
我完整的头文件:
#pragma once
#include "targetver.h"
#include <cstdio>
#include <ctime>
#include <fstream>
#include <iomanip>
#include <string>
#include <windows.h>
#include <detours.h>
#pragma comment( lib, "Ws2_32.lib" )
#pragma comment( lib, "detours.lib" )
#pragma comment( lib, "detoured.lib" )
#pragma comment( lib, "Mswsock.lib" )
我就是找不到问题。
我在链接器选项的附加包含中添加了 detours.lib 的目录。
使用弯路 1.5
更新
所以我尝试将 detours 文件本地添加到项目中。
#include "detours.h"
还是同样的错误。