Click here to Skip to main content
15,909,440 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Question%systemroot% Pin
dellthinker14-May-07 11:35
dellthinker14-May-07 11:35 
AnswerRe: %systemroot% Pin
Michael Dunn14-May-07 12:00
sitebuilderMichael Dunn14-May-07 12:00 
AnswerRe: %systemroot% Pin
KaЯl14-May-07 12:01
KaЯl14-May-07 12:01 
AnswerRe: %systemroot% Pin
Mark Salsbery14-May-07 12:06
Mark Salsbery14-May-07 12:06 
GeneralRe: %systemroot% Pin
dellthinker16-May-07 5:49
dellthinker16-May-07 5:49 
QuestionINF Install in Visual C Application Pin
rachis14-May-07 10:59
rachis14-May-07 10:59 
AnswerRe: INF Install in Visual C Application Pin
JudyL_MD15-May-07 3:59
JudyL_MD15-May-07 3:59 
QuestionReally Urgent, Keyboard Input using SendInput Pin
Mohammad A Gdeisat14-May-07 10:57
Mohammad A Gdeisat14-May-07 10:57 
Hi all,

I am sorry but its really urgent and I hope u will help me.

I use SendInput API function to emulate keystrokes like this:

void CKeyboardInput::KeyDown(WORD wVK)<br />
{<br />
	INPUT inKB;<br />
<br />
	::ZeroMemory(&inKB,sizeof(INPUT));<br />
<br />
	inKB.type=INPUT_KEYBOARD;<br />
	inKB.ki.wVk=wVK;<br />
<br />
	SendInput(1,&inKB,sizeof(INPUT));<br />
<br />
}


The code runs perfectly with all normal windows applications, however, this code doesnt work for some types of programs like Games, for example I want to send a key to move a car in Need for Speed II or in Driver but I failed to get it to work.

Anybody can point out any useful comments? why dont these apps respond to SendInput calls? and is there any workaround?

Waiting for good news

Thanks

Mohammad

And ever has it been that love knows not its own depth until the hour of separation

AnswerRe: Really Urgent, Keyboard Input using SendInput Pin
CPallini14-May-07 11:25
mveCPallini14-May-07 11:25 
GeneralRe: Really Urgent, Keyboard Input using SendInput Pin
Mohammad A Gdeisat14-May-07 20:25
Mohammad A Gdeisat14-May-07 20:25 
GeneralRe: Really Urgent, Keyboard Input using SendInput Pin
CPallini14-May-07 20:49
mveCPallini14-May-07 20:49 
QuestionQuestion about Harddrive writes Pin
godspeed12314-May-07 10:15
godspeed12314-May-07 10:15 
QuestionRe: Question about Harddrive writes Pin
JudyL_MD14-May-07 10:20
JudyL_MD14-May-07 10:20 
AnswerRe: Question about Harddrive writes Pin
godspeed12314-May-07 10:27
godspeed12314-May-07 10:27 
GeneralRe: Question about Harddrive writes Pin
David Crow14-May-07 10:39
David Crow14-May-07 10:39 
GeneralRe: Question about Harddrive writes Pin
godspeed12314-May-07 10:43
godspeed12314-May-07 10:43 
GeneralRe: Question about Harddrive writes Pin
pkyiu14-May-07 22:47
pkyiu14-May-07 22:47 
AnswerRe: Question about Harddrive writes Pin
skornel14-May-07 10:37
skornel14-May-07 10:37 
GeneralRe: Question about Harddrive writes Pin
godspeed12314-May-07 10:45
godspeed12314-May-07 10:45 
GeneralRe: Question about Harddrive writes Pin
skornel14-May-07 10:46
skornel14-May-07 10:46 
AnswerRe: Question about Harddrive writes Pin
David Crow14-May-07 10:51
David Crow14-May-07 10:51 
GeneralRe: Question about Harddrive writes Pin
Rajesh R Subramanian15-May-07 7:19
professionalRajesh R Subramanian15-May-07 7:19 
GeneralRe: Question about Harddrive writes Pin
David Crow15-May-07 7:50
David Crow15-May-07 7:50 
GeneralRe: Question about Harddrive writes Pin
Rajesh R Subramanian17-May-07 2:09
professionalRajesh R Subramanian17-May-07 2:09 
GeneralRe: Question about Harddrive writes Pin
David Crow17-May-07 2:31
David Crow17-May-07 2: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.