use a .spec file and fix the export ordinals
authorThomas Bluemel <thomas@reactsoft.com>
Fri, 30 Dec 2005 21:18:25 +0000 (21:18 +0000)
committerThomas Bluemel <thomas@reactsoft.com>
Fri, 30 Dec 2005 21:18:25 +0000 (21:18 +0000)
svn path=/trunk/; revision=20469

reactos/lib/devmgr/devmgr.def [deleted file]
reactos/lib/devmgr/devmgr.spec [new file with mode: 0644]
reactos/lib/devmgr/devmgr.xml
reactos/lib/devmgr/hwpage.c
reactos/lib/devmgr/precomp.h
reactos/lib/devmgr/stubs.c

diff --git a/reactos/lib/devmgr/devmgr.def b/reactos/lib/devmgr/devmgr.def
deleted file mode 100644 (file)
index 7c2904d..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-LIBRARY devmgr.dll
-
-EXPORTS
-DeviceProperties_RunDLLA@16
-DeviceProperties_RunDLLW@16
-DevicePropertiesA@20
-DevicePropertiesW@20
-DeviceManager_ExecuteA@16
-DeviceManager_ExecuteW@16
-DeviceProblemTextA@20
-DeviceProblemTextW@20
-DeviceProblemWizardA@12
-DeviceProblemWizardW@12
-DeviceManagerPrintA@20
-DeviceManagerPrintW@20
-DeviceAdvancedPropertiesA@12
-DeviceAdvancedPropertiesW@12
-DeviceCreateHardwarePage@8
-DeviceCreateHardwarePageEx@16
-DevicePropertiesExA@20
-DevicePropertiesExW@20
-DeviceProblemWizard_RunDLLA@16
-DeviceProblemWizard_RunDLLW@16
-
-; Export these functions only for the sake of compatibility, they're obviously typos
-DeviceProblenWizard_RunDLLA@16=DeviceProblemWizard_RunDLLA@16
-DeviceProblenWizard_RunDLLW@16=DeviceProblemWizard_RunDLLW@16
-
-; EOF
diff --git a/reactos/lib/devmgr/devmgr.spec b/reactos/lib/devmgr/devmgr.spec
new file mode 100644 (file)
index 0000000..b16d647
--- /dev/null
@@ -0,0 +1,27 @@
+# devmgr.dll exports
+
+ 5 stdcall DeviceProperties_RunDLLA(ptr ptr str long)
+ 6 stdcall DeviceProperties_RunDLLW(ptr ptr wstr long)
+ 7 stdcall DevicePropertiesA(ptr ptr str str long)
+ 8 stdcall DevicePropertiesW(ptr ptr wstr wstr long)
+ 9 stdcall DeviceManager_ExecuteA(ptr ptr str long)
+10 stdcall DeviceManager_ExecuteW(ptr ptr wstr long)
+11 stdcall DeviceProblemTextA(ptr long long str long)
+12 stdcall DeviceProblemTextW(ptr long long wstr long)
+13 stdcall DeviceProblemWizardA(ptr str str)
+14 stdcall DeviceProblemWizardW(ptr wstr wstr)
+15 stdcall DeviceManagerPrintA(str str long long ptr)
+16 stdcall DeviceManagerPrintW(wstr wstr long long ptr)
+17 stdcall DeviceAdvancedPropertiesA(ptr str str)
+18 stdcall DeviceAdvancedPropertiesW(ptr wstr wstr)
+19 stdcall DeviceCreateHardwarePage(ptr ptr)
+20 stdcall DeviceCreateHardwarePageEx(ptr ptr long long)
+21 stdcall DevicePropertiesExA(ptr str str long long)
+22 stdcall DevicePropertiesExW(ptr wstr wstr long long)
+23 stdcall DeviceProblenWizard_RunDLLA(ptr ptr str long) DeviceProblemWizard_RunDLLA
+24 stdcall DeviceProblenWizard_RunDLLW(ptr ptr wstr long) DeviceProblemWizard_RunDLLW
+
+25 stub DllCanUnloadNow
+26 stub DllGetClassObject
+27 stub DllRegisterServer
+28 stub DllUnregisterServer
index 12caf9b..c7435dd 100644 (file)
@@ -1,6 +1,6 @@
 <module name="devmgr" type="win32dll" baseaddress="${BASEADDRESS_DEVENUM}" installbase="system32" installname="devmgr.dll" allowwarnings="true">
 <module name="devmgr" type="win32dll" baseaddress="${BASEADDRESS_DEVENUM}" installbase="system32" installname="devmgr.dll" allowwarnings="true">
-       <importlibrary definition="devmgr.def" />
        <include base="devmgr">.</include>
        <include base="devmgr">.</include>
+       <importlibrary definition="devmgr.spec.def" />
        <define name="UNICODE" />
        <define name="_UNICODE" />
        <define name="__REACTOS__" />
        <define name="UNICODE" />
        <define name="_UNICODE" />
        <define name="__REACTOS__" />
@@ -19,5 +19,6 @@
        <file>hwpage.c</file>
        <file>misc.c</file>
        <file>stubs.c</file>
        <file>hwpage.c</file>
        <file>misc.c</file>
        <file>stubs.c</file>
+       <file>devmgr.spec</file>
        <pch>precomp.h</pch>
 </module>
\ No newline at end of file
        <pch>precomp.h</pch>
 </module>
\ No newline at end of file
index 855fb3e..b871747 100644 (file)
@@ -1030,8 +1030,7 @@ DeviceCreateHardwarePageEx(IN HWND hWndParent,
     hpd = HeapAlloc(GetProcessHeap(),
                     HEAP_ZERO_MEMORY,
                     FIELD_OFFSET(HARDWARE_PAGE_DATA,
     hpd = HeapAlloc(GetProcessHeap(),
                     HEAP_ZERO_MEMORY,
                     FIELD_OFFSET(HARDWARE_PAGE_DATA,
-                                 ClassDevInfo) +
-                        (uNumberOfGuids * sizeof(HWCLASSDEVINFO)));
+                                 ClassDevInfo[uNumberOfGuids]));
     if (hpd != NULL)
     {
         HWND hWnd;
     if (hpd != NULL)
     {
         HWND hWnd;
index 86601c2..a5a699f 100644 (file)
@@ -30,14 +30,14 @@ VOID
 WINAPI
 DeviceProperties_RunDLLA(HWND hWndParent,
                          HINSTANCE hInst,
 WINAPI
 DeviceProperties_RunDLLA(HWND hWndParent,
                          HINSTANCE hInst,
-                         LPCWSTR lpDeviceCmd,
+                         LPCSTR lpDeviceCmd,
                          int nCmdShow);
 
 VOID
 WINAPI
 DeviceProperties_RunDLLW(HWND hWndParent,
                          HINSTANCE hInst,
                          int nCmdShow);
 
 VOID
 WINAPI
 DeviceProperties_RunDLLW(HWND hWndParent,
                          HINSTANCE hInst,
-                         LPCSTR lpDeviceCmd,
+                         LPCWSTR lpDeviceCmd,
                          int nCmdShow);
 
 int
                          int nCmdShow);
 
 int
index cf44fca..e7b2d9e 100644 (file)
@@ -123,7 +123,7 @@ VOID
 WINAPI
 DeviceProperties_RunDLLA(HWND hWndParent,
                          HINSTANCE hInst,
 WINAPI
 DeviceProperties_RunDLLA(HWND hWndParent,
                          HINSTANCE hInst,
-                         LPCWSTR lpDeviceCmd,
+                         LPCSTR lpDeviceCmd,
                          int nCmdShow)
 {
   UNIMPLEMENTED;
                          int nCmdShow)
 {
   UNIMPLEMENTED;
@@ -159,7 +159,7 @@ VOID
 WINAPI
 DeviceProperties_RunDLLW(HWND hWndParent,
                          HINSTANCE hInst,
 WINAPI
 DeviceProperties_RunDLLW(HWND hWndParent,
                          HINSTANCE hInst,
-                         LPCSTR lpDeviceCmd,
+                         LPCWSTR lpDeviceCmd,
                          int nCmdShow)
 {
   UNIMPLEMENTED;
                          int nCmdShow)
 {
   UNIMPLEMENTED;