🔒 Locked
DirectInput Example
Advertisement
Original Post
hi ,
i''m looking for a simple application that uses DirectInput
in exclusive mode ( SetCooperativeLevel ).
can someone post a link for me ?
thanks
Setting a direct input device (mouse, keyboard, etc) to exclusive mode means that you will only be using 1 device.
Is this really what you want? to use JUST the mouse OR the keyboard in your program?
Is this really what you want? to use JUST the mouse OR the keyboard in your program?
quote:
Original post by RhoneRanger
Setting a direct input device (mouse, keyboard, etc) to exclusive mode means that you will only be using 1 device.
Is this really what you want? to use JUST the mouse OR the keyboard in your program?
correction: It means one device of the same type (Keyboard for instance) not: keyboard OR mouse etc..
From the docs:
DISCL_EXCLUSIVE
The application requires exclusive access. If exclusive access is granted, no other instance of the device can obtain exclusive access to the device while it is acquired. However, nonexclusive access to the device is always permitted, even if another application has obtained exclusive access.
____________________________________________________________
Try RealityRift at www.planetrift.com
Exactly!
quote:
Original post by RhoneRanger
Setting a direct input device (mouse, keyboard, etc) to exclusive mode means that you will only be using 1 device.
Is this really what you want? to use JUST the mouse OR the keyboard in your program?
thanks a lot for the info !
the problem is :
i play UnrealTournament a lot. so i decided to write a simple
keyboard hook program that will generate a sequence of keystrokes
on every specific stroke i want ( using SendInput ).
this program works well for MS Word , notepad and wordpad.
which means that when i hit my key i get a sequence of other keys. from some reason this fails when UT is running.
so i guess ut is using Exclusive mode on the keyboard.
this is why i need to check with a program that uses
exclusive mode.
any ideas are appreciated.
I would assume (not sure though) that they set this parameter in the setup
if(FAILED(Keyboard->SetCooperativeLevel(hWnd,
DISCL_FOREGROUND | DISCL_EXCLUSIVE)))
return E_FAIL;
This means that DirectX has TOTAL control over the keyboard (DISCL_FOREGROUND);
if(FAILED(Keyboard->SetCooperativeLevel(hWnd,
DISCL_FOREGROUND | DISCL_EXCLUSIVE)))
return E_FAIL;
This means that DirectX has TOTAL control over the keyboard (DISCL_FOREGROUND);
Okay, I know that.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement