WinExec(...)??
-
When I try to run an application with WinExec it will not do what I want it to do!! :( WinExec(m_Path,SW_SHOW); m_Path is a varible of CString and contains the return value from FileDLg.GetPathName() (FileDialog is a CFileDialog). Isn't this the right way? The app does not run... HELP! SHOW ME HOW!? ------------------------------ ©0d3 ©®4©k3® - That's me! :) ------------------------------
-
When I try to run an application with WinExec it will not do what I want it to do!! :( WinExec(m_Path,SW_SHOW); m_Path is a varible of CString and contains the return value from FileDLg.GetPathName() (FileDialog is a CFileDialog). Isn't this the right way? The app does not run... HELP! SHOW ME HOW!? ------------------------------ ©0d3 ©®4©k3® - That's me! :) ------------------------------
Try using CreateProcess() instead. Perhaps the file name has embedded blanks which are causing problems? It's hard to offer help without specific information. I'm not sure what you mean by "it will not do what I want it to do!!". /ravi "There is always one more bug..." ravib@ravib.com http://www.ravib.com
-
Try using CreateProcess() instead. Perhaps the file name has embedded blanks which are causing problems? It's hard to offer help without specific information. I'm not sure what you mean by "it will not do what I want it to do!!". /ravi "There is always one more bug..." ravib@ravib.com http://www.ravib.com
Stupid me! This is what I want it to do: Run that application that 'm_Path' contains (full path to it) ------------------------------ ©0d3 ©®4©k3® - That's me! :) ------------------------------
-
When I try to run an application with WinExec it will not do what I want it to do!! :( WinExec(m_Path,SW_SHOW); m_Path is a varible of CString and contains the return value from FileDLg.GetPathName() (FileDialog is a CFileDialog). Isn't this the right way? The app does not run... HELP! SHOW ME HOW!? ------------------------------ ©0d3 ©®4©k3® - That's me! :) ------------------------------
Well WinExec is a superceded function but I've not had any issues with it. What is the return value from the function. This should give you a clue to why it is failing. Michael :-)
-
Stupid me! This is what I want it to do: Run that application that 'm_Path' contains (full path to it) ------------------------------ ©0d3 ©®4©k3® - That's me! :) ------------------------------
Yes, I assumed that. But what status does the function return? /ravi "There is always one more bug..." http://www.ravib.com ravib@ravib.com
-
Yes, I assumed that. But what status does the function return? /ravi "There is always one more bug..." http://www.ravib.com ravib@ravib.com
Ok, now I get o as return value. But when I test the string that I get from the registry it does not contain any characters! :/ If I open the registry editor I can see the string with path but when I try to ge it it obviously wont return right value... hm... ------------------------------ ©0d3 ©®4©k3® - That's me! :) ------------------------------
-
Yes, I assumed that. But what status does the function return? /ravi "There is always one more bug..." http://www.ravib.com ravib@ravib.com
Oh man! I feel so painful!! The error was that when I read from the registry. I read wrong folder! :mad: DAMN ME! ------------------------------ ©0d3 ©®4©k3® - That's me! :) ------------------------------