Click here to Skip to main content
15,900,110 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalabout domain Pin
yingkou14-Sep-04 14:44
yingkou14-Sep-04 14:44 
GeneralRe: about domain Pin
Ryan Binns14-Sep-04 18:14
Ryan Binns14-Sep-04 18:14 
GeneralRe: about domain Pin
yingkou14-Sep-04 18:40
yingkou14-Sep-04 18:40 
GeneralRe: about domain Pin
Ryan Binns14-Sep-04 22:57
Ryan Binns14-Sep-04 22:57 
Generalwin32 multi-threading Pin
stevieo8414-Sep-04 14:31
stevieo8414-Sep-04 14:31 
GeneralRe: win32 multi-threading Pin
CodyDaemon14-Sep-04 15:51
CodyDaemon14-Sep-04 15:51 
GeneralRe: win32 multi-threading Pin
stevieo8414-Sep-04 16:28
stevieo8414-Sep-04 16:28 
QuestionKBDLLHOOKSTRUCT error why? Pin
zubeido14-Sep-04 13:37
zubeido14-Sep-04 13:37 
HHOOK hKeyHook;

__declspec(dllexport)
LRESULT CALLBACK KeyEvent (int nCode,WPARAM wParam, LPARAM lParam)

{
if( (nCode= HC_ACTION) && ( (wParam = WM_SYSKEYDOWN) || (wParam = WM_KEYDOWN) ) )
{


KBDLLHOOKSTRUCT hooked *= *((KBDLLHOOKSTRUCT*)lParam);
DWORD dwMsg;


dwMsg += hooked.scanCode <<16;
dwMsg += hooked.flags << 24;

char lpszName[0x100] = {0};

lpszName[0] = '[';

int i= GetKeyNameText(dwMsg,(lpszName+1),0xff) +1;
lpszName[i] = ']';
printf(lpszName);
}

I want to hook the keyboard but the KBDLLHOOKSTRUCT struct keeps giving error even with the intelisense showing the members of the struct.
I dont really get it

Here are the errors

error C2065: 'KBDLLHOOKSTRUCT' : undeclared identifier
error C2059: syntax error : ')'

among other stupid errors.
Can anyone help me?
Tks in advance
AnswerRe: KBDLLHOOKSTRUCT error why? Pin
Anonymous14-Sep-04 15:46
Anonymous14-Sep-04 15:46 
AnswerRe: KBDLLHOOKSTRUCT error why? Pin
Blake Miller15-Sep-04 4:16
Blake Miller15-Sep-04 4:16 
GeneralPInvoke Context menus Pin
Jumpin' Jeff14-Sep-04 13:19
Jumpin' Jeff14-Sep-04 13:19 
GeneralRe: PInvoke Context menus Pin
Jörgen Sigvardsson14-Sep-04 13:33
Jörgen Sigvardsson14-Sep-04 13:33 
GeneralRe: PInvoke Context menus Pin
Jumpin' Jeff14-Sep-04 15:56
Jumpin' Jeff14-Sep-04 15:56 
GeneralRe: PInvoke Context menus Pin
Jörgen Sigvardsson14-Sep-04 22:40
Jörgen Sigvardsson14-Sep-04 22:40 
GeneralRe: PInvoke Context menus Pin
Jumpin' Jeff15-Sep-04 2:28
Jumpin' Jeff15-Sep-04 2:28 
GeneralRe: PInvoke Context menus Pin
Jörgen Sigvardsson15-Sep-04 2:35
Jörgen Sigvardsson15-Sep-04 2:35 
GeneralRe: PInvoke Context menus Pin
Jumpin' Jeff15-Sep-04 4:49
Jumpin' Jeff15-Sep-04 4:49 
Generallistctrl WM_MOUSEMOVE Pin
ski2sky14-Sep-04 12:47
ski2sky14-Sep-04 12:47 
GeneralRe: listctrl WM_MOUSEMOVE Pin
Ryan Binns14-Sep-04 18:26
Ryan Binns14-Sep-04 18:26 
GeneralRe: listctrl WM_MOUSEMOVE Pin
ski2sky15-Sep-04 4:38
ski2sky15-Sep-04 4:38 
GeneralCImageList - using icons Pin
BlackDice14-Sep-04 11:25
BlackDice14-Sep-04 11:25 
GeneralRe: CImageList - using icons Pin
Roger Allen14-Sep-04 12:11
Roger Allen14-Sep-04 12:11 
GeneralRe: CImageList - using icons Pin
Jörgen Sigvardsson14-Sep-04 13:28
Jörgen Sigvardsson14-Sep-04 13:28 
GeneralI like some info Pin
Way_newBe14-Sep-04 11:04
Way_newBe14-Sep-04 11:04 
GeneralFUNCTION HELP! Pin
ISUstudent14-Sep-04 10:48
ISUstudent14-Sep-04 10:48 

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.