Click here to Skip to main content
15,850,606 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMicrosoft Detours 1.5 Complete API Documentations needed. Pin
Ricky Gai20-Sep-06 0:20
Ricky Gai20-Sep-06 0:20 
AnswerRe: Microsoft Detours 1.5 Complete API Documentations needed. Pin
SSDream7-Sep-09 5:35
SSDream7-Sep-09 5:35 
QuestionShared object between 2 DLLs Pin
AbhishekBK20-Sep-06 0:18
AbhishekBK20-Sep-06 0:18 
QuestionMicrosoft Detours 1.5 API documentations required. Pin
Ricky Gai20-Sep-06 0:17
Ricky Gai20-Sep-06 0:17 
QuestionKeyBoard hook Doubt Pin
_anil_20-Sep-06 0:06
_anil_20-Sep-06 0:06 
AnswerRe: KeyBoard hook Doubt Pin
Naveen20-Sep-06 0:31
Naveen20-Sep-06 0:31 
GeneralRe: KeyBoard hook Doubt Pin
_anil_20-Sep-06 0:40
_anil_20-Sep-06 0:40 
GeneralRe: KeyBoard hook Doubt Pin
Naveen20-Sep-06 0:55
Naveen20-Sep-06 0: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 1:02
_anil_20-Sep-06 1:02 
GeneralRe: KeyBoard hook Doubt Pin
Naveen20-Sep-06 3:11
Naveen20-Sep-06 3:11 
Questionedit control how to get deleted text Pin
harsha_123419-Sep-06 23:37
harsha_123419-Sep-06 23:37 
AnswerRe: edit control how to get deleted text Pin
Rinu_Raj19-Sep-06 23:46
Rinu_Raj19-Sep-06 23:46 
GeneralRe: edit control how to get deleted text Pin
harsha_123419-Sep-06 23:55
harsha_123419-Sep-06 23:55 
GeneralRe: edit control how to get deleted text Pin
Rinu_Raj20-Sep-06 0:08
Rinu_Raj20-Sep-06 0:08 
AnswerRe: edit control how to get deleted text Pin
toxcct19-Sep-06 23:48
toxcct19-Sep-06 23:48 
QuestionHow to display CStatic Pin
gomez_a19-Sep-06 23:33
gomez_a19-Sep-06 23:33 
AnswerRe: How to display CStatic Pin
Rinu_Raj19-Sep-06 23:39
Rinu_Raj19-Sep-06 23:39 
GeneralRe: How to display CStatic Pin
gomez_a20-Sep-06 0:58
gomez_a20-Sep-06 0:58 
AnswerRe: How to display CStatic Pin
Rinu_Raj20-Sep-06 1:03
Rinu_Raj20-Sep-06 1:03 
GeneralRe: How to display CStatic Pin
gomez_a20-Sep-06 2:19
gomez_a20-Sep-06 2:19 
GeneralRe: How to display CStatic Pin
Rinu_Raj20-Sep-06 2:49
Rinu_Raj20-Sep-06 2:49 
GeneralRe: How to display CStatic Pin
gomez_a20-Sep-06 3:34
gomez_a20-Sep-06 3:34 
GeneralRe: How to display CStatic Pin
David Crow20-Sep-06 3:53
David Crow20-Sep-06 3:53 
QuestionRe: How to display CStatic Pin
David Crow20-Sep-06 3:56
David Crow20-Sep-06 3:56 
QuestionSQL Server [modified] Pin
Bravoone_200619-Sep-06 23:31
Bravoone_200619-Sep-06 23: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.