from a c++ program??
i tried the following code but it gives error
fatal error C1190: managed targeted code requires '#using <mscorlib.dll>' and '/clr' option
Expand|Select|Wrap|Line Numbers
- #using <mscorlib.dll>
- #using <system.dll>
- #using <System.Windows.Forms.dll>
- int main(){
- //Use no more than one assignment when you test this code.
- //System::String * target= "http://www.microsoft.com";
- //System::String * target = "ftp://ftp.microsoft.com";
- System::String * target = "C:\\Program Files\\Microsoft Visual Studio\\INSTALL.HTM";
- try
- {
- System::Diagnostics::Process::Start(target);
- }
- catch (System::ComponentModel::Win32Exception * noBrowser)
- {
- if (noBrowser->ErrorCode==-2147467259)
- System::Windows::Forms::MessageBox::Show(noBrowser->Message);
- }
- catch (System::Exception * other)
- {
- System::Windows::Forms::MessageBox::Show(other->Message);
- }
- return 0;
- }