开发者

VS2010: Using COM in a .NET 2 Project

I have a .NET 2.0 project that needs to use开发者_运维技巧 a COM component (specifically Redemption). In Visual Studio 2010 I add a reference to the COM dll as I would in all prior VS versions (right click project->Add Reference->COM tab->select product->Ok). When I build and try and run the app I keep getting the following error:

Creating an instance of the COM component with CLSID {29AB7A12-B531-450E-8F7A-EA94C2F3C05F} from the IClassFactory failed due to the following error: 80004005.

I haven't had much luck figuring out what is up with this error.

I have already verified that the machine the app is running on does have the COM dll registered via regsvr32.exe.

The only thing I could think of is that this has something to do with Visual Studio 2010 importing COM components differently (maybe?) than previous versions? Any direction on this would be extremely helpful.

Thanks in advance.

EDIT: Code used to instantiate the COM class.

RDOSession session = new RDOSessionClass();


That's E_FAIL, "Unspecified error". It's an utterly useless error code but not uncommon for COM servers. The programmer took a shortcut, couldn't find a better error code and didn't want to create his own. It is very doubtful that it has anything to do with the interop library, you never got to the point of actually using it.

Maybe some kind of config that the COM server needs, maybe an installation problem. But these are just wild guesses. Ultimately you probably need help from the component vendor or author to get past this hump.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜