선언:

C#

[StructLayout(LayoutKind.Sequential)]
public struct SYSTEMTIME {
    public UInt16 wYear;
    public UInt16 wMonth;
    public UInt16 wDayOfWeek;
    public UInt16 wDay;
    public UInt16 wHour;
    public UInt16 wMinute;
    public UInt16 wSecond;
    public UInt16 wMilliseconds;
}


VB.NET

<StructLayout(LayoutKind.Sequential)> _
Public Structure SYSTEMTIME
    Public wYear As UInt16
    Public wMonth As UInt16
    Public wDayOfWeek As UInt16
    Public wDay As UInt16
    Public wHour As UInt16
    Public wMinute As UInt16
    Public wSecond As UInt16
    Public wMilliseconds As UInt16
End Structure




필드 설명:

wYear - 연도를 나타냅니다.

wMonth - 월을 나타냅니다.

wDayOfWeek - 요일을 나타냅니다. (자세한 내용은 비고 참고)

wDay - 일을 나타냅니다.

wHour - 시간을 나타냅니다.

wMinute - 분을 나타냅니다.

wSecond - 초를 나타냅니다.

wMilliseconds - 밀리초를 나타냅니다.




구조체 설명:

FILETIME 구조체와 같이 시간을 얻어올 때 사용되는 구조체입니다.




참고:

SYSTEMTIME (MSDN)




비고:

연도의 범위는 1601~30827

월의 범위는 1(Jan) ~ 12(Dec)

요일의 범위는 0(Sun) ~ 6(Sat)

일의 범위는 1 ~ 31

시간의 범위는 0 ~ 23

분, 초의 범위는 0 ~ 59

밀리초의 범위는 0 ~ 999 입니다.



'API Reference' 카테고리의 다른 글

39. GetLocalTime  (0) 2014.10.30
38. GetSystemTime  (0) 2014.10.30
36. SHGetFolderPath  (0) 2014.10.29
35. GetComputerName  (0) 2014.10.24
34. GetWindowsDirectory  (0) 2014.10.24

+ Recent posts