The NetRemoteTOD API returns the time of day on a server.
Restrictions
This API can be called from DLS and OS/2 workstations.
#include <netcons.h> #include <remutil.h> NetRemoteTOD(pszServername, buf, usBuflen); /* 16 bit */ Net32RemoteTOD(pszServername, buf, ulBuflen); /* 32 bit */Parameters
See Common Parameter Definitions for descriptions of parameters not defined here.
buf
The following table lists the return codes most significant to this API.
(See API Return Codes for a complete
list of return codes.) ┌────────────────────┬───────┬─────────────────────────────────────────────────┐│SYMBOLICCONSTANT
│VALUE│MEANING │
├────────────────────┼───────┼─────────────────────────────────────────────────┤
│ NERR_Success │ 0 │ No errors were encountered. │
├────────────────────┼───────┼─────────────────────────────────────────────────┤
│ NERR_BufTooSmall │ 2123 │ The buffer is too small for fixed-length data.
│
├────────────────────┼───────┼─────────────────────────────────────────────────┤
│ NERR_WkstaNotStarte│ 2138 │ The Requester service has not been started.
│
├────────────────────┼───────┼─────────────────────────────────────────────────┤
│ NERR_InvalidCompute│ 2351 │ The specified computer name is not valid.
│
└────────────────────┴───────┴─────────────────────────────────────────────────┘
For information about listing the servers on a network, see Server - NetServerEnum2.