0

我用 C# 制作了一个 Windows 窗体应用程序。我在该应用程序中添加了一个 DLL 引用并调用了该 DLL 的方法。它工作正常。但是,当我制作了 Web 应用程序并添加了相同 DLL 的引用并尝试运行时,我收到了错误消息

Unable to cast COM object of type 'XXXXX.XXXX' to interface type 'XXXXX.XXXX'. 
This operation failed because the QueryInterface call on the COM component for the interface with IID '{2DEEB1D7-0B44-4142-9E7B-07477781696C}' failed due to the following error: Bad variable type. (Exception from HRESULT: 0x80020008 (DISP_E_BADVARTYPE)).

DLL 中的方法,我从 Web 应用程序调用为

m_SSCP.StartUp("FilePath", "value1", "value2", 6553703, 0, out return_code);

所以如果我从 Web 应用程序和 Windows 窗体应用程序调用相同的函数,这两个操作有什么区别吗?

我试图在网上搜索,但没有得到任何适当的帮助。

4

0 回答 0