Ignore:
Timestamp:
Dec 28, 1999, 8:16:35 PM (26 years ago)
Author:
sandervl
Message:

registry tree added + getsystempowerstatus implemented

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/KERNEL32.CPP

    r2197 r2229  
    1 /* $Id: KERNEL32.CPP,v 1.39 1999-12-24 18:40:08 sandervl Exp $ */
     1/* $Id: KERNEL32.CPP,v 1.40 1999-12-28 19:16:34 sandervl Exp $ */
    22
    33/*
     
    3535#include "handlemanager.h"
    3636#include "wprocess.h"
    37 
     37#include <versionos2.h>
    3838
    3939/*****************************************************************************
     
    559559        return(FALSE);
    560560
    561    lpVersionInformation->dwMajorVersion = 4;    //pretend we're NT 4.0
    562    lpVersionInformation->dwMinorVersion = 0;
    563    lpVersionInformation->dwBuildNumber  = 0x565;
     561   lpVersionInformation->dwMajorVersion = ODINNT_MAJOR_VERSION;    //pretend we're NT 4.0
     562   lpVersionInformation->dwMinorVersion = ODINNT_MINOR_VERSION;
     563   lpVersionInformation->dwBuildNumber  = ODINNT_BUILD_NR;
    564564   lpVersionInformation->dwPlatformId   = VER_PLATFORM_WIN32_NT;
    565    strcpy(lpVersionInformation->szCSDVersion, "Service Pack 3");
     565   strcpy(lpVersionInformation->szCSDVersion, ODINNT_CSDVERSION);
    566566   return(TRUE);
    567567}
     
    575575        return(FALSE);
    576576
    577    lpVersionInformation->dwMajorVersion = 4;    //pretend we're NT 4.0
    578    lpVersionInformation->dwMinorVersion = 0;
    579    lpVersionInformation->dwBuildNumber  = 0x565;
     577   lpVersionInformation->dwMajorVersion = ODINNT_MAJOR_VERSION;    //pretend we're NT 4.0
     578   lpVersionInformation->dwMinorVersion = ODINNT_MINOR_VERSION;
     579   lpVersionInformation->dwBuildNumber  = ODINNT_BUILD_NR;
    580580   lpVersionInformation->dwPlatformId   = VER_PLATFORM_WIN32_NT;
    581    lstrcpyW(lpVersionInformation->szCSDVersion, (LPWSTR)L"Service Pack 3");
     581   lstrcpyW(lpVersionInformation->szCSDVersion, ODINNT_CSDVERSION_W);
    582582   return(TRUE);
    583583}
     
    591591/*                structures that lead to crashes if we don't identify as NT */
    592592
    593 //  return(WIN32OS2_VERSION);
    594   return (0x0000004);
     593  return ODINNT_VERSION;
    595594}
    596595//******************************************************************************
     
    749748
    750749
     750/*****************************************************************************
     751 * Name      : BOOL GetSystemPowerStatus
     752 * Purpose   : The GetSystemPowerStatus function retrieves the power status of
     753 *             the system. The status indicates whether the system is running
     754 *             on AC or DC power, whether the battery is currently charging,
     755 *             and how much battery life currently remains.
     756 * Parameters: LPSYSTEM_POWER_STATUS lpSystemPowerStatus
     757 * Variables :
     758 * Result    : TRUE / FALSE
     759 * Remark    :
     760 * Status    : UNTESTED STUB
     761 *
     762 * Author    : Patrick Haller [Mon, 1998/06/15 08:00]
     763 *****************************************************************************/
     764
     765BOOL WIN32API GetSystemPowerStatus(LPSYSTEM_POWER_STATUS lpSystemPowerStatus)
     766{
     767  dprintf(("Kernel32: GetSystemPowerStatus(%08xh) not properly implemented.\n",
     768           lpSystemPowerStatus));
     769
     770  if(lpSystemPowerStatus == NULL) {
     771        SetLastError(ERROR_INVALID_PARAMETER);
     772        return FALSE;
     773  }
     774  lpSystemPowerStatus->ACLineStatus       = 1; //online
     775  lpSystemPowerStatus->BatteryFlag        = 128; //no system battery
     776  lpSystemPowerStatus->BatteryLifePercent = 255; //unknown
     777  lpSystemPowerStatus->reserved           = 0;
     778  lpSystemPowerStatus->BatteryLifeTime    = -1; //unknown
     779  lpSystemPowerStatus->BatteryFullLifeTime= -1; //unknown
     780
     781  return TRUE;
     782}
Note: See TracChangeset for help on using the changeset viewer.