未找到绕道标识符

时间:2012-12-01 11:29:58

标签: c++ dll detours

我收到了错误

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"

仍然是同样的错误。

1 个答案:

答案 0 :(得分:0)

这些功能在绕道2.1 API。