Click here to Skip to main content
15,896,154 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMicrosoft Detours 1.5 Complete API Documentations needed. Pin
Ricky Gai19-Sep-06 23:20
Ricky Gai19-Sep-06 23:20 
AnswerRe: Microsoft Detours 1.5 Complete API Documentations needed. Pin
SSDream7-Sep-09 4:35
SSDream7-Sep-09 4:35 
QuestionShared object between 2 DLLs Pin
AbhishekBK19-Sep-06 23:18
AbhishekBK19-Sep-06 23:18 
QuestionMicrosoft Detours 1.5 API documentations required. Pin
Ricky Gai19-Sep-06 23:17
Ricky Gai19-Sep-06 23:17 
QuestionKeyBoard hook Doubt Pin
_anil_19-Sep-06 23:06
_anil_19-Sep-06 23:06 
AnswerRe: KeyBoard hook Doubt Pin
Naveen19-Sep-06 23:31
Naveen19-Sep-06 23:31 
GeneralRe: KeyBoard hook Doubt Pin
_anil_19-Sep-06 23:40
_anil_19-Sep-06 23:40 
GeneralRe: KeyBoard hook Doubt Pin
Naveen19-Sep-06 23:55
Naveen19-Sep-06 23:55 
_anil_ wrote:
g_hHook = ::SetWindowsHookEx(WH_KEYBOARD, KeyboardProc, AfxGetInstanceHandle(), 0);


i think the problem is with the AfxGetInstanceHandle() used here. What i suggest is create a globel variable of HINSTANCE and set this parameter with the HINSTACE coming in the dll main. If ur using an MFC dll, set this variable as follows

BOOL CDllApp::InitInstance()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
hins=AfxGetInstanceHandle();
return CWinApp::InitInstance();
}

now pass this variable in the SetWindowsHookEx function

nave

GeneralRe: KeyBoard hook Doubt Pin
_anil_20-Sep-06 0:02
_anil_20-Sep-06 0:02 
GeneralRe: KeyBoard hook Doubt Pin
Naveen20-Sep-06 2:11
Naveen20-Sep-06 2:11 
Questionedit control how to get deleted text Pin
harsha_123419-Sep-06 22:37
harsha_123419-Sep-06 22:37 
AnswerRe: edit control how to get deleted text Pin
Rinu_Raj19-Sep-06 22:46
Rinu_Raj19-Sep-06 22:46 
GeneralRe: edit control how to get deleted text Pin
harsha_123419-Sep-06 22:55
harsha_123419-Sep-06 22:55 
GeneralRe: edit control how to get deleted text Pin
Rinu_Raj19-Sep-06 23:08
Rinu_Raj19-Sep-06 23:08 
AnswerRe: edit control how to get deleted text Pin
toxcct19-Sep-06 22:48
toxcct19-Sep-06 22:48 
QuestionHow to display CStatic Pin
gomez_a19-Sep-06 22:33
gomez_a19-Sep-06 22:33 
AnswerRe: How to display CStatic Pin
Rinu_Raj19-Sep-06 22:39
Rinu_Raj19-Sep-06 22:39 
GeneralRe: How to display CStatic Pin
gomez_a19-Sep-06 23:58
gomez_a19-Sep-06 23:58 
AnswerRe: How to display CStatic Pin
Rinu_Raj20-Sep-06 0:03
Rinu_Raj20-Sep-06 0:03 
GeneralRe: How to display CStatic Pin
gomez_a20-Sep-06 1:19
gomez_a20-Sep-06 1:19 
GeneralRe: How to display CStatic Pin
Rinu_Raj20-Sep-06 1:49
Rinu_Raj20-Sep-06 1:49 
GeneralRe: How to display CStatic Pin
gomez_a20-Sep-06 2:34
gomez_a20-Sep-06 2:34 
GeneralRe: How to display CStatic Pin
David Crow20-Sep-06 2:53
David Crow20-Sep-06 2:53 
QuestionRe: How to display CStatic Pin
David Crow20-Sep-06 2:56
David Crow20-Sep-06 2:56 
QuestionSQL Server [modified] Pin
Bravoone_200619-Sep-06 22:31
Bravoone_200619-Sep-06 22:31 

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.