How i use INVOKE to call method of an application? My method name is "importCase" and its input argument is a string that contain address of my Case in my computer I don't know how i should use Invoke to call this method and how import input argument of my method. my code is:
::CLSIDFromProgID(OLESTR("SGNSAutomation.SGNSApplication"), &clsid);
IID iid;
HRESULT hr = CoCreateInstance(clsid, NULL, CLSCTX_ALL,
IID_IDispatch, (LPVOID*)&pWMPDispatch);
IDispatch * pdisp = (IDispatch *)NULL;
DISPID dispid;
DISPPARAMS params = "E:\new library\university\final project
documentation\GPNS project\net1.gpns";
OLECHAR * Name = OLESTR("importCase");
HRESULT hresult =pWMPDispatch->GetIDsOfNames(IID_NULL,
&Name,1,LOCALE_SYSTEM_DEFAULT,&dispid);
hresult =pWMPDispatch->Invoke(dispid, IID_NULL, LOCALE_USER_DEFAULT,
DISPATCH_METHOD, ¶ms, NULL, NULL,
NULL);
_ASSERT(hr==S_OK);
I think my param definition is wrong but i don't know how define it?