J
JigglyBit
Guest
Hi,
I am looking to automatically identify if a CDC device is plugged in to a USB port (or rather driver). Right now I am opening a handle to it like this.
serialHandle = CreateFile(L"\\\\.\\COM4", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
I haven't been able to find much in libraries but assuming it must be possible to interrogate com ports and properties. By this I mean something similar to manually going to Device Manager->Ports (COM & LPT)->Properties->Details. From there quite a bit of information about driver and manufacturer is present. Wondering if I can do a compare of certain parameters in this list sequentially scanning through utilized com ports to replace the above manually declared handle in the function. End goal would be that if I see a driver authored by "Company XYZ" or by driver ID I would automatically initialize to it since ports are dynamic between machines. Not necessarily looking for code examples in response to post, rather just decent reading material on the topic since I haven't been able to find much of anything. Thanks.
Graphics post update.
Continue reading...
I am looking to automatically identify if a CDC device is plugged in to a USB port (or rather driver). Right now I am opening a handle to it like this.
serialHandle = CreateFile(L"\\\\.\\COM4", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
I haven't been able to find much in libraries but assuming it must be possible to interrogate com ports and properties. By this I mean something similar to manually going to Device Manager->Ports (COM & LPT)->Properties->Details. From there quite a bit of information about driver and manufacturer is present. Wondering if I can do a compare of certain parameters in this list sequentially scanning through utilized com ports to replace the above manually declared handle in the function. End goal would be that if I see a driver authored by "Company XYZ" or by driver ID I would automatically initialize to it since ports are dynamic between machines. Not necessarily looking for code examples in response to post, rather just decent reading material on the topic since I haven't been able to find much of anything. Thanks.
Graphics post update.
Continue reading...