use a .spec file and fix the export ordinals
Deleted: trunk/reactos/lib/devmgr/devmgr.def
Added: trunk/reactos/lib/devmgr/devmgr.spec
Modified: trunk/reactos/lib/devmgr/devmgr.xml
Modified: trunk/reactos/lib/devmgr/hwpage.c
Modified: trunk/reactos/lib/devmgr/precomp.h
Modified: trunk/reactos/lib/devmgr/stubs.c

Deleted: trunk/reactos/lib/devmgr/devmgr.def
--- trunk/reactos/lib/devmgr/devmgr.def	2005-12-30 20:31:11 UTC (rev 20468)
+++ trunk/reactos/lib/devmgr/devmgr.def	2005-12-30 21:18:25 UTC (rev 20469)
@@ -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

Added: trunk/reactos/lib/devmgr/devmgr.spec
--- trunk/reactos/lib/devmgr/devmgr.spec	2005-12-30 20:31:11 UTC (rev 20468)
+++ trunk/reactos/lib/devmgr/devmgr.spec	2005-12-30 21:18:25 UTC (rev 20469)
@@ -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
Property changes on: trunk/reactos/lib/devmgr/devmgr.spec
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/reactos/lib/devmgr/devmgr.xml
--- trunk/reactos/lib/devmgr/devmgr.xml	2005-12-30 20:31:11 UTC (rev 20468)
+++ trunk/reactos/lib/devmgr/devmgr.xml	2005-12-30 21:18:25 UTC (rev 20469)
@@ -1,6 +1,6 @@
 <module name="devmgr" type="win32dll" baseaddress="${BASEADDRESS_DEVENUM}" installbase="system32" installname="devmgr.dll" allowwarnings="true">
-	<importlibrary definition="devmgr.def" />
 	<include base="devmgr">.</include>
+	<importlibrary definition="devmgr.spec.def" />
 	<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>devmgr.spec</file>
 	<pch>precomp.h</pch>
 </module>
\ No newline at end of file

Modified: trunk/reactos/lib/devmgr/hwpage.c
--- trunk/reactos/lib/devmgr/hwpage.c	2005-12-30 20:31:11 UTC (rev 20468)
+++ trunk/reactos/lib/devmgr/hwpage.c	2005-12-30 21:18:25 UTC (rev 20469)
@@ -1030,8 +1030,7 @@
     hpd = HeapAlloc(GetProcessHeap(),
                     HEAP_ZERO_MEMORY,
                     FIELD_OFFSET(HARDWARE_PAGE_DATA,
-                                 ClassDevInfo) +
-                        (uNumberOfGuids * sizeof(HWCLASSDEVINFO)));
+                                 ClassDevInfo[uNumberOfGuids]));
     if (hpd != NULL)
     {
         HWND hWnd;

Modified: trunk/reactos/lib/devmgr/precomp.h
--- trunk/reactos/lib/devmgr/precomp.h	2005-12-30 20:31:11 UTC (rev 20468)
+++ trunk/reactos/lib/devmgr/precomp.h	2005-12-30 21:18:25 UTC (rev 20469)
@@ -30,14 +30,14 @@
 WINAPI
 DeviceProperties_RunDLLA(HWND hWndParent,
                          HINSTANCE hInst,
-                         LPCWSTR lpDeviceCmd,
+                         LPCSTR lpDeviceCmd,
                          int nCmdShow);
 
 VOID
 WINAPI
 DeviceProperties_RunDLLW(HWND hWndParent,
                          HINSTANCE hInst,
-                         LPCSTR lpDeviceCmd,
+                         LPCWSTR lpDeviceCmd,
                          int nCmdShow);
 
 int

Modified: trunk/reactos/lib/devmgr/stubs.c
--- trunk/reactos/lib/devmgr/stubs.c	2005-12-30 20:31:11 UTC (rev 20468)
+++ trunk/reactos/lib/devmgr/stubs.c	2005-12-30 21:18:25 UTC (rev 20469)
@@ -123,7 +123,7 @@
 WINAPI
 DeviceProperties_RunDLLA(HWND hWndParent,
                          HINSTANCE hInst,
-                         LPCWSTR lpDeviceCmd,
+                         LPCSTR lpDeviceCmd,
                          int nCmdShow)
 {
   UNIMPLEMENTED;
@@ -159,7 +159,7 @@
 WINAPI
 DeviceProperties_RunDLLW(HWND hWndParent,
                          HINSTANCE hInst,
-                         LPCSTR lpDeviceCmd,
+                         LPCWSTR lpDeviceCmd,
                          int nCmdShow)
 {
   UNIMPLEMENTED;