Click here to Skip to main content
14,268,298 members

C / C++ / MFC

 
AnswerRe: Features and rich documentation of MFC vs Small Executable of WTL Pin
jeron111-Mar-15 5:53
memberjeron111-Mar-15 5:53 
AnswerRe: Features and rich documentation of MFC vs Small Executable of WTL Pin
Eddy Vluggen11-Mar-15 6:28
mveEddy Vluggen11-Mar-15 6:28 
AnswerRe: Features and rich documentation of MFC vs Small Executable of WTL Pin
Albert Holguin15-Mar-15 17:29
professionalAlbert Holguin15-Mar-15 17:29 
QuestionSftTree.dll, v4.0.0.0 performance issue With C# Winform Pin
vipin kumar sharma10-Mar-15 1:43
membervipin kumar sharma10-Mar-15 1:43 
SuggestionWrong Forum Pin
Richard Deeming10-Mar-15 2:04
mveRichard Deeming10-Mar-15 2:04 
QuestionEjecting USB memory sticks problem Pin
Still learning how to code10-Mar-15 1:07
memberStill learning how to code10-Mar-15 1:07 
AnswerRe: Ejecting USB memory sticks problem Pin
David Crow10-Mar-15 2:42
memberDavid Crow10-Mar-15 2:42 
GeneralRe: Ejecting USB memory sticks problem Pin
Still learning how to code10-Mar-15 3:04
memberStill learning how to code10-Mar-15 3:04 
Hello David,
Thanks for your reply ! I have tried your suggestion but this change produces the command line "D:\StickCopier\deveject -EjectName:""USB Mass Storage Device""" in the debugger (i.e. a PAIR of double quotes whereas single double quotes are needed for the argument to EjectNameSmile | :)

Since my original posting, I have tried ShellExecute() and am getting a similar result - ShellExecute() succeeds (RC = 42, which is greater than 33), but the USB stick is still mounted.
New code is as follows:-

CString szFile = "D:\\StickCopier\\deveject.exe";
const CString quote = "\""; // This is actually the character '"'
CString szParameters = "-EjectName:" + quote + "USB Mass Storage Device" + quote;
CString szDirectory = "D:\\StickCopier\\";

HINSTANCE hInstance;
hInstance = ShellExecute(NULL,"Open",szFile, szParameters, szDirectory,SW_HIDE);    // returns 42 (> 33 so no error

Doug

QuestionDestructors Pin
lor759-Mar-15 8:11
memberlor759-Mar-15 8:11 
AnswerRe: Destructors Pin
David Crow9-Mar-15 9:22
memberDavid Crow9-Mar-15 9:22 
GeneralRe: Destructors Pin
lor759-Mar-15 9:39
memberlor759-Mar-15 9:39 
GeneralRe: Destructors Pin
Maximilien10-Mar-15 3:47
memberMaximilien10-Mar-15 3:47 
AnswerRe: Destructors Pin
Albert Holguin11-Mar-15 16:46
professionalAlbert Holguin11-Mar-15 16:46 
Questionc graphics Pin
Member 115074488-Mar-15 2:35
memberMember 115074488-Mar-15 2:35 
AnswerRe: c graphics Pin
Frankie-C8-Mar-15 4:18
memberFrankie-C8-Mar-15 4:18 
AnswerRe: c graphics Pin
Afzaal Ahmad Zeeshan11-Mar-15 7:43
mveAfzaal Ahmad Zeeshan11-Mar-15 7:43 
Questioncryptosystem Pin
Member 115062768-Mar-15 1:54
memberMember 115062768-Mar-15 1:54 
AnswerRe: cryptosystem Pin
Richard MacCutchan8-Mar-15 2:09
protectorRichard MacCutchan8-Mar-15 2:09 
AnswerRe: cryptosystem Pin
Chris Losinger9-Mar-15 6:31
professionalChris Losinger9-Mar-15 6:31 
Questionusb modem problem Pin
ali_heidari_7-Mar-15 7:32
memberali_heidari_7-Mar-15 7:32 
AnswerRe: usb modem problem Pin
Frankie-C7-Mar-15 10:14
memberFrankie-C7-Mar-15 10:14 
GeneralRe: usb modem problem Pin
ali_heidari_7-Mar-15 17:54
memberali_heidari_7-Mar-15 17:54 
QuestionCreating an .Obj File Pin
Bram van Kampen6-Mar-15 12:46
memberBram van Kampen6-Mar-15 12:46 
AnswerRe: Creating an .Obj File Pin
Mauro Leggieri6-Mar-15 14:31
memberMauro Leggieri6-Mar-15 14:31 
AnswerRe: Creating an .Obj File Pin
Richard MacCutchan6-Mar-15 21:33
protectorRichard MacCutchan6-Mar-15 21:33 

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.