1. You must use double quotes instead of single quotes as delimiters for your string. Single quotes are delimiters for single characters.
2. In C/C++ the backslash char is reserved char used to specify special characters (like an escape code). Here is a short list of special chars (there are many of them :)):
\ -> \\
CR -> \n
Tab -> \t
Ascii code zero -> \0
So, you need WinExec("c:\\windows\\notepad.exe",SW_SHOWNORMAL)...
Vlad
>In Visual C++ 5.0, I have a WinExec() statement used to start an EXE. It goes like this: WinExec('notepad.exe',SW_SHOWNORMAL). This works fine. However, as soon as I try to put a full path, Visual C++ returns an error at build time. I can't do something like this: WinExec('c:\windows\notepad.exe',SW_SHOWNORMAL).
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only