Click here to Skip to main content
15,921,062 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionproblem with overriding "OnIdle" method of WinApp Pin
Banks K17-Jul-07 3:23
Banks K17-Jul-07 3:23 
AnswerRe: problem with overriding "OnIdle" method of WinApp Pin
Mark Salsbery17-Jul-07 6:00
Mark Salsbery17-Jul-07 6:00 
GeneralRe: problem with overriding "OnIdle" method of WinApp Pin
Banks K17-Jul-07 21:06
Banks K17-Jul-07 21:06 
GeneralRe: problem with overriding "OnIdle" method of WinApp Pin
Mark Salsbery18-Jul-07 5:39
Mark Salsbery18-Jul-07 5:39 
QuestionHow to find list of connected USB devices to the system? Pin
mss8117-Jul-07 3:21
mss8117-Jul-07 3:21 
GeneralRe: How to find list of connected USB devices to the system? Pin
Matthew Faithfull17-Jul-07 3:29
Matthew Faithfull17-Jul-07 3:29 
GeneralRe: How to find list of connected USB devices to the system? Pin
mss8117-Jul-07 3:41
mss8117-Jul-07 3:41 
AnswerRe: How to find list of connected USB devices to the system? Pin
Matthew Faithfull17-Jul-07 4:11
Matthew Faithfull17-Jul-07 4:11 
OK It sounds like you're most of the way there. You'll probably have something similar to this example this example[^] by now.

You need the GUID for USB devices, GUID_DEVCLASS_USB which lives in devguid.h which is part of the DDK. For maximum compatibility I used the one from \inc\w2k in the 3790.1803 version of the DDK which is available here[^]. You may be able to get this definition from the SDK headers these days, I'm not sure. If all you want is the USB devices of whatever type then that should be enough. If you want devices of a specific type e.g. disks then a call like this might be needed.
<br />
hIntDevInfo = SetupDiGetClassDevs (<br />
			 (LPGUID)&DiskClassGuid,<br />
			 NULL,                                   // Enumerator<br />
			 NULL,                                   // Parent Window<br />
			 (DIGCF_PRESENT | DIGCF_INTERFACEDEVICE  // Only Devices present & Interface class<br />
			 ));<br />


The device type GUIDS like DiskClassGuid come out of winioctl.h

If you get a neat solution working I suggest you write that article yourself. You'll be a CP hero in no time Big Grin | :-D


Nothing is exactly what it seems but everything with seems can be unpicked.

AnswerRe: How to find list of connected USB devices to the system? Pin
David Crow17-Jul-07 6:45
David Crow17-Jul-07 6:45 
Questionactivating windows Pin
minkowski17-Jul-07 2:59
minkowski17-Jul-07 2:59 
AnswerRe: activating windows Pin
toxcct17-Jul-07 3:11
toxcct17-Jul-07 3:11 
GeneralRe: activating windows Pin
minkowski17-Jul-07 3:36
minkowski17-Jul-07 3:36 
AnswerRe: activating windows Pin
David Crow17-Jul-07 6:49
David Crow17-Jul-07 6:49 
QuestionReturning an array of BSTR from the COM Component Pin
Raj Prathap17-Jul-07 2:26
Raj Prathap17-Jul-07 2:26 
AnswerRe: Returning an array of BSTR from the COM Component Pin
LoveCPlusplus18-Jul-07 0:24
LoveCPlusplus18-Jul-07 0:24 
GeneralRe: Returning an array of BSTR from the COM Component Pin
Raj Prathap18-Jul-07 20:18
Raj Prathap18-Jul-07 20:18 
Questionfstream question Pin
Programm3r17-Jul-07 1:28
Programm3r17-Jul-07 1:28 
AnswerRe: fstream question Pin
CPallini17-Jul-07 2:10
mveCPallini17-Jul-07 2:10 
QuestionRe: fstream question Pin
Programm3r17-Jul-07 2:23
Programm3r17-Jul-07 2:23 
AnswerRe: fstream question Pin
CPallini17-Jul-07 2:31
mveCPallini17-Jul-07 2:31 
AnswerRe: fstream question Pin
toxcct17-Jul-07 3:09
toxcct17-Jul-07 3:09 
JokeRe: fstream question Pin
David Crow17-Jul-07 6:51
David Crow17-Jul-07 6:51 
GeneralRe: fstream question Pin
toxcct17-Jul-07 7:04
toxcct17-Jul-07 7:04 
AnswerRe: fstream question Pin
DevMentor.org17-Jul-07 6:58
DevMentor.org17-Jul-07 6:58 
QuestionMso97.dll Error Appear When Starting a Program Pin
Sammyuk17-Jul-07 0:48
Sammyuk17-Jul-07 0:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.