Accessing Active Directory : unresolved token on REFIID types

N

Neil S.

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.
 
J

John Harrison

Neil S. said:
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
 
L

Lawrie

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,061
Latest member
KetonaraKeto

Latest Threads

Top