Click here to Skip to main content
15,909,742 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Internet Explorer is 'Work Offline' Pin
ThatsAlok16-May-05 21:26
ThatsAlok16-May-05 21:26 
GeneralRe: Internet Explorer is 'Work Offline' Pin
Imtiaz Murtaza16-May-05 22:19
Imtiaz Murtaza16-May-05 22:19 
GeneralRe: Internet Explorer is 'Work Offline' Pin
James R. Twine17-May-05 0:35
James R. Twine17-May-05 0:35 
GeneralSOAP initialize Pin
lvantin16-May-05 16:46
lvantin16-May-05 16:46 
QuestionHow to get the PhysicalDrive number which the logical drive located? Pin
EastDragon16-May-05 16:26
EastDragon16-May-05 16:26 
AnswerRe: How to get the PhysicalDrive number which the logical drive located? Pin
ThatsAlok16-May-05 18:03
ThatsAlok16-May-05 18:03 
AnswerRe: How to get the PhysicalDrive number which the logical drive located? Pin
Tuscon16-May-05 20:21
Tuscon16-May-05 20:21 
GeneralRe: How to get the PhysicalDrive number which the logical drive located? Pin
James R. Twine17-May-05 0:21
James R. Twine17-May-05 0:21 
   Hmmm.  How about:
<br />
TCHAR caVolumeNameBuffer[ 100 ];<br />
DWORD dwVolumeSerialNumber = 0;<br />
DWORD dwMaximumComponentLength = 0;<br />
DWORD dwFileSystemFlags = 0;<br />
TCHAR caFileSystemNameBuffer[ 100 ];<br />
<br />
GetVolumeInformation( _T( "C:\\" ), caVolumeNameBuffer, 100, &dwVolumeSerialNumber, &dwMaximumComponentLength, &dwFileSystemFlags, caFileSystemNameBuffer, 100 );<br />

   Your example was not passing in valid pointers, only uninitialized ones.  Might want to ensure proper termination of the TCHAR buffers as well.

   However, I think the OP was asking about the physical device name for the drive, not its serial number; I think they were looking for information such as if a drive is \\.\PhysicalDrive0 or \\.\PhysicalDrive1, etc.  You need that information to open the device itself (the hard drive itself) to do things like send IOCTLs.  I do not think that the function you specified will return that information.

   Peace!

-=- James
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
DeleteFXPFiles & CheckFavorites
(Please rate this post!)
AnswerRe: How to get the PhysicalDrive number which the logical drive located? Pin
James R. Twine17-May-05 0:30
James R. Twine17-May-05 0:30 
GeneralRe: How to get the PhysicalDrive number which the logical drive located? Pin
EastDragon17-May-05 14:28
EastDragon17-May-05 14:28 
GeneralAdding Text to DIB Pin
Naveen_mah16-May-05 14:23
Naveen_mah16-May-05 14:23 
GeneralRe: Adding Text to DIB Pin
Christian Graus16-May-05 14:26
protectorChristian Graus16-May-05 14:26 
GeneralRe: Adding Text to DIB Pin
Naveen_mah16-May-05 20:56
Naveen_mah16-May-05 20:56 
GeneralRe: Adding Text to DIB Pin
Christian Graus17-May-05 12:51
protectorChristian Graus17-May-05 12:51 
GeneralRe: Adding Text to DIB Pin
Naveen_mah17-May-05 14:18
Naveen_mah17-May-05 14:18 
GeneralRe: Adding Text to DIB Pin
Christian Graus17-May-05 14:24
protectorChristian Graus17-May-05 14:24 
GeneralRe: Adding Text to DIB Pin
Naveen_mah17-May-05 18:49
Naveen_mah17-May-05 18:49 
GeneralRe: Adding Text to DIB Pin
Christian Graus17-May-05 18:51
protectorChristian Graus17-May-05 18:51 
GeneralRe: Adding Text to DIB Pin
Naveen_mah18-May-05 18:14
Naveen_mah18-May-05 18:14 
GeneralRe: Adding Text to DIB Pin
Christian Graus18-May-05 18:55
protectorChristian Graus18-May-05 18:55 
GeneralCreating a dialog based application... Pin
elvis890016-May-05 11:07
elvis890016-May-05 11:07 
GeneralRe: Creating a dialog based application... Pin
Ravi Bhavnani16-May-05 12:01
professionalRavi Bhavnani16-May-05 12:01 
GeneralRe: Creating a dialog based application... Pin
ucc80116-May-05 20:17
ucc80116-May-05 20:17 
Generalprint screen Pin
gobar16-May-05 10:59
gobar16-May-05 10:59 
GeneralRe: print screen Pin
jc0dex16-May-05 11:46
jc0dex16-May-05 11:46 

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.