Click here to Skip to main content
15,887,453 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: LNK2019 for XmlLite Pin
A&Ms1-Jan-10 11:14
A&Ms1-Jan-10 11:14 
GeneralRe: LNK2019 for XmlLite Pin
conrad Braam3-Jan-10 4:04
conrad Braam3-Jan-10 4:04 
QuestionPort 7078 and 7077 blocked in Vista Pin
Larry Mills Sr1-Jan-10 6:00
Larry Mills Sr1-Jan-10 6:00 
QuestionNeed help with member function pointer Pin
anbluemoon31-Dec-09 19:18
anbluemoon31-Dec-09 19:18 
AnswerRe: Need help with member function pointer Pin
KingsGambit31-Dec-09 19:44
KingsGambit31-Dec-09 19:44 
GeneralRe: Need help with member function pointer Pin
anbluemoon31-Dec-09 21:14
anbluemoon31-Dec-09 21:14 
AnswerRe: Need help with member function pointer Pin
N a v a n e e t h1-Jan-10 3:53
N a v a n e e t h1-Jan-10 3:53 
QuestionHow to use CreateProcess win 32 api function Pin
NIR WINTER31-Dec-09 12:29
NIR WINTER31-Dec-09 12:29 
Hello Everybody,
I am new to the windows 32 api and i am trying to use the win 3 api function CreateProcess.
I am simply trying to use this function to open the msn messanger process on my windows 7 pc, but i keep on getting a 0 exit code(failure). this is my code:
#include <windows.h>
#include <stdio.h>
#include <tchar.h>

void _tmain( )
{
STARTUPINFO si;
PROCESS_INFORMATION pi;

ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );


// Start the child process.
if( !CreateProcess( "c:\Program Files\Windows Live\Messenger\msnmsgr.exe", // module name (use command line)
NULL, // Command line
NULL, // Process handle not inheritable
NULL, // Thread handle not inheritable
FALSE, // Set handle inheritance to FALSE
0, // No creation flags
NULL, // Use parent's environment block
NULL, // Use parent's starting directory
&si, // Pointer to STARTUPINFO structure
&pi ) // Pointer to PROCESS_INFORMATION structure
)
{
printf( "CreateProcess failed (%d).\n", GetLastError() );
return;
}

// Wait until child process exits.
WaitForSingleObject( pi.hProcess, INFINITE );

// Close process and thread handles.
CloseHandle( pi.hProcess );
CloseHandle( pi.hThread );
}
the path c:\Program Files\Windows Live\Messenger\msnmsgr.exe is my msn messanger directory, but somehow i can get it to work.

Can someone please help me?

Thanks,
Nir Winter
AnswerRe: How to use CreateProcess win 32 api function Pin
Garth J Lancaster31-Dec-09 13:07
professionalGarth J Lancaster31-Dec-09 13:07 
AnswerRe: How to use CreateProcess win 32 api function Pin
Chuck O'Toole31-Dec-09 15:15
Chuck O'Toole31-Dec-09 15:15 
AnswerRe: How to use CreateProcess win 32 api function Pin
Rozis1-Jan-10 4:58
Rozis1-Jan-10 4:58 
AnswerRe: How to use CreateProcess win 32 api function Pin
«_Superman_»1-Jan-10 14:43
professional«_Superman_»1-Jan-10 14:43 
QuestionImplementing Windows Pin
MrMcIntyre31-Dec-09 10:19
MrMcIntyre31-Dec-09 10:19 
QuestionRe: Implementing Windows Pin
CPallini31-Dec-09 10:23
mveCPallini31-Dec-09 10:23 
AnswerRe: Implementing Windows Pin
MrMcIntyre31-Dec-09 10:26
MrMcIntyre31-Dec-09 10:26 
GeneralRe: Implementing Windows Pin
Abhi Lahare31-Dec-09 10:29
Abhi Lahare31-Dec-09 10:29 
GeneralRe: Implementing Windows Pin
CPallini31-Dec-09 10:35
mveCPallini31-Dec-09 10:35 
GeneralRe: Implementing Windows Pin
MrMcIntyre31-Dec-09 10:42
MrMcIntyre31-Dec-09 10:42 
GeneralRe: Implementing Windows Pin
CPallini31-Dec-09 10:51
mveCPallini31-Dec-09 10:51 
GeneralRe: Implementing Windows Pin
MrMcIntyre31-Dec-09 10:56
MrMcIntyre31-Dec-09 10:56 
GeneralRe: Implementing Windows Pin
Abhi Lahare31-Dec-09 11:07
Abhi Lahare31-Dec-09 11:07 
GeneralRe: Implementing Windows Pin
MrMcIntyre31-Dec-09 11:20
MrMcIntyre31-Dec-09 11:20 
QuestionRe: Implementing Windows PinPopular
enhzflep31-Dec-09 13:30
enhzflep31-Dec-09 13:30 
GeneralRe: Implementing Windows Pin
Tim Craig31-Dec-09 13:31
Tim Craig31-Dec-09 13:31 
GeneralRe: Implementing Windows Pin
enhzflep31-Dec-09 15:43
enhzflep31-Dec-09 15:43 

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.