Click here to Skip to main content
15,890,947 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Load image Pin
Hamid_RT28-Oct-06 9:09
Hamid_RT28-Oct-06 9:09 
QuestionDynamic Context Menus Pin
Mohammad A Gdeisat28-Oct-06 7:25
Mohammad A Gdeisat28-Oct-06 7:25 
AnswerRe: Dynamic Context Menus Pin
Mark Salsbery28-Oct-06 8:35
Mark Salsbery28-Oct-06 8:35 
GeneralRe: Dynamic Context Menus Pin
Mohammad A Gdeisat28-Oct-06 9:36
Mohammad A Gdeisat28-Oct-06 9:36 
GeneralRe: Dynamic Context Menus Pin
Mark Salsbery29-Oct-06 6:47
Mark Salsbery29-Oct-06 6:47 
AnswerRe: Dynamic Context Menus Pin
Hamid_RT28-Oct-06 8:37
Hamid_RT28-Oct-06 8:37 
GeneralRe: Dynamic Context Menus Pin
Mohammad A Gdeisat28-Oct-06 9:34
Mohammad A Gdeisat28-Oct-06 9:34 
Questioni got this and getting errors with detours please help Pin
nah133728-Oct-06 6:12
nah133728-Oct-06 6:12 
void APIENTRY omfg_glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
{





if (MODELS_1)
{

show_damn_modelz();
}

if (MODELS_2)
{

show_damn_modelz();
}

if (MODELS_3)
{

show_damn_modelz();
}

if (MODELS_4)
{

show_damn_modelz();
}


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

/////////in opengl.h i have this

#pragma comment(lib,"OpenGL32.lib")
#pragma comment(lib,"GLu32.lib")
#pragma comment(lib,"GLaux.lib")

#include
#include
#include


void APIENTRY omfg_glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);

//////// in dll main


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




and this is how i wanna detour it
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)
{


// ur code

glDrawElements_Trampoline(mode, count, type, 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;
}


but i get errors and i dont know what should i do with the void APIENTRY functions ? please anyone could help me ?

AnswerRe: i got this and getting errors with detours please help Pin
Hamid_RT28-Oct-06 8:38
Hamid_RT28-Oct-06 8:38 
AnswerRe: i got this and getting errors with detours please help Pin
PJ Arends28-Oct-06 8:44
professionalPJ Arends28-Oct-06 8:44 
GeneralRe: i got this and getting errors with detours please help Pin
Hamid_RT28-Oct-06 9:07
Hamid_RT28-Oct-06 9:07 
Questionclosing the opened dialog from cchildframe::OnClose() Pin
Veeresh Hiremath28-Oct-06 4:55
Veeresh Hiremath28-Oct-06 4:55 
AnswerRe: closing the opened dialog from cchildframe::OnClose() Pin
Mark Salsbery28-Oct-06 8:27
Mark Salsbery28-Oct-06 8:27 
Question2 chars to float Pin
rockychaudhary28-Oct-06 4:51
rockychaudhary28-Oct-06 4:51 
AnswerRe: 2 chars to float Pin
Eytukan28-Oct-06 6:25
Eytukan28-Oct-06 6:25 
QuestionRe: 2 chars to float Pin
rockychaudhary29-Oct-06 21:24
rockychaudhary29-Oct-06 21:24 
AnswerRe: 2 chars to float Pin
Eytukan29-Oct-06 21:58
Eytukan29-Oct-06 21:58 
GeneralRe: 2 chars to float Pin
rockychaudhary31-Oct-06 4:57
rockychaudhary31-Oct-06 4:57 
QuestionRe: 2 chars to float Pin
Eytukan31-Oct-06 23:58
Eytukan31-Oct-06 23:58 
QuestionGetUpdateRgn Pin
Waldermort28-Oct-06 4:50
Waldermort28-Oct-06 4:50 
AnswerRe: GetUpdateRgn Pin
PJ Arends28-Oct-06 8:29
professionalPJ Arends28-Oct-06 8:29 
Questionerror PRJ0015 in VS C++ Pin
Reuven Elliassi28-Oct-06 4:20
Reuven Elliassi28-Oct-06 4:20 
AnswerRe: error PRJ0015 in VS C++ Pin
PJ Arends28-Oct-06 8:19
professionalPJ Arends28-Oct-06 8:19 
QuestionI check this MSDN answer but Pin
Reuven Elliassi28-Oct-06 10:12
Reuven Elliassi28-Oct-06 10:12 
AnswerRe: I check this MSDN answer but Pin
PJ Arends28-Oct-06 11:33
professionalPJ Arends28-Oct-06 11:33 

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.