Click here to Skip to main content
15,896,153 members
Articles / Desktop Programming / Windows Forms

An SNTP Client for C# and VB.NET

Rate me:
Please Sign up or sign in to vote.
4.93/5 (29 votes)
22 Jul 2009CPOL11 min read 163.3K   9K   66  
A complete overview and implementation of SNTP from a client perspective.
Imports System.Runtime.InteropServices

Namespace Interop

    Friend Class Functions
        ' http://msdn.microsoft.com/en-us/library/ms724936(VS.85).aspx
        ''' <summary>
        ''' Sets the current local time and date.
        ''' </summary>
        ''' <param name="lpSystemTime">A SYSTEMTIME structure that contains the new local date and time.</param>
        ''' <returns>True if the function succeeds, otherwise False.</returns>
        <DllImport("kernel32.dll")> _
        Public Shared Function SetLocalTime(ByRef lpSystemTime As SYSTEMTIME) As Boolean
        End Function

    End Class

End Namespace

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
CEO Dave Meadowcroft
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions