Click here to Skip to main content
15,890,377 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to make radio button function Pin
meiyueh30-Sep-05 1:17
meiyueh30-Sep-05 1:17 
AnswerRe: how to make radio button function Pin
mark novak30-Sep-05 2:19
mark novak30-Sep-05 2:19 
QuestionCode documentation of MFC Application Pin
karmendra_js30-Sep-05 1:12
karmendra_js30-Sep-05 1:12 
AnswerRe: Code documentation of MFC Application Pin
Bartosz Bien30-Sep-05 1:16
Bartosz Bien30-Sep-05 1:16 
GeneralRe: Code documentation of MFC Application Pin
Marc Soleda30-Sep-05 3:10
Marc Soleda30-Sep-05 3:10 
Generalonwner draw button Pin
FarPointer30-Sep-05 1:02
FarPointer30-Sep-05 1:02 
AnswerRe: onwner draw button Pin
Bartosz Bien30-Sep-05 1:12
Bartosz Bien30-Sep-05 1:12 
Questionadministrative privileges of SCSI Pass through Pin
Chandler2530-Sep-05 0:26
Chandler2530-Sep-05 0:26 
Hello,

I am developing an USB pen drive app,
the program works well with XP(or 2000) administrative privileges,
but it doesn't work without it,
because the way I get the drive handle is(suppose the usb pen drive is E:\):

HANDLE hDevHandle;
char szDrive[]= "\\\\.\\E:";

hDevHandle = CreateFile(szDrive,
GENERIC_WRITE | GENERIC_READ,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
0,
NULL);

CreateFile fail without administrative privileges,
following is the description of limitation from MSDN:

You can use the CreateFile function to open a physical disk drive or a
volume. The function returns a handle that can be used with the
DeviceIoControl function. This enables you to access the disk's partition
table. It is potentially dangerous to do so, since an incorrect write to a
disk could make its contents inaccessible. The following requirements must be
met for such a call to succeed:
1.The caller must have administrative privileges.
2.The dwCreationDisposition parameter must have the OPEN_EXISTING flag.
3.When opening a volume or floppy disk, the dwShareMode parameter must
have the FILE_SHARE_WRITE flag.

item 1 cause the fail,
How could I get drive handle without administrative privileges?

Thanks,
Chandler
AnswerRe: administrative privileges of SCSI Pass through Pin
Chandler252-Oct-05 16:18
Chandler252-Oct-05 16:18 
Questionprinting from CScrollView Pin
vikas amin29-Sep-05 23:33
vikas amin29-Sep-05 23:33 
QuestionHow to add a bullet to the text ? Pin
Amarelia29-Sep-05 23:16
Amarelia29-Sep-05 23:16 
AnswerRe: How to add a bullet to the text ? Pin
mark novak30-Sep-05 2:32
mark novak30-Sep-05 2:32 
QuestionAny better solution to solve this? Pin
G Haranadh29-Sep-05 23:04
G Haranadh29-Sep-05 23:04 
AnswerRe: Any better solution to solve this? Pin
S. Senthil Kumar30-Sep-05 0:39
S. Senthil Kumar30-Sep-05 0:39 
QuestionHow to Disable/Hide Mouse Cursor ? Pin
Amarelia29-Sep-05 22:36
Amarelia29-Sep-05 22:36 
AnswerRe: How to Disable/Hide Mouse Cursor ? Pin
mark novak30-Sep-05 2:26
mark novak30-Sep-05 2:26 
QuestionPlaying Video In Dialogs Pin
sweep12329-Sep-05 22:31
sweep12329-Sep-05 22:31 
QuestionDialog Communication Pin
fjlv200529-Sep-05 22:30
fjlv200529-Sep-05 22:30 
AnswerRe: Dialog Communication Pin
Cedric Moonen29-Sep-05 22:36
Cedric Moonen29-Sep-05 22:36 
GeneralRe: Dialog Communication Pin
fjlv200529-Sep-05 22:56
fjlv200529-Sep-05 22:56 
QuestionMFC reporting tools? Pin
bryan52329-Sep-05 22:02
bryan52329-Sep-05 22:02 
QuestionLogFile Pin
SachinSingla29-Sep-05 22:00
SachinSingla29-Sep-05 22:00 
AnswerRe: LogFile Pin
ThatsAlok29-Sep-05 22:27
ThatsAlok29-Sep-05 22:27 
AnswerRe: LogFile Pin
ThatsAlok29-Sep-05 22:28
ThatsAlok29-Sep-05 22:28 
QuestionAcquireCredentialsHandle returns SEC_E_INTERNAL_ERROR Pin
sunit529-Sep-05 21:32
sunit529-Sep-05 21:32 

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.