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. How can i get date valu from ADSI with c++ code

How can i get date valu from ADSI with c++ code

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
4 Posts 2 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.
  • V Offline
    V Offline
    venkatesh52867
    wrote on last edited by
    #1

    Hi, i am not able to get Date value from ADSI directory VARIANT var; hr = ADsOpenObject(path,NULL,NULL,0, IID_IADsUser, id**)&pUsr); HRESULT h1= pUsr->Get(L"pwdLastSet", &var); INT8 bb=var.date; This code is not working pwdLastSet type is integer8 .it stores date value how can i get date value from adsi with c++ code please help anyone

    L 1 Reply Last reply
    0
    • V venkatesh52867

      Hi, i am not able to get Date value from ADSI directory VARIANT var; hr = ADsOpenObject(path,NULL,NULL,0, IID_IADsUser, id**)&pUsr); HRESULT h1= pUsr->Get(L"pwdLastSet", &var); INT8 bb=var.date; This code is not working pwdLastSet type is integer8 .it stores date value how can i get date value from adsi with c++ code please help anyone

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Check your return codes to see if any function calls have failed and find out why. Single stepping through your code with the debugger should quickly show what is happening.

      Use the best guess

      V 1 Reply Last reply
      0
      • L Lost User

        Check your return codes to see if any function calls have failed and find out why. Single stepping through your code with the debugger should quickly show what is happening.

        Use the best guess

        V Offline
        V Offline
        venkatesh52867
        wrote on last edited by
        #3

        Hi Richard, Thanks for reply .The method is return success var.date value returns 2.613867737909e-316#DEN . i am not able to understand this value.

        L 1 Reply Last reply
        0
        • V venkatesh52867

          Hi Richard, Thanks for reply .The method is return success var.date value returns 2.613867737909e-316#DEN . i am not able to understand this value.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          What does the documentation say about the format of this value? Your original sample code stated that it is an INT8, but you are displaying it as (a very small) floating point number.

          Use the best guess

          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