A Windows Vista forum. Vista Banter

Welcome to Vista Banter.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to ask questions and reply to others posts, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

Go Back   Home » Vista Banter forum » Microsoft Windows Vista » Hardware and Windows Vista
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Hardware and Windows Vista Hardware issues in relation to Windows Vista. (microsoft.public.windows.vista.hardware_devices)

How could I get a USB Flash disk's drive letter?



 
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old January 26th 07, 03:08 AM posted to microsoft.public.windows.vista.hardware_devices
ChuYuan
external usenet poster
 
Posts: 1
Default How could I get a USB Flash disk's drive letter?

In XP, I used these functions to get a usb device volume to compare, but it
cannot work in Vista
SetupDiGetClassDev == get GUID_DEVINTERFACE_VOLUME device
SetupDiEnumDeviceInterface == get all volume device
CM_Get_Parent twice == get device id for USB
GetVolumeNameForVolumeMountPoint == compare

Might anybody help me?
Thx,

  #2 (permalink)  
Old January 26th 07, 10:58 AM posted to microsoft.public.windows.vista.hardware_devices
Uwe Sieber
external usenet poster
 
Posts: 90
Default How could I get a USB Flash disk's drive letter?

ChuYuan wrote:
In XP, I used these functions to get a usb device volume to compare, but it
cannot work in Vista
SetupDiGetClassDev == get GUID_DEVINTERFACE_VOLUME device
SetupDiEnumDeviceInterface == get all volume device
CM_Get_Parent twice == get device id for USB
GetVolumeNameForVolumeMountPoint == compare

Might anybody help me?


Yes, this has changed in Vista. DRIVE_REMOVABLE drives are now handled
as DRIVE_FIXED drives are under XP.
Have a look at my sample project, it explains it:
http://www.codeproject.com/system/Re...veByLetter.asp


Uwe


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 07:27 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Optimization by vBSEO 3.0.0 RC6
Copyright ©2004-2024 Vista Banter.
The comments are property of their posters.