
Software Guide
9.2.1.2CHidManager Class Methods
Table 9-2. CHidManagerClass Methods
| Method | Type | Description |
|
| Create() | Public | This method creates an invisible window and uses the returned win- | |
|
|
| dow handle to register for HID device notification events, then it cre- | |
|
|
| ates a list of existing HID devices that will be maintained by the HID | |
|
|
| manager. |
|
| IsHidDevicePresent() | Public | This method attempts to open a handle to the HID device to deter- | |
|
|
| mine if it is present (or not) and returns the result. |
|
| RefreshHidDevices() | Public | This method validates that all HID devices in the list are still present, | |
|
|
| removes those from the list that are currently not present, scans the | |
|
|
| list of all existing HID devices present, and then attempts to add the | |
|
|
| existing HID devices to the list. |
|
| GetDeviceCount() | Public | This method returns the number of connected devices. |
|
| GetFirstHidDevice() | Public | This method returns a pointer to the first HID device in the list. |
|
| GetNextHidDevice() | Public | This method returns a pointer to the next HID device in the list. |
|
| GetCurrentHidDevice() | Public | This method returns a pointer to the current HID device in the list. |
|
| GetHidDeviceWithPath() | Public | This method scans the current list of HID devices and returns a |
|
|
|
| pointer to the HID device that matches the device path provided. |
|
| GetHidDevice | Public | This method scans the current list of HID devices and returns a |
|
| WithHandle() |
| pointer to the HID device that matches the device handle provided. | |
|
|
|
| |
| HidDeviceAlreadyExists() | Public | This method determines if the HID device already exists in the list |
|
| AddHidDevice() | Public | This method checks if the provided HID device already exists, and if | |
|
|
| not, adds the new HID device to the end of the list, increments the |
|
|
|
| HID device counter, and call the HID callback function to indicate a | |
|
|
| new HID device was added. |
|
| RemoveHidDevice() | Public | This method closes the outstanding handle to the HID device, calls | |
|
|
| the HID callback function to indicate that the HID device is being |
|
|
|
| removed, removes the HID device from the list, and deletes the HID | |
|
|
| device. |
|
| RemoveAllHidDevices() | Public | This method scans though all HID devices in the list and removes |
|
|
|
| them. |
|
| CreateUniqueDeviceID() | Public | This method attempts to create and maintain a unique ID for the |
|
|
|
| associated HID device. |
|
| FreeUniqueDeviceID() | Public | This method frees the specified unique ID. |
|
| NewHidDevice() | Protected | This method allocates memory for a new HID device structure |
|
| DeleteHidDevice() | Protected | This method deletes previously allocated memory for an existing HID | |
|
|
| device structure. |
|
| RegisterHidNotification() | Protected | This method registers for notification of events for all HID devices and | |
|
|
| calls the HID callback function to indicate registration was completed. | |
| HidDeviceArrival() | Protected | This method makes sure the HID device does not already exist in the | |
|
|
| list, and then creates a new HID device, opens a handle to the |
|
|
|
| device, adds the new HID device to the list, and registers event notifi- | |
|
|
| cation for this new HID device. |
|
| HidDeviceQuery | Protected | This method readies the HID device for removal by making sure the | |
| Removal() |
| handle is closed. |
|
|
|
|
| |
| HidDeviceRemoval() | Protected | This method removes the HID device. |
|
CY4672 Reference Design Guide, Document # | 113 |
[+] Feedback