我要在VC下调用VB编写的DLL,代码如下:#import "ScrJumpDocMake.dll" no_namespace named_guidsvoid CTestLoadVBDLLLDlg::OnButton1()
{
_ScrJumpDocPtr Test;
try
{
HRESULT hRest = Test.CreateInstance(__uuidof(ScrJumpDoc));
Test->Make();
}
catch (_com_error e)
{
CString temp;
temp.Format("error:%s",e.ErrorMessage());
::MessageBox(NULL,temp,"Error Info",NULL);
}
}现在的问题是:CreateInstance的返回值总是“0x80040154”,意思是类没有注册。
那位高手能够指点一下,非常感谢!
{
_ScrJumpDocPtr Test;
try
{
HRESULT hRest = Test.CreateInstance(__uuidof(ScrJumpDoc));
Test->Make();
}
catch (_com_error e)
{
CString temp;
temp.Format("error:%s",e.ErrorMessage());
::MessageBox(NULL,temp,"Error Info",NULL);
}
}现在的问题是:CreateInstance的返回值总是“0x80040154”,意思是类没有注册。
那位高手能够指点一下,非常感谢!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货