i cannot get it to compile without seeing see declaration of blah blah blah. I clicked and i looked, and its not helpful at all. nor is the MS website.
Can you help me? an example would be great eg for a mouse or something. THANKSSSS
typedef struct tagRAWINPUTDEVICE { //Defines information for the raw input device
USHORT usUsagePage; /*Top level collection Usage page for the raw input device*/
USHORT usUsage; /*Top level collection Usage for the raw input device*/
DWORD dwFlags; /*Mode flag that specifies how to interpret the information provided by usUsagePage and usUsage*/
BOOL RegisterRawInputDevices ( //Registers the devices that supply the raw input data
PCRAWINPUTDEVICE pRawInputDevices, /*Pointer to an array of RAWINPUTDEVICE structure that represent the devices that supply the raw input*/
UINT uiNumDevices, /*Number of RAWINPUTDEVICE structures pointed to by pRawInputDevices*/
UINT cbSize ); //Size, in bytes, of a RAWINPUTDEVICE structure
if (RegisterRawInputDevices <= 0)
{
cout << GetLastError (); //Print out error if occurred
}
UINT GetRawInputDeviceList ( //Enumerates the raw input devices attached to the system
PRAWINPUTDEVICELIST pRawInputDeviceList,
/*Pointer tp buffer that holds an array of RAWINPUTDEVICELIST structures for the devices attached to the system*/
PUINT puiNumDevices, //Pointer to a variable
UINT cbSize ); /*Size of a RAWINPUTDEVICELIST structure*/
UINT GetRawInputDeviceInfo ( /*Gets information about the raw input device*/
HANDLE hDevice, //Handle to the raw input device
UINT uiCommand, //Specifies what data will be returned in pData
LPVOID pData, /*Pointer to a buffer that contains the information specified by uiCommand*/
PUINT pcbSize ); /*Pointer to a variable that contains the size, in bytes, of the data in pData*/
UINT GetRegisteredRawInputDevices ( /*Gets information about the raw input devices for the current application*/
PRAWINPUTDEVICE pRawInputDevices, /*Pointer tp an array pf RAWINPUTDEVICE structures for the application*/
PUINT puiNumDevices, /*Number of RAWINPUTDEVICE structure in *pRawInputDevices*/
UINT cbSize ); //Size, in bytes, of a RAWINPUTDEVICE structure
}
Ok this the layout format that i have written so far by looking at the msdn website. Can you guys help me out by pointing out the problems of how to fix it. Thanks so much