Click to See Complete Forum and Search --> : running VB script from a c/C++ program


anuradha
July 1st, 1999, 09:39 AM
Please write me how to run VB Script from a C++ or C program.

Sam Hobbs
July 1st, 1999, 10:05 PM
Something like:


HINSTANCE hi;
CString Msg;
hi = ShellExecute(m_hWnd, "open", lpszCmdLine, NULL, NULL, SW_SHOWNORMAL);
if ((UINT) hi < 32)
Msg.Format("ShellExecute failed; error code = %X", hi);
else
Msg.Format("Instance handle for %s is %X", lpszCmdLine, hi);
MessageBox(Msg);