Click here to Skip to main content
15,892,746 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: C + + by diary Pin
Hamid_RT29-May-09 4:16
Hamid_RT29-May-09 4:16 
JokeRe: C + + by diary Pin
David Crow29-May-09 5:16
David Crow29-May-09 5:16 
AnswerRe: C + + by diary Pin
CPallini29-May-09 7:56
mveCPallini29-May-09 7:56 
AnswerRe: C + + by diary Pin
molesworth29-May-09 12:18
molesworth29-May-09 12:18 
QuestionCView::OnFilePrintPreview() Pin
Software200729-May-09 3:08
Software200729-May-09 3:08 
Questionfile-handle is the same as volume-handle in kernel mode? Pin
xorio29-May-09 2:56
xorio29-May-09 2:56 
QuestionGet drive letter of Hard drive Pin
Madan Chauhan29-May-09 1:25
Madan Chauhan29-May-09 1:25 
AnswerRe: Get drive letter of Hard drive Pin
«_Superman_»29-May-09 2:37
professional«_Superman_»29-May-09 2:37 
Call GetLogicalDrives to get all the available drive letters.
Call GetSystemDirectory to get the drive which contains the OS.

Open the volume using CreateFile("\\.\C:", ...
Here replace C: with the drive letter returned in GetSystemDirectory.

Call DeviceIControl of the returned handle with the IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS code to get the hard disk number.

Now you know the hard disk number of the drive containing the OS.

Repeat the CreateFile and DeviceIoControl on all the other drive letters and compare the hard disk number with the one you got earlier.

«_Superman
I love work. It gives me something to do between weekends.

GeneralRe: Get drive letter of Hard drive Pin
Madan Chauhan29-May-09 20:08
Madan Chauhan29-May-09 20:08 
QuestionGetScrollBarCtrl( ) alternative api in win32. Pin
zakkas248329-May-09 1:20
zakkas248329-May-09 1:20 
QuestionRe: GetScrollBarCtrl( ) alternative api in win32. Pin
CPallini29-May-09 1:51
mveCPallini29-May-09 1:51 
AnswerRe: GetScrollBarCtrl( ) alternative api in win32. [modified] Pin
zakkas248329-May-09 1:59
zakkas248329-May-09 1:59 
AnswerRe: GetScrollBarCtrl( ) alternative api in win32. Pin
Nibu babu thomas29-May-09 1:52
Nibu babu thomas29-May-09 1:52 
GeneralRe: GetScrollBarCtrl( ) alternative api in win32. Pin
zakkas248329-May-09 2:10
zakkas248329-May-09 2:10 
QuestionRe: GetScrollBarCtrl( ) alternative api in win32. Pin
zakkas248329-May-09 2:12
zakkas248329-May-09 2:12 
AnswerRe: GetScrollBarCtrl( ) alternative api in win32. Pin
CPallini29-May-09 2:25
mveCPallini29-May-09 2:25 
GeneralRe: GetScrollBarCtrl( ) alternative api in win32. Pin
zakkas248329-May-09 2:28
zakkas248329-May-09 2:28 
QuestionHelp!! Pin
WebMaster29-May-09 0:37
WebMaster29-May-09 0:37 
AnswerRe: Help!! Pin
_AnsHUMAN_ 29-May-09 0:45
_AnsHUMAN_ 29-May-09 0:45 
AnswerRe: Help!! Pin
Chandrasekharan P29-May-09 1:23
Chandrasekharan P29-May-09 1:23 
AnswerRe: Help!! Pin
CPallini29-May-09 1:44
mveCPallini29-May-09 1:44 
AnswerRe: Help!! Pin
Rajesh R Subramanian29-May-09 1:51
professionalRajesh R Subramanian29-May-09 1:51 
AnswerRe: Help!! Pin
David Crow29-May-09 3:06
David Crow29-May-09 3:06 
QuestionHow to check an empty VARIANT in VC++ Pin
pandit8429-May-09 0:34
pandit8429-May-09 0:34 
AnswerRe: How to check an empty VARIANT in VC++ Pin
«_Superman_»29-May-09 0:40
professional«_Superman_»29-May-09 0:40 

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.