Click here to Skip to main content
15,888,454 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Gdplus::Color to DWORD Pin
bob1697212-Mar-11 11:06
bob1697212-Mar-11 11:06 
GeneralRe: Gdplus::Color to DWORD Pin
csrss12-Mar-11 19:46
csrss12-Mar-11 19:46 
QuestionDebug Error While Running Program on Other Computer Pin
AmbiguousName12-Mar-11 7:20
AmbiguousName12-Mar-11 7:20 
AnswerRe: Debug Error While Running Program on Other Computer Pin
Code-o-mat12-Mar-11 8:53
Code-o-mat12-Mar-11 8:53 
QuestionUSB devices list [modified] Pin
fasked12-Mar-11 3:12
fasked12-Mar-11 3:12 
AnswerRe: USB devices list Pin
Hans Dietrich12-Mar-11 4:53
mentorHans Dietrich12-Mar-11 4:53 
GeneralRe: USB devices list Pin
fasked12-Mar-11 5:23
fasked12-Mar-11 5:23 
AnswerRe: USB devices list Pin
Luc Pattyn12-Mar-11 6:05
sitebuilderLuc Pattyn12-Mar-11 6:05 
Hi,

I don't know the functions you are using. Here is what I have used so far:

1.
GetDriveType(string rootPathName) which is a kernel32 function. It returns one of:
/// 0 (DRIVE_UNKNOWN) The drive type cannot be determined.
/// 1 (DRIVE_NO_ROOT_DIR) The root path is invalid. (no volume is mounted at the path).
/// 2 (DRIVE_REMOVABLE) The disk can be removed from the drive.
/// 3 (DRIVE_FIXED) The disk cannot be removed from the drive.
/// 4 (DRIVE_REMOTE) The drive is a remote (network) drive.
/// 5 (DRIVE_CDROM) The drive is a CD-ROM drive.
/// 6 (DRIVE_RAMDISK) The drive is a RAM disk.

Maybe that is sufficient for your needs.

2.
If not, I would have to recommend WMI; warning: it is a bit of a puzzle. The relevant WMI classes would be Win32_DiskDrive, Win32_LogicalDiskToPartition, Win32_PhysicalMedia. And IIRC the drives come in the same order when querying Win32_PhysicalMedia and Win32_DiskDrive.

Smile | :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.

QuestionHow to create a process with a different, really restricted user account? Pin
Member 774798412-Mar-11 1:56
Member 774798412-Mar-11 1:56 
AnswerRe: How to create a process with a different, really restricted user account? Pin
Hans Dietrich12-Mar-11 4:57
mentorHans Dietrich12-Mar-11 4:57 
QuestionMove items in ListControl Pin
rjkg11-Mar-11 19:59
rjkg11-Mar-11 19:59 
AnswerRe: Move items in ListControl Pin
Richard MacCutchan11-Mar-11 22:16
mveRichard MacCutchan11-Mar-11 22:16 
GeneralRe: Move items in ListControl Pin
rjkg11-Mar-11 22:44
rjkg11-Mar-11 22:44 
GeneralRe: Move items in ListControl Pin
Richard MacCutchan11-Mar-11 23:15
mveRichard MacCutchan11-Mar-11 23:15 
AnswerRe: Move items in ListControl Pin
Hans Dietrich12-Mar-11 5:23
mentorHans Dietrich12-Mar-11 5:23 
QuestionCannot change the bitmap Pin
leorex11-Mar-11 15:10
leorex11-Mar-11 15:10 
AnswerRe: Cannot change the bitmap Pin
bob1697211-Mar-11 16:36
bob1697211-Mar-11 16:36 
QuestionWM_LBUTTONDBLCLK not being sent? Pin
softwaremonkey11-Mar-11 12:02
softwaremonkey11-Mar-11 12:02 
AnswerRe: WM_LBUTTONDBLCLK not being sent? Pin
Hans Dietrich11-Mar-11 13:19
mentorHans Dietrich11-Mar-11 13:19 
AnswerRe: WM_LBUTTONDBLCLK not being sent? Pin
Joan M12-Mar-11 4:59
professionalJoan M12-Mar-11 4:59 
GeneralRe: WM_LBUTTONDBLCLK not being sent - Solved! Pin
softwaremonkey12-Mar-11 5:48
softwaremonkey12-Mar-11 5:48 
GeneralRe: WM_LBUTTONDBLCLK not being sent - Solved! Pin
Joan M13-Mar-11 22:22
professionalJoan M13-Mar-11 22:22 
GeneralRe: WM_LBUTTONDBLCLK not being sent - Solved! Pin
SledgeHammer0114-Mar-11 11:10
SledgeHammer0114-Mar-11 11:10 
QuestionHelp regarding compiling a library Pin
faheemnadeem11-Mar-11 9:35
faheemnadeem11-Mar-11 9:35 
QuestionWhy does BitBlt not work right? Pin
Kaaib11-Mar-11 9:20
Kaaib11-Mar-11 9:20 

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.