Platform SDK: DirectX |
The information in this topic pertains only to applications written in C++. See DirectInput Visual Basic Tutorials.
After your application sets the keyboard's behavior, it can acquire access to the device by calling the IDirectInputDevice7::Acquire method. The application must acquire the device before retrieving data from it. The Acquire method accepts no parameters.
The following line of code acquires the keyboard device that was created in Step 2: Create the DirectInput Keyboard Device:
if (g_lpDIDevice) g_lpDIDevice->Acquire();