Click here to Skip to main content
15,913,055 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: data is printed on the scroll bar Pin
prithaa23-Oct-06 20:56
prithaa23-Oct-06 20:56 
GeneralRe: data is printed on the scroll bar Pin
tanvon malik23-Oct-06 21:47
tanvon malik23-Oct-06 21:47 
GeneralRe: data is printed on the scroll bar Pin
prithaa23-Oct-06 22:10
prithaa23-Oct-06 22:10 
GeneralRe: data is printed on the scroll bar Pin
Mark Salsbery24-Oct-06 4:40
Mark Salsbery24-Oct-06 4:40 
GeneralRe: data is printed on the scroll bar Pin
prithaa24-Oct-06 5:11
prithaa24-Oct-06 5:11 
GeneralRe: data is printed on the scroll bar Pin
Mark Salsbery24-Oct-06 5:55
Mark Salsbery24-Oct-06 5:55 
GeneralRe: data is printed on the scroll bar Pin
prithaa24-Oct-06 6:46
prithaa24-Oct-06 6:46 
Questionhi this problem with my detours i cant ddetour it it gives errors Pin
nah133723-Oct-06 19:22
nah133723-Oct-06 19:22 
i dont know but i think in the hook i have detours 1.5 and in microsoft visual basic include folder there might be detours 2.1 arent they conflicting themselfes ?

detours library yes i have look at the includes :
[code]/

in main.cpp i have :
#include <windows.h>
#include <stdio.h>
#include "main.h"
#include "opengl.h"
#include "detours.h"
#pragma warning(disable:4100)
#pragma comment(lib,"detours.lib")

void WINAPI glDrawElements_Detour(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
void WINAPI glDrawElements_Trampoline(GLenum, GLsizei, GLenum, const GLvoid *indices);



bool WINAPI DllMain(HMODULE hDll, DWORD dwReason, PVOID pvReserved)
{
if(dwReason == DLL_PROCESS_ATTACH)
{
DetourFunctionWithTrampoline((PBYTE)glDrawElements_Trampoline,(PBYTE)glDrawElements_Detour);
hTtnDll = hDll;
DisableThreadLibraryCalls(hDll);
sycoreReDirectFunction("kernel32.dll", "GetProcAddress", (DWORD)&pGetProcAddress);
return TRUE;
}
return FALSE;
}




////////////// in opengel.cpp i have

#include <windows.h>
#include <stdio.h>
#include <stdarg.h>
#include <time.h>
#include <gl gl.h="">
#include <gl glu.h="">
#include <gl glaux.h="">
#include <math.h>
#include "CRC.h"
#include "ASM_GL_CALLS.h"
#include "opengl.h"
#include "main.h"
//#pragma warning(disable: 4244)
#include "detours.h"
#pragma warning(disable:4100)
#pragma comment(lib,"detours.lib")


DETOUR_TRAMPOLINE(void WINAPI glDrawElements_Trampoline(GLenum, GLsizei, GLenum, const GLvoid *indices), glDrawElements);

void WINAPI glDrawElements_Detour(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
{


if (MODELS_1)
{

show_****_modelz();
}

if (MODELS_2)
{

show_****_modelz();
}

if (MODELS_3)
{

show_****_modelz();
}

if (MODELS_4)
{

show_****_modelz();
}



glDrawElements_Trampoline(mode, count, type, indices);
}



and in opengel.h i have this void APIENTRY omfg_glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
/[code]


and i get this error and i dont know what do to :::


Linking...
main.obj : error LNK2001: unresolved external symbol "void __stdcall omfg_glDrawElements(unsigned int,int,unsigned int,void const *)" (?omfg_glDrawElements@@YGXIHIPBX@Z)
Release/BASE_GL_HOOK.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

BASE_GL_HOOK.dll - 2 error(s), 0 warning(s)

i think this is right using ?

typedef void (*void WINAPI glDrawElements_Detour) ();

typedef void (*void WINAPI glDrawElements_Detour) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);


or is this :
typedef void (WINAPI *glDrawElements_t) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
glDrawElements_t glDrawElements_Detour;
AnswerRe: hi this problem with my detours i cant ddetour it it gives errors Pin
Cedric Moonen23-Oct-06 20:47
Cedric Moonen23-Oct-06 20:47 
AnswerRe: hi this problem with my detours i cant ddetour it it gives errors [modified] Pin
nah133723-Oct-06 21:25
nah133723-Oct-06 21:25 
GeneralRe: hi this problem with my detours i cant ddetour it it gives errors Pin
Cedric Moonen23-Oct-06 21:38
Cedric Moonen23-Oct-06 21:38 
GeneralRe: hi this problem with my detours i cant ddetour it it gives errors Pin
nah133724-Oct-06 1:22
nah133724-Oct-06 1:22 
Questionfreopen and textbox data Pin
Cpaulv23-Oct-06 19:20
Cpaulv23-Oct-06 19:20 
AnswerRe: freopen and textbox data Pin
Waldermort23-Oct-06 19:32
Waldermort23-Oct-06 19:32 
GeneralRe: freopen and textbox data Pin
Cpaulv24-Oct-06 3:20
Cpaulv24-Oct-06 3:20 
QuestionCFileFind in Temporary Internet Files Pin
locoone23-Oct-06 14:02
locoone23-Oct-06 14:02 
AnswerRe: CFileFind in Temporary Internet Files Pin
tanvon malik23-Oct-06 19:14
tanvon malik23-Oct-06 19:14 
GeneralRe: CFileFind in Temporary Internet Files Pin
locoone24-Oct-06 15:07
locoone24-Oct-06 15:07 
AnswerRe: CFileFind in Temporary Internet Files Pin
Mila02523-Oct-06 20:41
Mila02523-Oct-06 20:41 
QuestionHow to set text color in CRichEditCtrl? Pin
David.YueZuo23-Oct-06 13:57
David.YueZuo23-Oct-06 13:57 
AnswerRe: How to set text color in CRichEditCtrl? Pin
Mark Salsbery23-Oct-06 14:07
Mark Salsbery23-Oct-06 14:07 
GeneralRe: How to set text color in CRichEditCtrl? Pin
David.YueZuo24-Oct-06 11:55
David.YueZuo24-Oct-06 11:55 
GeneralRe: How to set text color in CRichEditCtrl? Pin
Mark Salsbery24-Oct-06 12:30
Mark Salsbery24-Oct-06 12:30 
GeneralRe: How to set text color in CRichEditCtrl? Pin
David.YueZuo24-Oct-06 13:28
David.YueZuo24-Oct-06 13:28 
QuestionLoading a Dialog resource into another form Dynamically Pin
bobm523-Oct-06 13:35
bobm523-Oct-06 13:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.