1

我有一个在 Windows 7 上运行良好但在 Server 2003 上失败的应用程序。失败的行是下面的第三行

_ConnectionPtr pConnection = NULL;
::CoInitialize(NULL);
HRESULT hr = pConnection.CreateInstance(__uuidof(Connection));

返回的 HRESULT 为 0x80004002(不支持接口)。两台机器都安装了 MDAC,我不明白为什么会出现这个错误。这可能发生的任何原因?

4