fblaha
October 15th, 1999, 06:18 PM
Does anyone know answer on this question ?
**************************************************
In VBScript is this line
Set Obj = CreateObject("RmtSrv.RmtSrv.1")
eguivalent to C++ code
MULTI_QI qi = { & IID_IRmtSrv, NULL, 0};
HRESULT hr = CoCreateInstanceEx (CLSID_RmtSrv, NULL,
CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER,
NULL, 1, &qi);
if( SUCCEEDED(qi.hr))
m_pAppServer = (IRmtSrv*) qi.pItf;
**************************************************
but I don't know , how to write this part in VBScript
**************************************************
CComObject<CClientInterface>* pRemClient;
CComObject<CClientInterface>::CreateInstance (&pRemClient);
AtlAdvise(m_pAppServer,pRemClient->GetUnknown(),
IID_IClientInterface, &m_dwCookie);
component class is defined like:
coclass RmtSrv
{
[default] interface IRmtSrv;
[default,source] interface IClientInterface;
}
************************************************************************************
Is possible to write equivalent code in VBScript ? I'm afraid, that is no way to do this.....
Could you help me, please ?
Any advice would be greatly appreciated
Frank
**************************************************
In VBScript is this line
Set Obj = CreateObject("RmtSrv.RmtSrv.1")
eguivalent to C++ code
MULTI_QI qi = { & IID_IRmtSrv, NULL, 0};
HRESULT hr = CoCreateInstanceEx (CLSID_RmtSrv, NULL,
CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER,
NULL, 1, &qi);
if( SUCCEEDED(qi.hr))
m_pAppServer = (IRmtSrv*) qi.pItf;
**************************************************
but I don't know , how to write this part in VBScript
**************************************************
CComObject<CClientInterface>* pRemClient;
CComObject<CClientInterface>::CreateInstance (&pRemClient);
AtlAdvise(m_pAppServer,pRemClient->GetUnknown(),
IID_IClientInterface, &m_dwCookie);
component class is defined like:
coclass RmtSrv
{
[default] interface IRmtSrv;
[default,source] interface IClientInterface;
}
************************************************************************************
Is possible to write equivalent code in VBScript ? I'm afraid, that is no way to do this.....
Could you help me, please ?
Any advice would be greatly appreciated
Frank