Pregunta

I'm getting the error

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

Code with the error:

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();

My complete header file:

#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" )

And I just cant find the problem.
I added the dir of detours.lib on the additional includes on the linker options.

using detours 1.5


UPDATE

So I tried adding the detours files locally to the project.

#include "detours.h"

Still the same error.

¿Fue útil?

Solución

These functions are in detours 2.1 API.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top