Hi All.
I want to call the DoFMScript from with a VC++ file to launch the script.

I have this set of code in VC++ for launching the script but it throws "Server Threw an Exception " error on this line fmdoc.DoFMScript(&sn).

IFMIDocument fmdoc;
fmdoc.CreateDispatch(clsid2,&e);
fmdoc.DoFMScript(&sn);

Can any body help me out on this. Am I missing something or need some thing else to complete this.

thanks
siva