|
-
January 23rd, 2009, 06:15 PM
#1
Build Errors
Hi,
I am trying to launch a program from a button and when I introduced the ShellExecuteEx code, I began to have a bunch of problems. I've since resolved all of them but one.
Here is the code:
Code:
130. private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e)
131.
132. {
133. SHELLEXECUTEINFO ExecuteInfo;
134.
135. memset(&ExecuteInfo, 0, sizeof(ExecuteInfo));
136.
137. ExecuteInfo.cbSize = sizeof(ExecuteInfo);
138. ExecuteInfo.fMask = 0;
139. ExecuteInfo.hwnd = 0;
140. ExecuteInfo.lpVerb = _T("open"); // Operation to perform
141. ExecuteInfo.lpFile = _T("c:\\windows\\notepad.exe"); // Application name
142. ExecuteInfo.lpParameters = 0; // Additional parameters
143. ExecuteInfo.lpDirectory = 0; // Default directory
144. ExecuteInfo.nShow = SW_SHOW;
145. ExecuteInfo.hInstApp = 0;
146.
147. if(ShellExecuteEx(&ExecuteInfo) == FALSE)
148. // Could not start application -> call 'GetLastError()'
149. }
150. };
151. }
And here is my error:
(149) : error C2143: syntax error : missing ';' before '}'
It looks like the error is on line 149. Google couldn't help me solve my problem this time.
What I'm confused about, is that line 149 is a single closing bracket.
I can't seem to figure out what I need to do, so any help would be grateful
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|