System.InvalidCastException Query
-
Hi, I am passing a VBScript Object to a C# assembly and am getting the following error output: "Unable to cast COM object of type 'Agents.AgentClass' to interface type 'Agents._Agent'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{315DF678-45D7-4A60-9A50-C9E83672A5E5}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))." I'd appreciate it if someone can explain what is going on here and how I can fix it? I am confused... Note: I have tried changing the method header to accept type Agents._Agent but that causing the method call in vbscript to fail completely. Changing the type to Agents.Agent (another available type) generates a similar error. Kind Regards, Dave
Regards, Dave
-
Hi, I am passing a VBScript Object to a C# assembly and am getting the following error output: "Unable to cast COM object of type 'Agents.AgentClass' to interface type 'Agents._Agent'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{315DF678-45D7-4A60-9A50-C9E83672A5E5}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))." I'd appreciate it if someone can explain what is going on here and how I can fix it? I am confused... Note: I have tried changing the method header to accept type Agents._Agent but that causing the method call in vbscript to fail completely. Changing the type to Agents.Agent (another available type) generates a similar error. Kind Regards, Dave
Regards, Dave
-
Hi, I am passing a VBScript Object to a C# assembly and am getting the following error output: "Unable to cast COM object of type 'Agents.AgentClass' to interface type 'Agents._Agent'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{315DF678-45D7-4A60-9A50-C9E83672A5E5}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))." I'd appreciate it if someone can explain what is going on here and how I can fix it? I am confused... Note: I have tried changing the method header to accept type Agents._Agent but that causing the method call in vbscript to fail completely. Changing the type to Agents.Agent (another available type) generates a similar error. Kind Regards, Dave
Regards, Dave
That error indicates that it doesn't know what an Agent is. I assume that it's correctly installed, registered, and that you can create an agent using VBScript. Does the C# assembly have references to the correct versions of the AgentObjects.dll and AxAgentObjects.dll?
I are Troll :suss:
-
That error indicates that it doesn't know what an Agent is. I assume that it's correctly installed, registered, and that you can create an agent using VBScript. Does the C# assembly have references to the correct versions of the AgentObjects.dll and AxAgentObjects.dll?
I are Troll :suss: