Error .

Posts 115 of 15 · Page 1 of 1
Whit Combined Base v2 Error =O
I'm using whit combined base v2 and i've errors .. :

Code:
1>detours.obj : error LNK2001: unresolved external symbol _mlde32
1>C:\Documents and Settings\***\My Documents\Visual Studio 2008\Projects\Project1\Combined Base v2\CaBase\Release\CaBase.dll : fatal error LNK1120: 1 unresolved externals
Thanks If You'll Help Me ..( I googled the error but i failed ..)
I have the same error (When i release)
Lol you've another error i saw your error ..

That's your error :

Code:
DirectX.obj : error LNK2019: unresolved external symbol "void * __cdecl DetourCreate(unsigned char *,unsigned char const *,int)" (?DetourCreate@@YAPAXPAEPBEH@Z) referenced in function "public: void __thiscall cDirectx::Hook(void)" (?Hook@cDirectx@@QAEXXZ)
1>C:\Documents and Settings\***\My Documents\Visual Studio 2008\Projects\Project1\Combined Base v2\CaBase\Release\CaBase.dll : fatal error LNK1120: 1 unresolved externals
i've another one ..
Quote Originally Posted by o-o View Post
I'm using whit combined base v2 and i've errors .. :

Code:
1>detours.obj : error LNK2001: unresolved external symbol _mlde32
1>C:\Documents and Settings\***\My Documents\Visual Studio 2008\Projects\Project1\Combined Base v2\CaBase\Release\CaBase.dll : fatal error LNK1120: 1 unresolved externals
Thanks If You'll Help Me ..( I googled the error but i failed ..)
Look at the Detours .h or .cpp
Maybe you can fix it at ur own /
Quote Originally Posted by Sydney View Post
Look at the Detours .h or .cpp
Maybe you can fix it at ur own /
After I'll look on my big computer ...
post a piece of code that you suspect this error is in cause i have never had this problem before :S
Quote Originally Posted by GodHack2 View Post
post a piece of code that you suspect this error is in cause i have never had this problem before :S
Lol i said AFTER cuz i'm on my mini laptop lol when i'll move to big pc i'll give you piece of the code .. (And my laptop is 10.1 inc /)
Sorry for double but this is my Detours.h :
Code:
#ifndef _DETOURS_H
#define _DETOURS_H

extern "C" int  __cdecl mlde32(void *codeptr);

int   DetourLen(BYTE *src, int minlen);
void *DetourCreate(BYTE *src, const BYTE *dst, const int minlen=0);
void  DetourRemove(BYTE *src, BYTE *restore, const int len=0);

#endif
And My Error is in the first post .. Help PLEASE !(if you need the .cpp file say i'll give you)
Give us the Cpp .
Sure .. .cpp file :

Code:
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdlib.h>
#include "detours.h"


int DetourASMlen(BYTE *src, int minlen)			// find out asm instruction length
{
	int i,len;

	for (len=0; len<minlen; len+=i) {
		i=mlde32((void *)src);
		if (i<=0) return 0;
		src+=i;
	}
	return len;
}

void *DetourCreate(BYTE *src, const BYTE *dst, int minlen)
{
	BYTE	*jmp, *org;
	DWORD	dwBack;
	int		len;

	len=DetourASMlen(src,(minlen<6)?6:minlen);
	if (len==0 && minlen>=6)  len=minlen;
	if (len==0) return 0;

	org=jmp = (BYTE*)malloc(len+5+1);		// room for nobytes + jmplen + size byte
    jmp[0]=len;								// save length in first byte
    jmp++;

	VirtualProtect(src, len, PAGE_EXECUTE_READWRITE, &dwBack);
	memcpy(jmp, src, len);	
	jmp += len;
	jmp[0] = 0xE9;
	*(DWORD*)(jmp+1) = (DWORD)(src+len - jmp) - 5;

	src[0] = 0x68;							// different hook,  push address   ret
	*(DWORD*)(src+1) = (DWORD)(dst);
	src[5] = 0xc3;
	for (int i=6; i<len; i++)  src[i] = 0x90;
	VirtualProtect(src, len, dwBack, &dwBack);

	return &org[1];							// return entry point, byte 0 = length
}

// restore == return value of DetourCreate
void DetourRemove(BYTE *src, BYTE *restore, int len)
{
	DWORD dwBack;

	len=*(BYTE *)(restore-1);		// ignore len parameter, only for backward competability

	VirtualProtect(src, len, PAGE_EXECUTE_READWRITE, &dwBack);
	memcpy(src, restore, len);
	restore[0] = 0xE9;

	*(DWORD*)(restore+1) = (DWORD)(src - restore) - 5;
	VirtualProtect(src, len, dwBack, &dwBack);
}
No wrong things. I just downloaded V2 and debugged. I got no error. Have you found anything in red means mistake ?
THe problem is in detours.h look at ur error.
Lol so what's my problem ?
Quote Originally Posted by o-o View Post
Lol so what's my problem ?
I thought you can code.
Coders must read her codes. And then they know the problem. Look thru your Files and look for any errors definition or forget ; Or to many }


Tip:

An "unresolved external symbol" is an identifier that the translator
could not find. In many instances, a source file was not specified
or a library not included.

Examine the requirements of your header files and verify that
you have specified all necessary source and libraries to your
translator (compiler).

All in all is that u got a definition error.
Look thru detours.cpp and watch for definitions errors including mlde32
Oh man it works ! i think it was because i used C++ 08 and 2008 isn't added the mlde32.obj ..Finnaly Works !

Close Req !
Closed as requested
Posts 115 of 15 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?