Accessing Active Directory : unresolved token on REFIID types

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Neil S.

    Accessing Active Directory : unresolved token on REFIID types

    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
    IADsOpenDsObjec t. 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_IADsOpenDSO bject" 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;
    IADsOpenDSObjec t *pDSO;
    hr = ADsGetObject(L" LDAP:", IID_IADsOpenDSO bject, (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.
  • John Harrison

    #2
    Re: Accessing Active Directory : unresolved token on REFIID types


    "Neil S." <nsyphers@trave lers.com> wrote in message
    news:6139f479.0 405061227.742d5 2b5@posting.goo gle.com...[color=blue]
    > I'm a bit of a newbie to C++, so I apologize in advance if this is
    > silly.
    >[/color]

    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.



    john


    Comment

    • Lawrie

      #3
      Re: Accessing Active Directory : unresolved token on REFIID types

      nsyphers@travel ers.com (Neil S.) wrote in message news:<6139f479. 0405061227.742d 52b5@posting.go ogle.com>...[color=blue]
      > 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
      > IADsOpenDsObjec t. 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_IADsOpenDSO bject" 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;
      > IADsOpenDSObjec t *pDSO;
      > hr = ADsGetObject(L" LDAP:", IID_IADsOpenDSO bject, (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.[/color]

      try this group
      comp.os.ms-windows.program mer.win32

      Lawrie

      Comment

      Working...