Changing system BIOS time.

Discussion in 'ASP .Net' started by Chaos, Dec 22, 2006.

  1. Chaos

    Chaos Guest

    Is where a class in .NET classes which allow change computer system time ?

    Solutions like this :

    using System.Runtime.InteropServices;
    [StructLayout(LayoutKind.Sequential)]
    public struct SYSTEMTIME {
    public UInt16 Year ;
    public UInt16 Month ;
    public UInt16 DayOfWeek ;
    public UInt16 Day ;
    public UInt16 Hour ;
    public UInt16 Minute ;
    public UInt16 Second ;
    public UInt16 MilliSecond ;
    }

    ....

    [DllImport("kernel32.dll")]
    static extern bool SetLocalTime(ref SYSTEMTIME time);

    [DllImport("kernel32.dll")]
    public static extern void GetLocalTime(ref SYSTEMTIME st);

    ....

    SYSTEMTIME time = new SYSTEMTIME();
    GetLocalTime(ref time);
    time.Hour = 10;
    SetLocalTime(ref time);

    is inappropriate - not portable to another platforms.

    Thks.
     
    Chaos, Dec 22, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. J. Rodrigo A. V.

    BIOS access

    J. Rodrigo A. V., Jul 7, 2003, in forum: C Programming
    Replies:
    1
    Views:
    420
    Tom St Denis
    Jul 7, 2003
  2. just4me

    how do I read a location in the bios eprom

    just4me, Jul 5, 2004, in forum: C Programming
    Replies:
    10
    Views:
    660
    just4me
    Jul 6, 2004
  3. just4me
    Replies:
    1
    Views:
    289
    Mark A. Odell
    Jul 16, 2004
  4. Sree

    KeyB typeahead buffer in BIOS

    Sree, May 8, 2006, in forum: C Programming
    Replies:
    2
    Views:
    305
    Rod Pemberton
    May 8, 2006
  5. Replies:
    1
    Views:
    869
    Alexey Smirnov
    Apr 6, 2007
Loading...

Share This Page