ICMP报文中的TimeStamp报文要求如此格式。虽然其他格式也不算错,但我还是想知道如何取得,用什么函数。

解决方案 »

  1.   

    LPSYSTEMTIME lpSystemTime;
    GetSystemTime(lpSystemTime);LPSYSTEMTIME 是一个结构,它的定义如下:
    typedef struct _SYSTEMTIME { 
        WORD wYear; 
        WORD wMonth; 
        WORD wDayOfWeek; 
        WORD wDay; 
        WORD wHour; 
        WORD wMinute; 
        WORD wSecond; 
        WORD wMilliseconds; 
    } SYSTEMTIME, *PSYSTEMTIME; Members
    wYear 
    Specifies the current year. 
    wMonth 
    Specifies the current month; January = 1, February = 2, and so on. 
    wDayOfWeek 
    Specifies the current day of the week; Sunday = 0, Monday = 1, and so on. 
    wDay 
    Specifies the current day of the month. 
    wHour 
    Specifies the current hour. 
    wMinute 
    Specifies the current minute. 
    wSecond 
    Specifies the current second. 
    wMilliseconds 
    Specifies the current millisecond. <--这个应该是你要的。
      

  2.   

    "wMilliseconds :Specifies the current millisecond."
    不是啊,要求的时间是从0:00到现在过了多少毫秒……
      

  3.   

    我记得学C的时候在C的TIME.H中有个函数可以得到
    你可以去找找啊