I guess you mean this code...
Can i change the int main (void) to int call (void) or something
#include <windows.h> //You need shell32.lib for this one
char szPath = "C:\Program Files\Internet Explorer\IEXPLORE.EXE" ;
HINSTANCE hRet = ShellExecute(
HWND_DESKTOP, //Parent window
"open", //Operation to perform
szPath, //Path to program
NULL, //Default directory
SW_SHOW); //How to open
The function returns a HINSTANCE (not really useful in this case)
So therefore, to test its result, we cast it to a LONG.
Any value over 32 represents success!
if((LONG)hRet <= 32)
MessageBox(HWND_DESKTOP,"Unable to start program","",MB_OK);