Accessing Active Directory : unresolved token on REFIID types

Discussion in 'C++' started by Neil S., May 6, 2004.

  1. Neil S.

    Neil S. Guest

    I'm a bit of a newbie to C++, so I apologize in advance if this is
    silly.

    I've found many examples of binding to AD with ADsOpenObject or
    IADsOpenDsObject. I can't compile my code. I've tried including
    every header that would be appropriate. I always get "error LNK2020:
    unresolved token(0A0000C1)IID_IADsOpenDSObject" or whatever other
    IID* value I pass in as the second param to the function. I've also
    tried the ADsOpenObject function with the same results.

    HRESULT hr;
    IADsOpenDSObject *pDSO;
    hr = ADsGetObject(L"LDAP:", IID_IADsOpenDSObject, (void**)&pDSO);

    I'm currently including the following:
    #include "stdafx.h"
    #include "activeds.h"
    #include "MAPIWIN.H" //Got this from a search. Don't seem to need
    it.

    Thanks in advance for your time.
     
    Neil S., May 6, 2004
    #1
    1. Advertising

  2. "Neil S." <> wrote in message
    news:...
    > I'm a bit of a newbie to C++, so I apologize in advance if this is
    > silly.
    >


    It's not silly, it's just not relevant to a group whose topic is the C++
    language.

    To me your question looks like something to do with COM, so you should ask
    in a COM group or at least a Windows programming group.

    Please read this, it includes a list of groups where your question might be
    more topical.

    http://www.slack.net/~shiva/welcome.txt

    john
     
    John Harrison, May 6, 2004
    #2
    1. Advertising

  3. Neil S.

    Lawrie Guest

    (Neil S.) wrote in message news:<>...
    > I'm a bit of a newbie to C++, so I apologize in advance if this is
    > silly.
    >
    > I've found many examples of binding to AD with ADsOpenObject or
    > IADsOpenDsObject. I can't compile my code. I've tried including
    > every header that would be appropriate. I always get "error LNK2020:
    > unresolved token(0A0000C1)IID_IADsOpenDSObject" or whatever other
    > IID* value I pass in as the second param to the function. I've also
    > tried the ADsOpenObject function with the same results.
    >
    > HRESULT hr;
    > IADsOpenDSObject *pDSO;
    > hr = ADsGetObject(L"LDAP:", IID_IADsOpenDSObject, (void**)&pDSO);
    >
    > I'm currently including the following:
    > #include "stdafx.h"
    > #include "activeds.h"
    > #include "MAPIWIN.H" //Got this from a search. Don't seem to need
    > it.
    >
    > Thanks in advance for your time.


    try this group
    comp.os.ms-windows.programmer.win32

    Lawrie
     
    Lawrie, May 7, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Cronus
    Replies:
    1
    Views:
    721
    Paul Mensonides
    Jul 15, 2004
  2. G Fernandes
    Replies:
    1
    Views:
    558
  3. Wessi
    Replies:
    3
    Views:
    915
    Lawrence Kirby
    Aug 11, 2005
  4. Replies:
    0
    Views:
    364
  5. error LNK2020: Unresolved token

    , Oct 19, 2010, in forum: C Programming
    Replies:
    6
    Views:
    1,456
    Keith Thompson
    Oct 20, 2010
Loading...

Share This Page