ShellExecute to start another program with an error .... hurry ! Hurry !

Category: VC/MFC -> Foundation Classes Author: njwto Date: 2010-02-09 16:14:46
 
njwto
2010-02-09 16:14:46
Error with ShellExecute start another program .... hurry ..
      ShellExecute I start with a program written by someone else , error ... the pop-up error message is prompted me to start the program . error ,
      using GetLastError (), a value of 0 ( no error ) , that is no fault of my program is in the process of starting another program , the program is started wrong, but as before, I used the manual way to start this program , I want to control it, no problem ....
    .. the same way to start my own program , a success . .
   ? --- Why would this way ah ....
ShellExecute, WinExec, CreateProcess I have used, will not ???
---- hurry ? ......
langgen1
2010-02-09 16:21:21
sorry, I have not tried.
but do not know if this is the problem then .
If possible , use the thread injection can try.
yyt890
2010-02-09 16:38:10
is not that software must take the arguments start ah ?
avenger3k
2010-02-09 16:42:07
put your code stickers out
ssy198
2010-02-09 16:48:40
ding at
lijun0417
2010-02-09 16:58:13
--- > is not that software must take the arguments start ah
 ?       what do you mean ... why just click his EXE file to run ah < ? ? br />
------------------------------------------- -----------------------------------
my code :
--- > this part of the code in OnInitDialog in
HWND         m_hTelGoWnd;
m_hTelGoWnd   =   :: FindWindow (_T (" wxWindowClassNR "), NULL);
if   (  m_hTelGoWnd   ==   0x00  )
{
CString   strPath;
strPath.Format (__ TEXT ("% s \\% s "), GetCurrentApPath ( ), _ TEXT (" telgo13.exe "));
ShellExecute (this- > m_hWnd, _T (" open "), strPath, NULL, NULL,   SW_SHOW  );
}
... If you start another program I can ah ........
a1071644143
2010-02-09 17:05:53
GetCurrentApPath () get into a directory of your program execution, debug it and see that you get the result is a directory is not telgo13.exe located.
lisa0001
2010-02-09 17:22:59
path is not the problem , ...
        mistakes are ... tips .. " telgo13.exe problem occurs , you must close , .. " 's error , ..
    that is , when ShellExecute start telgo13.exe , and let telgo13.exe error occurs , ..... telgo13.exe this
program itself is no problem , ..
gaoyang8420554
2010-02-09 17:35:12
telgo13.exe only run explorer process ?
dyg0722
2010-02-09 17:39:12
---- > liwz123 (lwz_li)
       ? can say clearly point it .... Thank you
temon
2010-02-09 17:45:06
some software for anti-piracy and other reasons, when you start will determine whether the process is running in the explorer or tuning reactor .
garyzhouii
2010-02-09 18:03:27
Oh, this is ah
---- >! liwz123 (lwz_li)
but I'm going to help , can write an example .. Thank you .. again ? ?
lily20090512
2010-02-09 18:20:12
with thread injection ??
mean? was to open a thread to open it? can say that it cooked through ?
wertyuiop922
2010-02-09 18:31:51
???
      I use ShellExecute, WinExec, CreateProcess open .EXE files , and manually open .EXE file ( double click to open ) what is the difference you ???
qqsang110
2010-02-09 18:33:54
make sure the next is not the problem it this exe is run whether you need some configuration files ?
fengdaos
2010-02-09 18:53:16
the EXE in the same directory , if I double click to open , then there is no problem , ah ,
            this ? both the open difference in that it
surongzhen
2010-02-09 19:06:32
halo .. problem solved > > >
ShellExecute (this- > m_hWnd, _T (" open "), _ T (" telgo13.exe "), NULL, GetCurrentApPath (),   SW_SHOW  );
so on it ....