0 out of 2 rated this helpful - Rate this topic

NtQuerySystemTime function

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

Applies to: desktop apps only

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

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ