CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2005
    Posts
    5

    CoCreateInstance fails

    Hi,
    I pretend to instance an object (as part of the code of my application). It works very good in WXP and X2K, but I've tried in W98 and it fails ("CoCreateInstance Failed."). The code is like this:

    hr = CoCreateInstance({0x3F0C2D82,0x2187,0x11D4,{0x9F,0x74,0x00,0x80,0x5F,0x9B,0x81,0x2F}}, NULL, CLSCTX_INPROC_SERVER,{0x3F0C2D81,0x2187,0x11D4,{0x9F,0x74,0x00,0x80,0x5F,0x9B,0x81,0x2F}}, (void**) &EDCryptor);
    if (SUCCEEDED(hr))
    {
    ...
    }
    else
    {
    AfxMessageBox("CoCreateInstance Failed.");
    }

    Does someone know why?
    Thanks.

  2. #2
    Join Date
    Feb 2002
    Location
    Krispl, Austria
    Posts
    197

    Re: CoCreateInstance fails

    What is the Object you're trying to create? It may be that this doesn't exists on the Win 98 platform.
    Requests such as
    "I need to write an new language compiler by next week, I have teach yourself c++ in 21 days, can someone give me example code?" will be ignored.

  3. #3
    Join Date
    Jan 2005
    Location
    Brighton, England
    Posts
    241

    Re: CoCreateInstance fails

    Also, if it's your own COM object you are creating have you registered it on Win98 ?

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