Can anyone help me with this.. I have gotten so close, but yet so far away.
Need this to be changed to where if the Value is 47 then a keyboard event will happen. The default value is 00. I have it running on a timer. Can anyone help?
---------------------------------------------------------------
ULONG Addr, Value; HRESULT hr; char *stop_at;
Addr = strtoul(m_RegAddr,&stop_at,36);
hr = Lib_RegRead(Addr, 1, &Value);
----------------------------------------------------------------
Tries so far (gonna need to ask for help from people)
Perhaps I could do something with this.... I want an event in between those 2 lines that will do a keyb_event, based on what the value is.. If its 00 or 16 or 47 or whatever.
Yeah this is what I need I guess.. thought it doesn't work.
September 28th, 2012, 08:26 AM
John E
Re: Need some help.
Assuming your code is valid (i.e. Lib_RegRead() and keybd_event() do actually whatever they're supposed to do) surely you just need something like this:-
Code:
hr = Lib_RegRead(Addr, 1, &Value);
if (Value == 47)
{
keybd_event(0x21, 0, 0, 0);
}
Are you trying to simulate a keypress event? That's a very unusual thing to do in Windows programming.