CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2011
    Posts
    18

    Arrow CoCreateInstance fails

    I have got a E_NOTIMPL return
    Here is my code

    Code:
    GUID clsid;
    GUID iid;
    IUnknown*pUnknown=0;
    HRESULT hres=IIDFromString(L"xxx",&clsid); //S_OK
    hres=IIDFromString(L"xxx",&iid); //S_OK
    
    hres=CoCreateInstance(clsid,0,CLSCTX_INPROC_SERVER,iid,(LPVOID*)&pUnknown); // this fails
    Thanks

  2. #2
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: CoCreateInstance fails

    Shouldn't this
    Code:
    HRESULT hres=IIDFromString(L"xxx",&clsid); //S_OK
    be
    Code:
    HRESULT hres=CLSIDFromString(L"xxx",&clsid); //S_OK
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured