![]() ![]() If NetRemoteTOD(bytServer(0), lngBufPtr) = NERR_SUCCESS ThenĬopyMemory todReturned, ByVal lngBufPtr, LenB(todReturned)ĭateSerial(.tod_year. Private Function GetTOD(ByVal Server As String) As Date Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" ( _ Private Declare Function NetRemoteTOD Lib "netapi32" ( _ Private Declare Function NetApiBufferFree Lib "netapi32" ( _ 'DNS name, or IP address - or empty string for 'Fetch and display Net Remote Time Of Day from a ![]() For legit uses this probably won't be an issue, but it is long enough to discourage malicious "scanners" trying to sweep whole networks by IP address for victim machines. Give it a try, the timeout for machines that don't respond doesn't seem too long (7 or 8 seconds). Perhaps you could use NetRemoteTOD or a related simple network API, even a "ping" request.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
June 2023
Categories |