Previous Next

Thread: ADSI in a C++ Application (IISPropertyAttribute linker error)

Last post 06-30-2008 10:51 AM by hmoser. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 06-23-2008, 8:55 AM

    • hmoser
    • Not Ranked
    • Joined on 03-30-2007, 9:48 AM
    • Posts 6

    ADSI in a C++ Application (IISPropertyAttribute linker error)

     Hi,

    I have to write a little tool that configures some aspects of an IIS 6 via the C++ ADSI API.

    One of its tasks is to retrieve information wheter an entry is inherited. Regarding to the MSDN documentation (http://msdn.microsoft.com/en-us/library/ms525121.aspx) the IISPropertyAttribute Interface is what i need. So i tried the following to get this interface from an path:

    ADsGetObject(path, IID_IADs, (void **)&pADs);
    IISPropertyAttribute *pPropAttr = NULL;
    pADs->QueryInterface(IID_IISPropertyAttribute, (void **)&pPropAttr);

    The code compiles but cant be linked (unresolved external symbol _IID_IISPropertyAttribute). Querying an other interface (e.g. IISApp3) works as expected:

    ADsGetObject(path, IID_IADs, (void **)&pADs);
    IISApp3 *pApp3 = NULL;
    pADs->QueryInterface( IID_IISApp3, (void **)&pApp3 );

    I wonder what im doing wrong here (wrong ADSI libs? .. they are from the plattform sdk).

     

    Thanks in advance for your help,

    Holger 

  • 06-27-2008, 2:31 AM In reply to

    Re: ADSI in a C++ Application (IISPropertyAttribute linker error)

    Hi Holger,

    Activeds.lib library is required to link ADSI program, this is a library included in the Windows SDK (Platform SDK). Please include it in the linking libraries in your project.


     

    Zhao Ji Ma
    Sincerely,
    Microsoft Online Community Support

    “Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
  • 06-30-2008, 10:51 AM In reply to

    • hmoser
    • Not Ranked
    • Joined on 03-30-2007, 9:48 AM
    • Posts 6

    Re: ADSI in a C++ Application (IISPropertyAttribute linker error)

    Hi Zhao Ji Ma,

     Thanks for your posting. Unfortunately this is no solution to my problem because (maybe i didnt make myself clear enough there) i already link against that lib (and also adsi.lib).

Page 1 of 1 (3 items)
Page view counter