Welcome to Soft32 Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

w32time with multiple IP addresses

 
   Soft32 Home -> PDA -> Pocket PC Developer Networking RSS
Next:  lineGetGeneralInfo returns LINEERR_OPERATIONUNAVA..  
Author Message
Paul Turelinckx

External


Since: Jun 18, 2009
Posts: 2



(Msg. 1) Posted: Thu Jun 18, 2009 6:44 am
Post subject: w32time with multiple IP addresses
Archived from groups: microsoft>public>pocketpc>developer>networking (more info?)

We are using the Windows time service on Windows XP to synchronize the clock
on our POS devices.
We have configured multiple networks on our POS computers (multiple local IP
addresses): one network is used for local traffic between the POS devices, a
second network is used for communication with the 'outside world'.

The Windows time service seems to randomly use either the primary or
secondary network for communication with the network time server, causing the
time synchronization to fail when it uses the IP address for the 'local'
network.

So my question is twofold:
1. Is there a way to diagnose this problem? I don't see any event in
eventviewer when the synchronization failed.
2. How can I force the time service to use a specific IP address when there
are multiple IP addresses configured?

Thanks.
Back to top
Login to vote
BijU

External


Since: Sep 09, 2009
Posts: 1



(Msg. 2) Posted: Wed Sep 09, 2009 5:31 am
Post subject: RE: w32time with multiple IP addresses [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Paul,
I'm a beginner with Windows Time Service.
i have some doubts..
from where, i can get the function definitions of Window Time Services?
How can i use that in a program..
which library or which header file?

Please help me..
i didn't get any grip to start my job.. Sad


"Paul Turelinckx" wrote:

> We are using the Windows time service on Windows XP to synchronize the clock
> on our POS devices.
> We have configured multiple networks on our POS computers (multiple local IP
> addresses): one network is used for local traffic between the POS devices, a
> second network is used for communication with the 'outside world'.
>
> The Windows time service seems to randomly use either the primary or
> secondary network for communication with the network time server, causing the
> time synchronization to fail when it uses the IP address for the 'local'
> network.
>
> So my question is twofold:
> 1. Is there a way to diagnose this problem? I don't see any event in
> eventviewer when the synchronization failed.
> 2. How can I force the time service to use a specific IP address when there
> are multiple IP addresses configured?
>
> Thanks.
>
Back to top
Login to vote
Paul Turelinckx

External


Since: Jun 18, 2009
Posts: 2



(Msg. 3) Posted: Wed Sep 09, 2009 11:50 pm
Post subject: RE: w32time with multiple IP addresses [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi BijU,

As far as I know, there is no library nor header file to access the Windows
Time functions through an API. That leaves you with three options:
- spawn the w32tm.exe command that you need. W32tm.exe is a wrapper to
access the functions in w32time.dll
- reverse-engineer the functions provided by w32time.dll and call these from
you application
- ask Microsoft to document the w32time.dll interface

To call the functions in the dll directly, use the LoadLibrary() and
GetProcAddress() functions. Example to resync the local computer (error
handling omitted):

HMODULE h = LoadLibrary("w32time.dll");
W32TimeSyncNow pW32TimeSyncNow = (W32TimeSyncNow)GetProcAddress( h,
"W32TimeSyncNow");
int rv = (pW32TimeSyncNow)(NULL,0x01,0x03);

In case you have to support Windows2000 also, beware: Windows Time on W2K
differs completely from the implementation on XP.

I hope this helps,
Paul.

"BijU" wrote:

> Hi Paul,
> I'm a beginner with Windows Time Service.
> i have some doubts..
> from where, i can get the function definitions of Window Time Services?
> How can i use that in a program..
> which library or which header file?
>
> Please help me..
> i didn't get any grip to start my job.. Sad
>
>
> "Paul Turelinckx" wrote:
>
> > We are using the Windows time service on Windows XP to synchronize the clock
> > on our POS devices.
> > We have configured multiple networks on our POS computers (multiple local IP
> > addresses): one network is used for local traffic between the POS devices, a
> > second network is used for communication with the 'outside world'.
> >
> > The Windows time service seems to randomly use either the primary or
> > secondary network for communication with the network time server, causing the
> > time synchronization to fail when it uses the IP address for the 'local'
> > network.
> >
> > So my question is twofold:
> > 1. Is there a way to diagnose this problem? I don't see any event in
> > eventviewer when the synchronization failed.
> > 2. How can I force the time service to use a specific IP address when there
> > are multiple IP addresses configured?
> >
> > Thanks.
> >
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Does default ad hoc setup assign unique ip addresses? - It seems on the devices I have that when I manually setup an ad hoc network then the answer is yes - but, does anyone....

Multiple Network Adapters - We're using two network cards in our 2002 PocketPC to connect to two different networks. But the problem is that we ca...

Pocket PC Outlook Multiple Calendars - On my laptop I have multiple calendars in my Outlook. Is there any way I can have this on a Pocket PC. Sorry if I'm...

REPOST : Multiple user PDA LAN - I have a requirement to be able to network 20 PDA's (Pocket PC's) in order that they can communicate with a laptop,..

Multiple PDP context in Win CE (Pocket PC) - Does Win CE support multiple PDP context (like symbian 7.0s & higher)? I mean that you can create multiple, for..

NDIS - Change 802.11 channel - Hi, In my program, I can change the SSID, Network mode (Ad-Hoc / Infrastructure) and BSSID. But when I try to change....
       Soft32 Home -> PDA -> Pocket PC Developer Networking All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum

Categories:
 Windows
 Linux
 Mac
  PDA


[ Contact us | Terms of Service/Privacy Policy ]