setsystemtime cannot set millisecond  
Author Message
garrit





PostPosted: Visual FoxPro General, setsystemtime cannot set millisecond Top

Hi, I want to set the system clock of my PDA (WM2003) to milliseconds. I use now setsystemtime but it seems that it doesn't set the millisecond field, (year/month/day/hour/min/sec is ok.) because if I call getsystemtime directly after this method it returns always 0. Anybody can help

My code:

SYSTEMTIME st;
st.wYear = year;
st.wMonth = month;
st.wDay = day;
st.wHour = hour;
st.wMinute = minute;
st.wSecond = second;
st.wMilliseconds = millis;
SetSystemTime(&st);



Visual FoxPro2  
 
 
CetinBasoz





PostPosted: Visual FoxPro General, setsystemtime cannot set millisecond Top

It might be related to your PDA and/or OS. Under XP it works for me.

PS: If you post this question to a C forum probably you'd get better replies.


 
 
Aleniko





PostPosted: Visual FoxPro General, setsystemtime cannot set millisecond Top

Is this a VFP related question Is there a version of VFP or a third party product that can run a limited version VFP on a wm2003



 
 
CetinBasoz





PostPosted: Visual FoxPro General, setsystemtime cannot set millisecond Top

No, not directly. The code as I see is a C code using SetSystemTime winAPI. I simply have the same API call in a prg and working right (under XP:).
 
 
garrit





PostPosted: Visual FoxPro General, setsystemtime cannot set millisecond Top

sorry for posting in the wrong forum, it's indeed c code called from a java program.For XP is works also for me, I read it cannot be done but I found some other solution. thanks