Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > CreateProcess

Reply
Thread Tools

CreateProcess

 
 
baje
Guest
Posts: n/a
 
      04-15-2007
hi everyone, need some help;
have this code to open MS Word using CreateProcess; but it is not
working; what am i missing?
CreateProcess(NULL, "Winword.exe", NULL, NULL, FALSE, 0,
NULL, NULL, &si, &pi);

 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      04-15-2007
baje wrote:
> hi everyone, need some help;
> have this code to open MS Word using CreateProcess; but it is not
> working; what am i missing?
> CreateProcess(NULL, "Winword.exe", NULL, NULL, FALSE, 0,
> NULL, NULL, &si, &pi);


You should ask about this in the Windows programming newsgroup.
See FAQ for suggestions.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask


 
Reply With Quote
 
 
 
 
Zeppe
Guest
Posts: n/a
 
      04-16-2007
baje wrote:
> hi everyone, need some help;
> have this code to open MS Word using CreateProcess; but it is not
> working; what am i missing?
> CreateProcess(NULL, "Winword.exe", NULL, NULL, FALSE, 0,
> NULL, NULL, &si, &pi);
>


Not surprised, MS Word doesn't usually work.

Regards,

Zeppe

 
Reply With Quote
 
Maxim.Popov.
Guest
Posts: n/a
 
      04-17-2007
On Apr 15, 8:13 pm, "baje" <(E-Mail Removed)> wrote:
> hi everyone, need some help;
> have this code to open MS Word using CreateProcess; but it is not
> working; what am i missing?
> CreateProcess(NULL, "Winword.exe", NULL, NULL, FALSE, 0,
> NULL, NULL, &si, &pi);


ApiFucntion CreateProcess doesn't use relative paths and environment
variables. You should call function ShellExecuteEx. ShellExecuteEx
looks at the paths of environment variable "Path". For example:


SHELLEXECUTEINFOW execInfo;

ZeroMemory(&execInfo, sizeof(execInfo));

execInfo.cbSize = sizeof(execInfo);
execInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
execInfo.nShow = SW_SHOWNORMAL;
execInfo.lpFile = L"Winword.exe";

ShellExecuteEx(&execInfo);

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
java.io.IOException: CreateProcess: " ssh2 -l username serverbox" error=2 csduvvuri@gmail.com Java 1 06-28-2006 09:34 AM
Createprocess Baskar C++ 1 01-20-2005 09:44 PM
CreateProcess Elly Sokol C++ 13 06-18-2004 08:40 PM
CreateProcess / redirect output Achim Domma Python 2 05-28-2004 12:19 PM
CreateProcess DEBUG_PROCESS children termination Kroum Grigorov C++ 1 04-26-2004 07:00 PM



Advertisments