Click here to Skip to main content
15,917,329 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Creating and deleting a temp file Pin
Nishad S26-Feb-09 23:19
Nishad S26-Feb-09 23:19 
NewsRe: Creating and deleting a temp file Pin
CodingLover26-Feb-09 23:23
CodingLover26-Feb-09 23:23 
GeneralRe: Creating and deleting a temp file Pin
Iain Clarke, Warrior Programmer26-Feb-09 23:55
Iain Clarke, Warrior Programmer26-Feb-09 23:55 
AnswerRe: Creating and deleting a temp file Pin
Soundman32.226-Feb-09 23:23
Soundman32.226-Feb-09 23:23 
QuestionGetShortPathName Pin
tom groezer26-Feb-09 21:46
tom groezer26-Feb-09 21:46 
QuestionHow to open Cmd prompt Pin
john563226-Feb-09 20:25
john563226-Feb-09 20:25 
AnswerRe: How to open Cmd prompt Pin
«_Superman_»26-Feb-09 20:47
professional«_Superman_»26-Feb-09 20:47 
AnswerRe: How to open Cmd prompt Pin
Nibu babu thomas26-Feb-09 21:07
Nibu babu thomas26-Feb-09 21:07 
Use create process, specify a working folder which will be the starting folder for command prompt...

void OpenCmdInDir( LPCTSTR lpctszDir )
{
   STARTUPINFO StrInf =  { 0 };
   StrInf.cb = sizeof( StrInf );

   PROCESS_INFORMATION pi = { 0 };
   VERIFY( CreateProcess( NULL, "C:\\Windows\\system32\\cmd.exe", NULL, NULL, FALSE, 0, 0, lpctszDir, &StrInf, &pi ));

   // Closing handles since not needed further
   CloseHandle( pi.hProcess );
   CloseHandle( pi.hThread );
}


// Usage
OpenCmdInDir( _T( "C:\\Windows\\System32\\Drivers" ));



Nibu babu thomas
Microsoft MVP for VC++


Code must be written to be read, not by the compiler, but by another human being.

Programming Blog: http://nibuthomas.wordpress.com

Questionhandle to a window created by createprocess Pin
vijaywithu26-Feb-09 19:53
vijaywithu26-Feb-09 19:53 
AnswerRe: handle to a window created by createprocess Pin
Slavisa Dojcinovic26-Feb-09 21:27
Slavisa Dojcinovic26-Feb-09 21:27 
GeneralRe: handle to a window created by createprocess Pin
vijaywithu26-Feb-09 21:36
vijaywithu26-Feb-09 21:36 
GeneralRe: handle to a window created by createprocess Pin
«_Superman_»26-Feb-09 21:44
professional«_Superman_»26-Feb-09 21:44 
GeneralRe: handle to a window created by createprocess Pin
vijaywithu26-Feb-09 22:07
vijaywithu26-Feb-09 22:07 
GeneralRe: handle to a window created by createprocess Pin
Slavisa Dojcinovic26-Feb-09 21:48
Slavisa Dojcinovic26-Feb-09 21:48 
AnswerRe: handle to a window created by createprocess Pin
CPallini26-Feb-09 21:48
mveCPallini26-Feb-09 21:48 
GeneralRe: handle to a window created by createprocess Pin
vijaywithu26-Feb-09 22:08
vijaywithu26-Feb-09 22:08 
GeneralRe: handle to a window created by createprocess Pin
Slavisa Dojcinovic26-Feb-09 23:26
Slavisa Dojcinovic26-Feb-09 23:26 
GeneralRe: handle to a window created by createprocess Pin
vijaywithu26-Feb-09 23:46
vijaywithu26-Feb-09 23:46 
GeneralRe: handle to a window created by createprocess Pin
CPallini26-Feb-09 23:47
mveCPallini26-Feb-09 23:47 
GeneralRe: handle to a window created by createprocess Pin
vijaywithu26-Feb-09 23:53
vijaywithu26-Feb-09 23:53 
GeneralRe: handle to a window created by createprocess Pin
CPallini26-Feb-09 23:57
mveCPallini26-Feb-09 23:57 
GeneralRe: handle to a window created by createprocess Pin
vijaywithu27-Feb-09 0:06
vijaywithu27-Feb-09 0:06 
GeneralRe: handle to a window created by createprocess Pin
CPallini27-Feb-09 0:25
mveCPallini27-Feb-09 0:25 
QuestionCString to const char* conversion? Pin
sam_psycho26-Feb-09 19:38
sam_psycho26-Feb-09 19:38 
AnswerRe: CString to const char* conversion? Pin
Nishad S26-Feb-09 20:02
Nishad S26-Feb-09 20:02 

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.