[BATT]
authorEric Kohl <eric.kohl@reactos.org>
Fri, 19 Mar 2010 20:55:09 +0000 (20:55 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Fri, 19 Mar 2010 20:55:09 +0000 (20:55 +0000)
Add battery class installer dll.

svn path=/trunk/; revision=46277

reactos/baseaddress.rbuild
reactos/boot/bootdata/packages/reactos.dff
reactos/dll/win32/batt/batt.c [new file with mode: 0644]
reactos/dll/win32/batt/batt.rbuild [new file with mode: 0644]
reactos/dll/win32/batt/batt.rc [new file with mode: 0644]
reactos/dll/win32/batt/batt.spec [new file with mode: 0644]
reactos/dll/win32/batt/resource.h [new file with mode: 0644]
reactos/dll/win32/batt/resources/battery.ico [new file with mode: 0644]
reactos/dll/win32/win32.rbuild

index cacc80f..80401c1 100644 (file)
        <property name="BASEADDRESS_CARDS"              value="0x701a0000" />
        <property name="BASEADDRESS_WININET"            value="0x70200000" />
        <property name="BASEADDRESS_WINHTTP"            value="0x70c60000" />
+       <property name="BASEADDRESS_BATT"               value="0x70cb0000" />
        <property name="BASEADDRESS_AMSTREAM"           value="0x71030000" />
        <property name="BASEADDRESS_ACLUI"              value="0x71550000" />
        <property name="BASEADDRESS_DHCPCSVC"           value="0x71650000" />
index 75db780..a58e5c1 100644 (file)
@@ -262,6 +262,7 @@ dll\win32\atl\atl.dll                               1
 dll\win32\authz\authz.dll                           1
 dll\win32\avicap32\avicap32.dll                     1
 dll\win32\avifil32\avifil32.dll                     1
+dll\win32\batt\batt.dll                             1
 dll\win32\bcrypt\bcrypt.dll                         1
 dll\win32\beepmidi\beepmidi.dll                     1
 dll\win32\browseui\browseui.dll                     1
diff --git a/reactos/dll/win32/batt/batt.c b/reactos/dll/win32/batt/batt.c
new file mode 100644 (file)
index 0000000..0a46a39
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * PROJECT:     ReactOS system libraries
+ * LICENSE:     GPL - See COPYING in the top level directory
+ * FILE:        dll\win32\batt\batt.c
+ * PURPOSE:     Battery Class installers
+ * PROGRAMMERS: Copyright 2010 Eric Kohl
+ */
+
+
+#include <windows.h>
+#include <setupapi.h>
+
+#define NDEBUG
+#include <debug.h>
+
+
+BOOL
+WINAPI
+DllMain(HINSTANCE hinstDll,
+        DWORD dwReason,
+        LPVOID reserved)
+{
+    switch (dwReason)
+    {
+        case DLL_PROCESS_ATTACH:
+            DisableThreadLibraryCalls(hinstDll);
+            break;
+
+        case DLL_PROCESS_DETACH:
+            break;
+    }
+
+   return TRUE;
+}
+
+
+DWORD
+WINAPI
+BatteryClassCoInstaller(IN DI_FUNCTION InstallFunction,
+                        IN HDEVINFO DeviceInfoSet,
+                        IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL)
+{
+    switch (InstallFunction)
+    {
+        default:
+            DPRINT("Install function %u ignored\n", InstallFunction);
+            return ERROR_DI_DO_DEFAULT;
+    }
+}
+
+
+DWORD
+WINAPI
+BatteryClassInstall(IN DI_FUNCTION InstallFunction,
+                    IN HDEVINFO DeviceInfoSet,
+                    IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL)
+{
+    switch (InstallFunction)
+    {
+        default:
+            DPRINT("Install function %u ignored\n", InstallFunction);
+            return ERROR_DI_DO_DEFAULT;
+    }
+}
+
+/* EOF */
diff --git a/reactos/dll/win32/batt/batt.rbuild b/reactos/dll/win32/batt/batt.rbuild
new file mode 100644 (file)
index 0000000..221bc3d
--- /dev/null
@@ -0,0 +1,9 @@
+<module name="batt" type="win32dll" baseaddress="${BASEADDRESS_BATT}" installbase="system32" installname="batt.dll" unicode="yes">
+       <importlibrary definition="batt.spec" />
+       <include base="batt">.</include>
+       <library>setupapi</library>
+       <library>kernel32</library>
+       <library>ntdll</library>
+       <file>batt.c</file>
+       <file>batt.rc</file>
+</module>
diff --git a/reactos/dll/win32/batt/batt.rc b/reactos/dll/win32/batt/batt.rc
new file mode 100644 (file)
index 0000000..5d3f1c7
--- /dev/null
@@ -0,0 +1,13 @@
+#include <windows.h>
+#include "resource.h"
+
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+
+#define REACTOS_VERSION_DLL
+#define REACTOS_STR_FILE_DESCRIPTION   "Battery Class Installer\0"
+#define REACTOS_STR_INTERNAL_NAME      "batt\0"
+#define REACTOS_STR_ORIGINAL_FILENAME  "batt.dll\0"
+#include <reactos/version.rc>
+
+
+IDI_BATTERY ICON "resources/battery.ico"
diff --git a/reactos/dll/win32/batt/batt.spec b/reactos/dll/win32/batt/batt.spec
new file mode 100644 (file)
index 0000000..efb53f5
--- /dev/null
@@ -0,0 +1,3 @@
+@ stdcall BatteryClassCoInstaller(long ptr ptr)
+@ stdcall BatteryClassInstall(long ptr ptr)
+
diff --git a/reactos/dll/win32/batt/resource.h b/reactos/dll/win32/batt/resource.h
new file mode 100644 (file)
index 0000000..d506679
--- /dev/null
@@ -0,0 +1 @@
+#define IDI_BATTERY 2
\ No newline at end of file
diff --git a/reactos/dll/win32/batt/resources/battery.ico b/reactos/dll/win32/batt/resources/battery.ico
new file mode 100644 (file)
index 0000000..fae1017
Binary files /dev/null and b/reactos/dll/win32/batt/resources/battery.ico differ
index 9ff3319..ad862f5 100644 (file)
@@ -31,6 +31,9 @@
 <directory name="avifil32">
        <xi:include href="avifil32/avifil32.rbuild" />
 </directory>
+<directory name="batt">
+       <xi:include href="batt/batt.rbuild" />
+</directory>
 <directory name="bcrypt">
        <xi:include href="bcrypt/bcrypt.rbuild" />
 </directory>