NET_API_STATUS NetRemoteTOD(
LPCWSTR UncServerName,
LPBYTE *BufferPtr
);
Sample in C++:
//
// Call the NetRemoteTOD function.
//
nStatus = NetRemoteTOD(pszServerName,
(LPBYTE *)&pBuf);
//
// If the function succeeds, display the current date and time.
//
if (nStatus == NERR_Success)
{
if (pBuf != NULL)
{
fprintf(stderr, "/nThe current date is: %d/%d/%d/n",
pBuf->tod_month, pBuf->tod_day, pBuf->tod_year);
fprintf(stderr, "The current time is: %d:%d:%d/n",
pBuf->tod_hours, pBuf->tod_mins, pBuf->tod_secs);
}
}