The control TLC would be reported in the hid report descriptor vmulti returns to hidclass. Given the code below, the CDO option is not being used
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Thursday, March 26, 2015 9:51 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Driver-driver communication across different device stacks
Okay thanks. I’m not too sure how if vmulti’s hidkmdf exposes a cdo or tlc because the hidkmdf.c in vmulti’s solution seems rather plain, or maybe I just don’t know what exactly to look for. In any case though, here is a code snippet where the vmulti app finds vmulti’s PDO:
HidD_GetHidGuid(&hidguid);
printf(“GUID: %x %x %x %x\n”, hidguid.Data1, hidguid.Data2, hidguid.Data3, hidguid.Data4);
hardwareDeviceInfo =
SetupDiGetClassDevs ((LPGUID)&hidguid,
NULL,
NULL, // Define no
(DIGCF_PRESENT |
DIGCF_INTERFACEDEVICE));
if (INVALID_HANDLE_VALUE == hardwareDeviceInfo)
{
printf(“SetupDiGetClassDevs failed: %x\n”, GetLastError());
return INVALID_HANDLE_VALUE;
}
deviceInterfaceData.cbSize = sizeof (SP_DEVICE_INTERFACE_DATA);
devInfoData.cbSize = sizeof(SP_DEVINFO_DATA);
//
// Enumerate devices of this interface class
//
printf("\n…looking for our HID device (with UP=0x%x "
“and Usage=0x%x)\n”, myUsagePage, myUsage);
for (i = 0; SetupDiEnumDeviceInterfaces (hardwareDeviceInfo,
0, // No care about specific PDOs
(LPGUID)&hidguid,
i, //
&deviceInterfaceData);
i++)
{
//
// Open the device interface and Check if it is our device
// by matching the Usage page and Usage from Hid_Caps.
// If this is our device then send the hid request.
//
HANDLE file = OpenDeviceInterface(hardwareDeviceInfo, &deviceInterfaceData, myUsagePage, myUsage);
if (file != INVALID_HANDLE_VALUE)
{
SetupDiDestroyDeviceInfoList (hardwareDeviceInfo);
return file;
}
//
//device was not found so loop around.
//
}
printf(“Failure: Could not find our HID device \n”);
Please let me know if this is more or less what you were asking for when you asked how does the app configure vmulti?
NTDEV is sponsored by OSR
Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
OSR is HIRING!! See http://www.osr.com/careers
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer