Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 567001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:02:13+00:00 2026-05-13T13:02:13+00:00

In windows application, I use w32tm to force the computer sync the time with

  • 0

In windows application, I use w32tm to force the computer sync the time with a specific time resource.
But now I am doing a PDA application on WM5.0, w32tm is not available anymore and have no idea how to start with after a bit search on google.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T13:02:13+00:00Added an answer on May 13, 2026 at 1:02 pm

    Here is a good example.

    For completeness, here’s the code from the blog article:

    public DateTime GetNTPTime()
    {
        // 0x1B == 0b11011 == NTP version 3, client - see RFC 2030
        byte[] ntpPacket = new byte[] { 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
    
        IPAddress[] addressList = Dns.GetHostEntry("pool.ntp.org").AddressList;
    
        if (addressList.Length == 0)
        {
            // error
            return DateTime.MinValue;
        }
    
        IPEndPoint ep = new IPEndPoint(addressList[0], 123);
        UdpClient client = new UdpClient();
        client.Connect(ep);
        client.Send(ntpPacket, ntpPacket.Length);
        byte[] data = client.Receive(ref ep);
    
        // receive date data is at offset 32
        // Data is 64 bits - first 32 is seconds - we'll toss the fraction of a second
        // it is not in an endian order, so we must rearrange
        byte[] endianSeconds = new byte[4];
        endianSeconds[0] = data[32 + 3];
        endianSeconds[1] = data[32 + 2];
        endianSeconds[2] = data[32 + 1];
        endianSeconds[3] = data[32 + 0];
        uint seconds = BitConverter.ToUInt32(endianSeconds, 0);
    
        return (new DateTime(1900, 1, 1)).AddSeconds(seconds);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Now my team working in a project using Windows Application(C#) . We use MSI
I have my Windows Application that accepts args and I use this in order
I have a Windows application written in C++ that occasionally evaporates. I use the
I want to develop a windows application. If I use native C++ and MFC
Which standalone Windows GUI application do you recommend for use for accessing a Subversion
I'm writing a windows C# application which I wish to use data grid views,
I am working on a windows form application. How do i use the find
I'm trying to use NAnt/NAntContrib build script to build a web application on Windows
I'm building a C++ application and need to use PDCurses on Windows. I'm compiling
I use the x64 version of Windows 7. My application use some COM servers

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.