Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

NtQuerySystemTime function

[NtQuerySystemTime may be altered or unavailable in future versions of Windows. Applications should use the GetSystemTimeAsFileTime function.]

Retrieves the current system time.

Syntax


NTSTATUS WINAPI NtQuerySystemTime(
  _Out_ PLARGE_INTEGER SystemTime
);

Parameters

SystemTime [out]

A pointer to a LARGE_INTEGER structure that receives the system time. This is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC).

Return value

If the function succeeds, it returns STATUS_SUCCESS. If it fails, it will return the appropriate status code, which will typically be STATUS_ACCESS_VIOLATION.

Remarks

This function has no associated import library. You must use the LoadLibrary and GetProcAddress functions to dynamically link to Ntdll.dll.

Requirements

Header

Winternl.h

DLL

Ntdll.dll

See also

GetSystemTimeAsFileTime
Time Functions

 

 

Show:
© 2017 Microsoft