Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Include for IID's ?

Include for IID's ?

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestionannouncement
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Bernhard
    wrote on last edited by
    #1

    i use following code#include <Iads.h> #include <Adshlp.h> #pragma comment(lib, "ActiveDS.Lib") #include <COMDEF.H> bool CheckUserADSI(const char* parUserName, const char* parCode) { IADsOpenDSObject* pObject = NULL; IDispatch* pDisp = NULL; bool RetValue = false; HRESULT hr = S_OK; _bstr_t UserName (parUserName); _bstr_t Code (parCode); // hr = ADsGetObject(L"LDAP:", IID_IADsOpenDSObject, (void**) &pObject); hr = ADsGetObject(L"LDAP:", IID_IADsUser, (void**) &pObject); if (SUCCEEDED(hr)) { hr = pObject->OpenDSObject(L"LDAP://net.blum",UserName, Code, ADS_SECURE_AUTHENTICATION, &pDisp); pObject->Release(); if (SUCCEEDED(hr)) { RetValue = true; } } pDisp = NULL; pObject = NULL; return RetValue; }
    when i compile the code, the compiler says: WinLogon.obj : error LNK2001: unresolved external symbol _IID_IADsUser Any ideas how to solve this problem ? I've checked the platform SDK samples.. all are using this IID.. but i haven't seen a single include or lib file they were linking..


    "I'm from the South Bronx, and I don't care what you say: those cows look dangerous."
    U.S. Secretary of State Colin Powell at George Bush's ranch in Texas

    A J 2 Replies Last reply
    0
    • B Bernhard

      i use following code#include <Iads.h> #include <Adshlp.h> #pragma comment(lib, "ActiveDS.Lib") #include <COMDEF.H> bool CheckUserADSI(const char* parUserName, const char* parCode) { IADsOpenDSObject* pObject = NULL; IDispatch* pDisp = NULL; bool RetValue = false; HRESULT hr = S_OK; _bstr_t UserName (parUserName); _bstr_t Code (parCode); // hr = ADsGetObject(L"LDAP:", IID_IADsOpenDSObject, (void**) &pObject); hr = ADsGetObject(L"LDAP:", IID_IADsUser, (void**) &pObject); if (SUCCEEDED(hr)) { hr = pObject->OpenDSObject(L"LDAP://net.blum",UserName, Code, ADS_SECURE_AUTHENTICATION, &pDisp); pObject->Release(); if (SUCCEEDED(hr)) { RetValue = true; } } pDisp = NULL; pObject = NULL; return RetValue; }
      when i compile the code, the compiler says: WinLogon.obj : error LNK2001: unresolved external symbol _IID_IADsUser Any ideas how to solve this problem ? I've checked the platform SDK samples.. all are using this IID.. but i haven't seen a single include or lib file they were linking..


      "I'm from the South Bronx, and I don't care what you say: those cows look dangerous."
      U.S. Secretary of State Colin Powell at George Bush's ranch in Texas

      J Offline
      J Offline
      jmkhael
      wrote on last edited by
      #2

      #include Papa while (TRUE) Papa.WillLove ( Bebe ) ;

      B 1 Reply Last reply
      0
      • B Bernhard

        i use following code#include <Iads.h> #include <Adshlp.h> #pragma comment(lib, "ActiveDS.Lib") #include <COMDEF.H> bool CheckUserADSI(const char* parUserName, const char* parCode) { IADsOpenDSObject* pObject = NULL; IDispatch* pDisp = NULL; bool RetValue = false; HRESULT hr = S_OK; _bstr_t UserName (parUserName); _bstr_t Code (parCode); // hr = ADsGetObject(L"LDAP:", IID_IADsOpenDSObject, (void**) &pObject); hr = ADsGetObject(L"LDAP:", IID_IADsUser, (void**) &pObject); if (SUCCEEDED(hr)) { hr = pObject->OpenDSObject(L"LDAP://net.blum",UserName, Code, ADS_SECURE_AUTHENTICATION, &pDisp); pObject->Release(); if (SUCCEEDED(hr)) { RetValue = true; } } pDisp = NULL; pObject = NULL; return RetValue; }
        when i compile the code, the compiler says: WinLogon.obj : error LNK2001: unresolved external symbol _IID_IADsUser Any ideas how to solve this problem ? I've checked the platform SDK samples.. all are using this IID.. but i haven't seen a single include or lib file they were linking..


        "I'm from the South Bronx, and I don't care what you say: those cows look dangerous."
        U.S. Secretary of State Colin Powell at George Bush's ranch in Texas

        A Offline
        A Offline
        Anand Paranjpe
        wrote on last edited by
        #3

        Hi, use "__uuidof ( expression )", where "expression" is interface name ie "IADsUser". The chosen One :)

        1 Reply Last reply
        0
        • J jmkhael

          #include Papa while (TRUE) Papa.WillLove ( Bebe ) ;

          B Offline
          B Offline
          Bernhard
          wrote on last edited by
          #4

          guess you forgot to use the <> - Tags.. so your include got stripped..


          "I'm from the South Bronx, and I don't care what you say: those cows look dangerous."
          U.S. Secretary of State Colin Powell at George Bush's ranch in Texas

          D 1 Reply Last reply
          0
          • B Bernhard

            guess you forgot to use the <> - Tags.. so your include got stripped..


            "I'm from the South Bronx, and I don't care what you say: those cows look dangerous."
            U.S. Secretary of State Colin Powell at George Bush's ranch in Texas

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            #include <activeds.h> is there, you just have to look real close! ;)


            Five birds are sitting on a fence. Three of them decide to fly off. How many are left?

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups