Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: C++ pointers and DLL linking Pin
«_Superman_»29-Jun-09 18:54
professional«_Superman_»29-Jun-09 18:54 
QuestionRe: C++ pointers and DLL linking Pin
dAvId_BotMan29-Jun-09 19:08
dAvId_BotMan29-Jun-09 19:08 
AnswerRe: C++ pointers and DLL linking Pin
«_Superman_»29-Jun-09 19:16
professional«_Superman_»29-Jun-09 19:16 
QuestionRe: C++ pointers and DLL linking Pin
dAvId_BotMan29-Jun-09 19:20
dAvId_BotMan29-Jun-09 19:20 
AnswerRe: C++ pointers and DLL linking Pin
«_Superman_»29-Jun-09 19:25
professional«_Superman_»29-Jun-09 19:25 
GeneralRe: C++ pointers and DLL linking Pin
dAvId_BotMan29-Jun-09 19:35
dAvId_BotMan29-Jun-09 19:35 
AnswerRe: C++ pointers and DLL linking Pin
Pavan_Putra29-Jun-09 20:06
Pavan_Putra29-Jun-09 20:06 
QuestionKeyboard Hook - all in a DLL Pin
trungkiendt829-Jun-09 8:09
trungkiendt829-Jun-09 8:09 
I want to hook keboard events of an application, and that hook is associated with a ThreadID - NOT global hook. So I put the KeyboardProc() , and the InstallKeyboardHook() functions, BOTH in a DLL.
In the DllMain() function, I call to install the hook like this:

KeyboardProc()
{
//something
}

InstallKeyboardHook()
{
//something
}

BOOL APIENTRY DllMain( HMODULE hModule,
DWORD dwReason,
LPVOID lpReserved
)
{
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
InstallKeyboardHook();
break;

case DLL_PROCESS_DETACH:
UnhookWindowsHookEx(hHook);
break;
}
return TRUE;
}

The DLL is loaded by the desired hook application.
It's loaded, the SetWindowsHookEx() success, but nothing happen when i press some key in the application main window.

So why ? and is it wrong when i put the install code and hook proc both in the same DLL for self install ?

Thanks very much!
AnswerRe: Keyboard Hook - all in a DLL Pin
«_Superman_»29-Jun-09 18:48
professional«_Superman_»29-Jun-09 18:48 
GeneralRe: Keyboard Hook - all in a DLL Pin
trungkiendt829-Jun-09 18:56
trungkiendt829-Jun-09 18:56 
GeneralRe: Keyboard Hook - all in a DLL Pin
«_Superman_»29-Jun-09 19:03
professional«_Superman_»29-Jun-09 19:03 
GeneralRe: Keyboard Hook - all in a DLL Pin
trungkiendt830-Jun-09 11:34
trungkiendt830-Jun-09 11:34 
QuestionProblems showing a non modal form from a VB6 activex in Visual C++ 6 [modified] Pin
AlexandreT-DC29-Jun-09 6:09
AlexandreT-DC29-Jun-09 6:09 
QuestionLOGFONT structure.. Pin
kumar sanghvi29-Jun-09 5:23
kumar sanghvi29-Jun-09 5:23 
AnswerRe: LOGFONT structure.. Pin
Chris Losinger29-Jun-09 5:45
professionalChris Losinger29-Jun-09 5:45 
GeneralRe: LOGFONT structure.. Pin
kumar sanghvi29-Jun-09 7:49
kumar sanghvi29-Jun-09 7:49 
GeneralRe: LOGFONT structure.. Pin
Chris Losinger29-Jun-09 7:54
professionalChris Losinger29-Jun-09 7:54 
GeneralRe: LOGFONT structure.. Pin
Sarath C29-Jun-09 7:59
Sarath C29-Jun-09 7:59 
GeneralRe: LOGFONT structure.. Pin
Randor 29-Jun-09 8:03
professional Randor 29-Jun-09 8:03 
QuestionDeployment Problem - Nothing Happens when run! Pin
Grahamfff29-Jun-09 4:07
Grahamfff29-Jun-09 4:07 
AnswerRe: Deployment Problem - Nothing Happens when run! Pin
Cedric Moonen29-Jun-09 4:27
Cedric Moonen29-Jun-09 4:27 
QuestionMDI OnDraw never being called Pin
transoft29-Jun-09 3:13
transoft29-Jun-09 3:13 
AnswerRe: MDI OnDraw never being called Pin
Alan Balkany29-Jun-09 5:23
Alan Balkany29-Jun-09 5:23 
AnswerRe: MDI OnDraw never being called Pin
Ozer Karaagac29-Jun-09 11:45
professionalOzer Karaagac29-Jun-09 11:45 
GeneralRe: MDI OnDraw never being called Pin
transoft30-Jun-09 2:02
transoft30-Jun-09 2:02 

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.