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. Advertisements

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:
    503
    Tom St Denis
    Jul 7, 2003
  2. flamesrock
    Replies:
    8
    Views:
    802
    Hendrik van Rooyen
    Nov 24, 2006
  3. just4me

    how do I read a location in the bios eprom

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

    KeyB typeahead buffer in BIOS

    Sree, May 8, 2006, in forum: C Programming
    Replies:
    2
    Views:
    416
    Rod Pemberton
    May 8, 2006
  6. Replies:
    1
    Views:
    1,108
    Alexey Smirnov
    Apr 6, 2007
  7. acprkit

    deleated bios?

    acprkit, Jul 4, 2007, in forum: Python
    Replies:
    0
    Views:
    307
    acprkit
    Jul 4, 2007
  8. joeblack

    BIOS tricks.......Free E-Book

    joeblack, Dec 11, 2009, in forum: Python
    Replies:
    0
    Views:
    1,213
    joeblack
    Dec 11, 2009
Loading...