Click here to Skip to main content
15,897,891 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Tree controls Pin
CPallini29-Feb-08 1:50
mveCPallini29-Feb-08 1:50 
GeneralRe: Tree controls Pin
Rajesh R Subramanian29-Feb-08 1:51
professionalRajesh R Subramanian29-Feb-08 1:51 
GeneralRe: Tree controls Pin
CPallini29-Feb-08 1:53
mveCPallini29-Feb-08 1:53 
GeneralRe: Tree controls Pin
Mark Salsbery29-Feb-08 7:25
Mark Salsbery29-Feb-08 7:25 
GeneralRe: Tree controls Pin
Hamid_RT29-Feb-08 2:50
Hamid_RT29-Feb-08 2:50 
GeneralRe: Tree controls Pin
CPallini29-Feb-08 2:59
mveCPallini29-Feb-08 2:59 
GeneralRe: Tree controls Pin
Hamid_RT29-Feb-08 3:01
Hamid_RT29-Feb-08 3:01 
GeneralRunning batch script in MFC Pin
Vikas K.29-Feb-08 1:26
Vikas K.29-Feb-08 1:26 
Hi,

I have a tricky issue here:

A MFC dialog based App calls a Batch script. This batch script again calls a SSH tool to login to a remote PC. This is to enable FTP service on WinNT remote PC. This is done multiple times in my MFC app.

SSH login take approximately 30 seconds and somehow I can not make the control waut there until the SSL login goes thru.

I have used the following code to run the Sample BAT file:

<br />
-TestFTP.bat-<br />
ssh.exe -pw <password> <uname>@<ipaddress> <br />
net start ftp<br />
exit<br />
</ipaddress></uname></password>


In MFC I use WaitForSingleObject to wait for completion of TestFTP.bat:

SHELLEXECUTEINFO ShExecInfo = {0}; <br />
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO); <br />
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS; <br />
ShExecInfo.hwnd = NULL; <br />
ShExecInfo.lpVerb = NULL; <br />
ShExecInfo.lpFile = "TestFTP.bat"; <br />
ShExecInfo.lpParameters = ""; <br />
ShExecInfo.lpDirectory = NULL; <br />
ShExecInfo.nShow = SW_HIDE; <br />
ShExecInfo.hInstApp = NULL; <br />
ShellExecuteEx(&ShExecInfo); <br />
WaitForSingleObject(ShExecInfo.hProcess,INFINITE); <br />

However, WaitForSingleObject returns immediately and Not sure whats wrong here. How to wait till the batch completes? Any help would be great!

Thanks
Vikas
QuestionRe: Running batch script in MFC Pin
CPallini29-Feb-08 1:45
mveCPallini29-Feb-08 1:45 
GeneralRe: Running batch script in MFC Pin
Rajkumar R29-Feb-08 2:34
Rajkumar R29-Feb-08 2:34 
GeneralRe: Running batch script in MFC Pin
David Crow29-Feb-08 2:55
David Crow29-Feb-08 2:55 
GeneralModifying Tab sheets Pin
Gita.Bairavi29-Feb-08 1:26
Gita.Bairavi29-Feb-08 1:26 
AnswerRe: Modifying Tab sheets Pin
Rajesh R Subramanian29-Feb-08 1:37
professionalRajesh R Subramanian29-Feb-08 1:37 
GeneralRe: Modifying Tab sheets Pin
Joan M29-Feb-08 6:04
professionalJoan M29-Feb-08 6:04 
GeneralTransparent Window Pin
bhat29-Feb-08 1:21
bhat29-Feb-08 1:21 
GeneralRe: Transparent Window Pin
Rajesh R Subramanian29-Feb-08 1:24
professionalRajesh R Subramanian29-Feb-08 1:24 
GeneralRe: Transparent Window Pin
CPallini29-Feb-08 1:40
mveCPallini29-Feb-08 1:40 
General[Message Deleted] Pin
bhat29-Feb-08 1:47
bhat29-Feb-08 1:47 
GeneralRe: Transparent Window Pin
CPallini29-Feb-08 1:51
mveCPallini29-Feb-08 1:51 
GeneralRe: Transparent Window Pin
Rajesh R Subramanian29-Feb-08 1:52
professionalRajesh R Subramanian29-Feb-08 1:52 
GeneralRe: Transparent Window Pin
Gary R. Wheeler1-Mar-08 3:48
Gary R. Wheeler1-Mar-08 3:48 
QuestionRe: Transparent Window Pin
Rajkumar R29-Feb-08 2:47
Rajkumar R29-Feb-08 2:47 
GeneralDirectshow filter crashes in thumbnail view Pin
mTahir29-Feb-08 0:45
mTahir29-Feb-08 0:45 
GeneralRe: Directshow filter crashes in thumbnail view Pin
Cedric Moonen29-Feb-08 0:58
Cedric Moonen29-Feb-08 0:58 
GeneralRe: Directshow filter crashes in thumbnail view Pin
Rajkumar R29-Feb-08 2:07
Rajkumar R29-Feb-08 2:07 

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.