Problem with LeaseExpires in IPHelper Example RRS feed

  • Question

  • I got the C code from


    Compile it with MSVC C++ 2008 Express; when I run it either under XP or Vista 64-bit, the Lease Expires date/time is wrong - it comes up as sometime in 1970.

    Even the date from the adapter info structure is ridiculously low, corresponding the the date I get.

    The command line ipconfig /all gives a reasonable date which differs from that I get from the iphelper code.

    Any ideas will be most welcome


    Friday, January 14, 2011 7:42 PM


  • Problem Solved :-)

    I needed to #define _USE_32BIT_TIME_T

    With that, it gives the correct time for the Expiry time

    • Marked as answer by miniTester Friday, January 21, 2011 8:19 PM
    Saturday, January 15, 2011 12:50 AM