Click here to Skip to main content
15,899,754 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalifstream and skipws Pin
georgiek5027-Dec-02 1:15
georgiek5027-Dec-02 1:15 
GeneralRe: ifstream and skipws Pin
Taka Muraoka27-Dec-02 1:24
Taka Muraoka27-Dec-02 1:24 
GeneralHelp me to Release Resources! Pin
HellShrimp4free27-Dec-02 0:23
HellShrimp4free27-Dec-02 0:23 
GeneralRe: Help me to Release Resources! Pin
Mike Nordell27-Dec-02 1:05
Mike Nordell27-Dec-02 1:05 
GeneralGlobals and condition compilation Pin
georgiek5026-Dec-02 22:39
georgiek5026-Dec-02 22:39 
GeneralRe: Globals and condition compilation Pin
Roger Allen27-Dec-02 0:05
Roger Allen27-Dec-02 0:05 
GeneralRe: Globals and condition compilation Pin
georgiek5027-Dec-02 1:14
georgiek5027-Dec-02 1:14 
GeneralMemory Address Interpretation Pin
Dominik Reichl26-Dec-02 22:20
Dominik Reichl26-Dec-02 22:20 
Hello,

yesterday I've found a nice manual on memory addresses. A part:

--------K-M00400017--------------------------
MEM 0040h:0017h - KEYBOARD - STATUS FLAGS 1
Size:	BYTE
SeeAlso: MEM 0040h:0018h,INT 16/AH=02h,MEM 0040h:0096h

Bitfields for keyboard status flags 1:
Bit(s)	Description	(Table M0010)
 7	INSert active
 6	Caps Lock active
 5	Num Lock active
 4	Scroll Lock active
 3	either Alt pressed
 2	either Ctrl pressed
 1	Left Shift pressed
 0	Right Shift pressed
SeeAlso: #M0011,#00587


Now my question: How can I read this byte?
I tried this code:

unsigned char uTemp;
unsigned char *pNull = NULL;
uTemp = pNull[0x00400017];

char szTemp[32];
sprintf(szTemp, "%02X", uTemp);
MessageBox(GetDesktopWindow(), szTemp, "clock", NULL);


But it always prints "00", zero. But numlock is on! Therefor I think i misinterpret the address.

Whats the correct memory address for pNull[] to read from? How must I convert the "0040h:0017h"? Confused | :confused:

Thank you!
-Dominik
GeneralRe: Memory Address Interpretation Pin
Joaquín M López Muñoz26-Dec-02 22:34
Joaquín M López Muñoz26-Dec-02 22:34 
GeneralRe: Memory Address Interpretation Pin
Dominik Reichl27-Dec-02 0:29
Dominik Reichl27-Dec-02 0:29 
GeneralRe: Memory Address Interpretation Pin
Mike Nordell27-Dec-02 1:12
Mike Nordell27-Dec-02 1:12 
GeneralRe: Memory Address Interpretation Pin
Dominik Reichl27-Dec-02 3:43
Dominik Reichl27-Dec-02 3:43 
GeneralGetView FROM OnNewDoucment() Pin
Hockey26-Dec-02 22:08
Hockey26-Dec-02 22:08 
GeneralRe: GetView FROM OnNewDoucment() Pin
super26-Dec-02 22:17
professionalsuper26-Dec-02 22:17 
GeneralRe: GetView FROM OnNewDoucment() Pin
pba_27-Dec-02 8:06
pba_27-Dec-02 8:06 
Generalhandling multiple frame windows Pin
Thanh Ly26-Dec-02 21:31
Thanh Ly26-Dec-02 21:31 
GeneralRe: handling multiple frame windows Pin
Joaquín M López Muñoz26-Dec-02 21:39
Joaquín M López Muñoz26-Dec-02 21:39 
GeneralRe: handling multiple frame windows Pin
Thanh Ly26-Dec-02 21:47
Thanh Ly26-Dec-02 21:47 
QuestionHow to define the full path of my application Pin
julych26-Dec-02 20:14
julych26-Dec-02 20:14 
AnswerRe: How to define the full path of my application Pin
Joaquín M López Muñoz26-Dec-02 20:22
Joaquín M López Muñoz26-Dec-02 20:22 
GeneralClass in Visual C++ !! Pin
HellShrimp4free26-Dec-02 19:56
HellShrimp4free26-Dec-02 19:56 
GeneralRe: Class in Visual C++ !! Pin
super26-Dec-02 21:29
professionalsuper26-Dec-02 21:29 
GeneralRe: Class in Visual C++ !! Pin
Pavel Klocek26-Dec-02 22:41
Pavel Klocek26-Dec-02 22:41 
GeneralLooking for a list/tree-like control Pin
Loren Wilton26-Dec-02 19:52
Loren Wilton26-Dec-02 19:52 
QuestionCScrollView active? Pin
Dov Sherman26-Dec-02 19:15
Dov Sherman26-Dec-02 19:15 

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.