Click here to Skip to main content
15,904,416 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: linkage error [modified] Pin
MozhdehQeraati18-Aug-09 0:29
MozhdehQeraati18-Aug-09 0:29 
AnswerRe: linkage error Pin
KarstenK18-Aug-09 3:47
mveKarstenK18-Aug-09 3:47 
GeneralRe: linkage error Pin
MozhdehQeraati19-Aug-09 3:07
MozhdehQeraati19-Aug-09 3:07 
GeneralRe: linkage error Pin
KarstenK19-Aug-09 3:21
mveKarstenK19-Aug-09 3:21 
QuestionExchange server news groups on Microsoft Pin
tom groezer17-Aug-09 23:13
tom groezer17-Aug-09 23:13 
AnswerRe: Exchange server news groups on Microsoft Pin
Rajesh R Subramanian17-Aug-09 23:22
professionalRajesh R Subramanian17-Aug-09 23:22 
Question[D3DM] Memory & textures [modified] Pin
MMoi17-Aug-09 21:57
MMoi17-Aug-09 21:57 
AnswerRe: [D3DM] Memory & textures Pin
Cedric Moonen17-Aug-09 22:56
Cedric Moonen17-Aug-09 22:56 
GeneralRe: [D3DM] Memory & textures Pin
MMoi17-Aug-09 23:14
MMoi17-Aug-09 23:14 
AnswerRe: [D3DM] Memory & textures Pin
MMoi19-Aug-09 15:10
MMoi19-Aug-09 15:10 
Questionthumbnails are not displayed if another window is opened on Dialog box. Pin
VCProgrammer17-Aug-09 19:26
VCProgrammer17-Aug-09 19:26 
QuestionOther option in place of Sleep. Pin
Le@rner17-Aug-09 18:16
Le@rner17-Aug-09 18:16 
AnswerRe: Other option in place of Sleep. Pin
Adam Roderick J17-Aug-09 19:44
Adam Roderick J17-Aug-09 19:44 
AnswerRe: Other option in place of Sleep. Pin
«_Superman_»17-Aug-09 20:08
professional«_Superman_»17-Aug-09 20:08 
AnswerRe: Other option in place of Sleep. Pin
Rajesh R Subramanian17-Aug-09 20:08
professionalRajesh R Subramanian17-Aug-09 20:08 
AnswerRe: Other option in place of Sleep. Pin
CPallini18-Aug-09 0:01
mveCPallini18-Aug-09 0:01 
AnswerRe: Other option in place of Sleep. Pin
David Crow18-Aug-09 3:15
David Crow18-Aug-09 3:15 
AnswerRe: Other option in place of Sleep. Pin
Joe Woodbury18-Aug-09 11:20
professionalJoe Woodbury18-Aug-09 11:20 
AnswerRe: Other option in place of Sleep. Pin
KarstenK19-Aug-09 3:23
mveKarstenK19-Aug-09 3:23 
QuestionWhen press enter over ListCtrl OK button click event called. Pin
Le@rner17-Aug-09 18:14
Le@rner17-Aug-09 18:14 
AnswerRe: When press enter over ListCtrl OK button click event called. Pin
Code-o-mat17-Aug-09 21:54
Code-o-mat17-Aug-09 21:54 
QuestionAccess to Locigal Drives under Vista Pin
Bram van Kampen17-Aug-09 13:56
Bram van Kampen17-Aug-09 13:56 
A piece of code that worked a dream under XP, but breaks under Vista. The Licence checking software for my code needs to find the serial number of the physical drive from which the application is launched. I Do this in the Following Steps:-

Step1: Use 'GetModuleFileName' to retrieve the app path, and hence the ligical drive. (Typically 'C:'), and running from Network Drives is Not Allowed under the license terms.

Step2: Get a Handle to the logical drive (say CSmile | :) using:
CreateFile("\\\\.\\\\C:",....);

Step3: Use:
DeviceIoControl(h,IOCTL_STORAGE_GET_DEVICE_NUMBER,...)
to retrieve the Physical Drive Number.

Step4: Get a Handle to the Physical Device, using CreateFile

Step5: Use:
DeviceIoControl (hPhys, IOCTL_STORAGE_QUERY_PROPERTY,..)
To retrieve a Datablock from which the serial number can be retrieved.

As said, everything works fine under XP, but it breaks at Step2 with Vista. CreateFile returns -1, even if I reduce the Security of the volume to 'Full Control by All Users'!

Step4+5 etc work fine, and appear not to be affected by the security considerations. I guess that the trick lies in submitting an appropriate security descriptor. Anyone Any Idea How??

Regards,
Smile | :)

Bram van Kampen

AnswerRe: Access to Locigal Drives under Vista Pin
Michael Dunn17-Aug-09 15:06
sitebuilderMichael Dunn17-Aug-09 15:06 
GeneralRe: Access to Locigal Drives under Vista Pin
Bram van Kampen18-Aug-09 11:01
Bram van Kampen18-Aug-09 11:01 
GeneralRe: Access to Locigal Drives under Vista Pin
Bram van Kampen18-Aug-09 14:35
Bram van Kampen18-Aug-09 14:35 

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.