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

    COM beginner question

    Hi there,

    i have a COM newbie question...

    I want to use the following COM object in my code:

    hr = ADsGetObject( L"WinNT://myMachine", IID_IADsContainer, (void**)&pCont);

    OK...

    I do the following include:

    Code:
    #include <iads.h>
    #include <Adshlp.h>
    and I link to Activeds.lib

    But when I compile I get the following output:
    Code:
    ADSTestDlg.obj : error LNK2001: unresolved external symbol _IID_IADs
    ADSTestDlg.obj : error LNK2001: unresolved external symbol _IID_IADsContainer
    (These are the only error messages I get)

    So, my question is: What else do I have to bind to my program to get it compiled?

    Thanks a lot,
    Scapin

  2. #2
    Join Date
    Sep 2004
    Location
    Italy
    Posts
    389

    Re: COM beginner question

    A quick search on google resulted in a topic from an user that had the same problem: http://forums.devshed.com/c-programm...ds-219410.html

  3. #3
    Join Date
    Mar 2004
    Posts
    23

    Re: COM beginner question

    Quote Originally Posted by kkez
    A quick search on google resulted in a topic from an user that had the same problem: http://forums.devshed.com/c-programm...ds-219410.html
    Thanks. Works fine now by adding the following lines to my source code (definition of the CLSIDs):

    Code:
    const IID IID_IADs = {0xFD8256D0, 0xFD15, 0x11CE, {0xAB,0xC4,0x02,0x60,0x8C,0x9E,0x75,0x53}};
    const IID IID_IADsContainer = {0xFD8256D0, 0xFD15, 0x11CE, {0xAB,0xC4,0x02,0x60,0x8C,0x9E,0x75,0x53}};
    Greetings,
    Scapin

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