"Valer BOCAN" <bor...@usa.net> wrote in message
news:#Ni0on$iAHA.1620@tkmsftngp02...
"Eric Gunnerson (MSFT)" <eri...@no.spam.microsoft.com> wrote in message
news:uBpiGvUjAHA.1104@tkmsftngp02...
[StructLayout(Layout.Sequential)]
struct SYSTEMTIME {
short year;
short month;
short dayOfWeek;
short day;
short hour;
short minute;
short second;
short milliseconds;
}
Add this to your class:
[DllImport("kernel32.dll")]
static extern bool SetSystemTime(SYSTEMTIME time);
and then create an instance of SYSTEMTIME and call SetSystemTime() with it.
Can you send me your code when you get it done (or perhaps post it to
http://www.gotdotnet.com); it sounds interesting...
"Valer BOCAN" <bor...@usa.net> wrote in message
news:uYTLNoXjAHA.1352@tkmsftngp02...
[StructLayoutAttribute(LayoutKind.Sequential)]
private struct SYSTEMTIME
{
public short year;
public short month;
public short dayOfWeek;
public short day;
public short hour;
public short minute;
public short second;
public short milliseconds;
}
[DllImport("kernel32.dll")]
static unsafe extern bool SetLocalTime(SYSTEMTIME *time);
"Eric Gunnerson (MSFT)" <eri...@no.spam.microsoft.com> wrote in message
news:O10nq1XjAHA.2184@tkmsftngp02...
"Valer BOCAN" <bor...@usa.net> wrote in message
news:#mei57skAHA.1696@tkmsftngp04...