哪位大哥知道pSmartPtr.CreateInstance(__uuidof(ComClass))时,返回值0x800401f0的错误是什么原因?注:pSmartPtr为一智能指针。

解决方案 »

  1.   

    应该是pSmartPtr->CreateInstance(__uuidof(ComClass))吧?
      

  2.   

    感谢您使用微软产品!0x800401f0 指的是"CoInitialize has not been called. " ;-)
    你可以在VC IDE中Tools -> Error Lookup中输入即可得到该错误描述。
    - 微软全球技术中心 VC技术支持 本贴子以“现状”提供且没有任何担保,同时也没有授予任何权利。具体事项可参见使用条款 
    (http://support.microsoft.com/directory/worldwide/zh-cn/community/terms_chs.asp)。 
    为了为您创建更好的讨论环境,请参加我们的用户满意度调查 
    (http://support.microsoft.com/directory/worldwide/zh-cn/community/survey.asp?key=(S,49854782))。