OvermindDL1
Programmer
Due to various issues with IE on the company computers with many of our systems, and due to the low limit for concurrent RTD users, and due to being unable to install any additional data on the server or access the database remotely, plus we only need the RTD view for this, I am creating a new 'multi-casting' server (as that option in Symposium is disabled here anyway) that just uses the ICERtdControl COM interface to get the data. I can access the server, get no errors, ClientReceiveMode becomes 1 a few seconds after connecting (Unicast, as expected), and everything looks good, however I get no COM event callbacks. For what I am using I am not allowed to use a compiled language to interface the two servers (dagnabbit), so I have been trying it with everything from VBScript to Pythons win32com api. I get event callbacks when I test with the IE, Excel, Word, and a few other things COM objects just fine in all of the above, however I get no event callbacks from ICERtdControl. The Symposium reports themselves work fine and do get their callbacks called on the webpage, and I have tried to mimic that *exactly*, all the same calls to the IRCRtdControl COM object in the same order and all, but I still never get a callback. I have confirmed that the COM interface uses IDispatch for the events so it should work fine, and registering the events does indeed succeed, but still, no callback. Below is the generated IDL of the COM object, and the vbscript test code (I can also supply the Python version if wanted, but they do the same thing).
Thank you for your assistance, I have been dealing with this for two weeks, in a variety of languages and COM interface styles, all to no avail...
The ICERtdControl generated IDL:
The testing VBScript code, as stated, when trying to receive events from other COM objects such as IE, Excel, Word, the server interface that I want to push the ICERtdControl data into, all work perfectly:
Thank you for your assistance, I have been dealing with this for two weeks, in a variety of languages and COM interface styles, all to no avail...
The ICERtdControl generated IDL:
Code:
// Generated .IDL file (by the OLE/COM Object Viewer)
//
// typelib filename: ICERtdControl.dll
[
uuid(977DBDF6-F527-11D3-8F03-00C04FA3EB91),
version(1.0),
helpstring("ICERtdControl 1.0 Type Library")
]
library ICERTDCONTROLLib
{
// TLib : // TLib : OLE Automation : {00020430-0000-0000-C000-000000000046}
importlib("stdole2.tlb");
// Forward declare all types defined in this typelib
dispinterface _IRtdControlEvents;
interface IRtdControl;
[
uuid(977DBE04-F527-11D3-8F03-00C04FA3EB91),
helpstring("_IRtdControlEvents Interface")
]
dispinterface _IRtdControlEvents {
properties:
methods:
[id(0x00000001), helpstring("method UpdateSkillsetStat")]
HRESULT UpdateSkillsetStat(
[in] int type,
[in] IDispatch* recSet);
[id(0x00000002), helpstring("method UpdateApplicationStat")]
HRESULT UpdateApplicationStat(
[in] int type,
[in] IDispatch* recSet);
[id(0x00000003), helpstring("method UpdateAgentPosition")]
HRESULT UpdateAgentPosition(
[in] int type,
[in] IDispatch* recSet);
[id(0x00000004), helpstring("method UpdateStdApplicationStat")]
HRESULT UpdateStdApplicationStat(
[in] int type,
[in] IDispatch* recSet);
[id(0x00000005), helpstring("method UpdateStdSkillsetStat")]
HRESULT UpdateStdSkillsetStat(
[in] int type,
[in] IDispatch* recSet);
[id(0x00000006), helpstring("method UpdateStdAgentStat")]
HRESULT UpdateStdAgentStat([in] IDispatch* recSet);
[id(0x00000007), helpstring("method UpdateStdIVRStat")]
HRESULT UpdateStdIVRStat([in] IDispatch* recSet);
[id(0x00000008), helpstring("method UpdateStdRouteStat")]
HRESULT UpdateStdRouteStat([in] IDispatch* recSet);
[id(0x00000009), helpstring("method UpdateStdNodalStat")]
HRESULT UpdateStdNodalStat([in] IDispatch* recSet);
};
[
uuid(977DBE03-F527-11D3-8F03-00C04FA3EB91),
helpstring("RtdControl Class")
]
coclass RtdControl {
[default] interface IRtdControl;
[default, source] dispinterface _IRtdControlEvents;
};
[
odl,
uuid(977DBE02-F527-11D3-8F03-00C04FA3EB91),
helpstring("IRtdControl Interface"),
dual,
oleautomation
]
interface IRtdControl : IDispatch {
[id(0x00000001), helpstring("method GetSkillsetStat")]
HRESULT GetSkillsetStat(
[in, optional, defaultvalue(0)] tagICERtdStatTypeEnum type,
[out, retval] IDispatch** ppRecordset);
[id(0x00000002), helpstring("method GetApplicationStat")]
HRESULT GetApplicationStat(
[in, optional, defaultvalue(0)] tagICERtdStatTypeEnum type,
[out, retval] IDispatch** ppRecordset);
[id(0x00000003), helpstring("method GetAgentPosition")]
HRESULT GetAgentPosition(
[in, optional, defaultvalue(0)] tagICERtdStatTypeEnum type,
[out, retval] IDispatch** ppDisp);
[id(0x00000004), propget, helpstring("property AppRefreshTime")]
HRESULT AppRefreshTime([out, retval] short* pVal);
[id(0x00000004), propput, helpstring("property AppRefreshTime")]
HRESULT AppRefreshTime([in] short pVal);
[id(0x00000005), propget, helpstring("property SkillsetRefreshTime")]
HRESULT SkillsetRefreshTime([out, retval] short* pVal);
[id(0x00000005), propput, helpstring("property SkillsetRefreshTime")]
HRESULT SkillsetRefreshTime([in] short pVal);
[id(0x00000006), propget, helpstring("property AgentPosRefreshTime")]
HRESULT AgentPosRefreshTime([out, retval] short* pVal);
[id(0x00000006), propput, helpstring("property AgentPosRefreshTime")]
HRESULT AgentPosRefreshTime([in] short pVal);
[id(0x00000007), propget, helpstring("property ReceiveIPAddress")]
HRESULT ReceiveIPAddress([out, retval] BSTR* pVal);
[id(0x00000007), propput, helpstring("property ReceiveIPAddress")]
HRESULT ReceiveIPAddress([in] BSTR pVal);
[id(0x00000008), propget, helpstring("property DisplayFormat")]
HRESULT DisplayFormat([out, retval] tagICERtdDispFmtEnum* pVal);
[id(0x00000008), propput, helpstring("property DisplayFormat")]
HRESULT DisplayFormat([in] tagICERtdDispFmtEnum pVal);
[id(0x00000009), helpstring("method GetStdAgentStat")]
HRESULT GetStdAgentStat(
[in] BSTR host,
[in] IDispatch* pRsFields,
[in] IDispatch* ppRsElmt,
[in, optional, defaultvalue(0)] tagICERtdStatTypeEnum type,
[out, retval] IDispatch** ppRs);
[id(0x0000000a), propget, helpstring("property ServiceDescriptionURL")]
HRESULT ServiceDescriptionURL([out, retval] BSTR* pVal);
[id(0x0000000a), propput, helpstring("property ServiceDescriptionURL")]
HRESULT ServiceDescriptionURL([in] BSTR pVal);
[id(0x0000000b), propget, helpstring("property RefreshTime")]
HRESULT RefreshTime([out, retval] int* pVal);
[id(0x0000000b), propput, helpstring("property RefreshTime")]
HRESULT RefreshTime([in] int pVal);
[id(0x0000000c), helpstring("method GetStdIVRStat")]
HRESULT GetStdIVRStat(
[in] BSTR host,
[in, optional, defaultvalue(0)] tagICERtdStatTypeEnum type,
[out, retval] IDispatch** ppRs);
[id(0x0000000d), helpstring("method GetStdRouteStat")]
HRESULT GetStdRouteStat(
[in] BSTR host,
[in, optional, defaultvalue(0)] tagICERtdStatTypeEnum type,
[out, retval] IDispatch** ppRs);
[id(0x0000000e), helpstring("method GetStdNodalStat")]
HRESULT GetStdNodalStat(
[in] BSTR host,
[in, optional, defaultvalue(0)] tagICERtdStatTypeEnum type,
[out, retval] IDispatch** ppRs);
[id(0x0000000f), helpstring("method GetStdSkillsetStat")]
HRESULT GetStdSkillsetStat(
[in] BSTR host,
[in] IDispatch* pRsFields,
[in] IDispatch* ppRsElmt,
[in, optional, defaultvalue(0)] tagICERtdStatTypeEnum type,
[out, retval] IDispatch** ppRs);
[id(0x00000010), helpstring("method GetStdApplicationStat")]
HRESULT GetStdApplicationStat(
[in] BSTR host,
[in] IDispatch* pRsFields,
[in] IDispatch* ppRsElmt,
[in, optional, defaultvalue(0)] tagICERtdStatTypeEnum type,
[out, retval] IDispatch** ppRs);
[id(0x00000011), helpstring("method SetSkillsetFilter")]
HRESULT SetSkillsetFilter(
[in] IDispatch** ppRecordset,
[out, retval] long* bRet);
[id(0x00000012), helpstring("method SetApplicationFilter")]
HRESULT SetApplicationFilter(
[in] IDispatch** ppRecordset,
[out, retval] long* bRet);
[id(0x00000013), helpstring("method SetSkillsetPartition")]
HRESULT SetSkillsetPartition(
[in] IDispatch** ppRecordset,
[out, retval] long* bRet);
[id(0x00000014), helpstring("method SetApplicationPartition")]
HRESULT SetApplicationPartition(
[in] IDispatch** ppRecordset,
[out, retval] long* bRet);
[id(0x00000015), propget, helpstring("property ServerTransmitMode")]
HRESULT ServerTransmitMode([out, retval] long* pVal);
[id(0x00000015), propput, helpstring("property ServerTransmitMode")]
HRESULT ServerTransmitMode([in] long pVal);
[id(0x00000016), propget, helpstring("property ClientReceiveMode")]
HRESULT ClientReceiveMode([out, retval] long* pVal);
[id(0x00000017), propget, helpstring("property TransmitError")]
HRESULT TransmitError([out, retval] long* pVal);
[id(0x00000018), helpstring("method GetStdRouteStat2")]
HRESULT GetStdRouteStat2(
[in] BSTR host,
[in] IDispatch* pRsFields,
[in, optional, defaultvalue(0)] tagICERtdStatTypeEnum type,
[out, retval] IDispatch** ppRs);
[id(0x00000019), helpstring("method GetStdIVRStat2")]
HRESULT GetStdIVRStat2(
[in] BSTR host,
[in] IDispatch* pRsFields,
[in, optional, defaultvalue(0)] tagICERtdStatTypeEnum type,
[out, retval] IDispatch** ppRs);
[id(0x0000001a), helpstring("method GetStdNodalStat2")]
HRESULT GetStdNodalStat2(
[in] BSTR host,
[in] IDispatch* pRsFields,
[in, optional, defaultvalue(0)] tagICERtdStatTypeEnum type,
[out, retval] IDispatch** ppRs);
};
typedef enum {
rtdMovingWindow = 0,
rtdIntervalToDate = 1
} tagICERtdStatTypeEnum;
typedef enum {
dispFltSiteSkl = 0,
dispSiteFltSkl = 1,
dispFltSklSite = 2
} tagICERtdDispFmtEnum;
};
The testing VBScript code, as stated, when trying to receive events from other COM objects such as IE, Excel, Word, the server interface that I want to push the ICERtdControl data into, all work perfectly:
Code:
Sub Rtd_UpdateStdSkillsetStat(stType, RS)
MsgBox "The event has been called!"
End Sub
Dim RtdCtrl
Set RtdCtrl = WScript.CreateObject("ICERtdControl.RtdControl", "Rtd_")
Dim RSFields
Set RSFields = WScript.CreateObject("ADODB.Recordset")
Dim RSNone
Set RSNone = WScript.CreateObject("ADODB.Recordset")
with RSFields
.CursorLocation = 3
.CursorType = 3
.LockType = 3
.Fields.Append "FieldName", 8
.Fields.Append "FieldType", 8
.Open
End With
for i = 0 to NumCol - 1
With RSFields
.AddNew
.Fields(0) = Column(i,1)
.Fields(1) = Column(i,6)
End With
next
Dim RSFlt
Set RSFlt = WScript.CreateObject("ADODB.Recordset")
with RSFlt
.CursorLocation = 3
.CursorType = 3
.LockType = 3
.Fields.Append "FilterName", 8
.Fields.Append "SiteName", 8
.Fields.Append "EleName", 8
.Open
End With
For i = 10000 To 10300
With RSFlt
.AddNew
.Fields(0) = "WFM_MCD"
.Fields(1) = "farsccs"
.Fields(2) = "" & i
End With
Next
RtdCtrl.DisplayFormat = 0
RtdCtrl.ReceiveIPAddress = "230.0.0.2"
RtdCtrl.ServerTransmitMode = 2
RtdCtrl.ServiceDescriptionURL = "[URL unfurl="true"]http://farsccsweb02/Common/SoapListen/RtdServiceXML.asp"[/URL]
RtdCtrl.RefreshTime = 1000
Dim RS
RS = "farsccs"
RS = RtdCtrl.GetStdSkillsetStat(RS, RSNone, RSNone, 1)
'If RS.RecordCount > 0 Then
' MsgBox "Got an RS!"
'End If
RS = nothing
MsgBox "Starting"
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
WScript.Sleep 250
' Repeat a few hundred more times for testing...
MsgBox "Exiting"