use a .spec file and fix the export ordinals
[reactos.git] / reactos / lib / devmgr / precomp.h
index ce07e49..a5a699f 100644 (file)
@@ -2,6 +2,7 @@
 #define __DEVMGR_H
 
 #include <windows.h>
+#include <regstr.h>
 #include <setupapi.h>
 #include <cfgmgr32.h>
 #include <commctrl.h>
@@ -29,14 +30,14 @@ VOID
 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
@@ -57,32 +58,32 @@ DevicePropertiesW(HWND hWndParent,
 
 UINT
 WINAPI
-DeviceProblemTextA(PVOID Unknown1,
-                   PVOID Unknown2,
-                   UINT uProblemId,
-                   LPSTR lpString,
-                   UINT uMaxString);
+DeviceProblemTextA(IN HMACHINE hMachine  OPTIONAL,
+                   IN DEVINST dnDevInst,
+                   IN ULONG uProblemId,
+                   OUT LPSTR lpString,
+                   IN UINT uMaxString);
 
 UINT
 WINAPI
-DeviceProblemTextW(PVOID Unknown1,
-                   PVOID Unknown2,
-                   UINT uProblemId,
-                   LPWSTR lpString,
-                   UINT uMaxString);
+DeviceProblemTextW(IN HMACHINE hMachine  OPTIONAL,
+                   IN DEVINST dnDevInst,
+                   IN ULONG uProblemId,
+                   OUT LPWSTR lpString,
+                   IN UINT uMaxString);
 
-WINBOOL
+BOOL
 WINAPI
-DeviceProblemWizardA(HWND hWndParent,
-                     LPCSTR lpMachineName,
-                     LPCSTR lpDeviceID);
+DeviceProblemWizardA(IN HWND hWndParent  OPTIONAL,
+                     IN LPCSTR lpMachineName  OPTIONAL,
+                     IN LPCSTR lpDeviceID);
 
 
-WINBOOL
+BOOL
 WINAPI
-DeviceProblemWizardW(HWND hWndParent,
-                     LPCWSTR lpMachineName,
-                     LPCWSTR lpDeviceID);
+DeviceProblemWizardW(IN HWND hWndParent  OPTIONAL,
+                     IN LPCWSTR lpMachineName  OPTIONAL,
+                     IN LPCWSTR lpDeviceID);
 
 VOID
 WINAPI
@@ -120,15 +121,22 @@ DeviceManagerPrintW(LPCWSTR lpMachineName,
 
 INT_PTR
 WINAPI
-DeviceAdvancedPropertiesA(HWND hWndParent,
-                          LPCSTR lpMachineName,
-                          LPCSTR lpDeviceID);
+DeviceAdvancedPropertiesA(IN HWND hWndParent  OPTIONAL,
+                          IN LPCSTR lpMachineName  OPTIONAL,
+                          IN LPCSTR lpDeviceID);
 
 INT_PTR
 WINAPI
-DeviceAdvancedPropertiesW(HWND hWndParent,
-                          LPCWSTR lpMachineName,
-                          LPCWSTR lpDeviceID);
+DeviceAdvancedPropertiesW(IN HWND hWndParent  OPTIONAL,
+                          IN LPCWSTR lpMachineName  OPTIONAL,
+                          IN LPCWSTR lpDeviceID);
+
+typedef enum
+{
+    HWPD_STANDARDLIST = 0,
+    HWPD_LARGELIST,
+    HWPD_MAX = HWPD_LARGELIST
+} HWPAGE_DISPLAYMODE, *PHWPAGE_DISPLAYMODE;
 
 HWND
 WINAPI
@@ -137,26 +145,28 @@ DeviceCreateHardwarePage(HWND hWndParent,
 
 HWND
 WINAPI
-DeviceCreateHardwarePageEx(HWND hWndParent,
-                           LPGUID lpGuids,
-                           UINT uNumberOfGuids,
-                           UINT Unknown);
+DeviceCreateHardwarePageEx(IN HWND hWndParent,
+                           IN LPGUID lpGuids,
+                           IN UINT uNumberOfGuids,
+                           IN HWPAGE_DISPLAYMODE DisplayMode);
 
-int
+#define DPF_UNKNOWN (0x1)
+#define DPF_DEVICE_STATUS_ACTION    (0x2)
+INT_PTR
 WINAPI
-DevicePropertiesExA(HWND hWndParent,
-                    LPCSTR lpMachineName,
-                    LPCSTR lpDeviceID,
-                    HINSTANCE hInst,
-                    DWORD Unknown);
+DevicePropertiesExA(IN HWND hWndParent  OPTIONAL,
+                    IN LPCSTR lpMachineName  OPTIONAL,
+                    IN LPCSTR lpDeviceID  OPTIONAL,
+                    IN DWORD dwFlags  OPTIONAL,
+                    IN BOOL bShowDevMgr);
 
-int
+INT_PTR
 WINAPI
-DevicePropertiesExW(HWND hWndParent,
-                    LPCWSTR lpMachineName,
-                    LPCWSTR lpDeviceID,
-                    HINSTANCE hInst,
-                    DWORD Unknown);
+DevicePropertiesExW(IN HWND hWndParent  OPTIONAL,
+                    IN LPCWSTR lpMachineName  OPTIONAL,
+                    IN LPCWSTR lpDeviceID  OPTIONAL,
+                    IN DWORD dwFlags  OPTIONAL,
+                    IN BOOL bShowDevMgr);
 
 #ifdef UNICODE
 #define DeviceManager_Execute DeviceManager_ExecuteW
@@ -188,10 +198,24 @@ DisplayDeviceAdvancedProperties(IN HWND hWndParent,
                                 IN HDEVINFO DeviceInfoSet,
                                 IN PSP_DEVINFO_DATA DeviceInfoData,
                                 IN HINSTANCE hComCtl32,
-                                IN LPCWSTR lpMachineName);
+                                IN LPCWSTR lpMachineName,
+                                IN DWORD dwFlags);
+
+/* DEVPRBLM.C */
+
+BOOL
+ShowDeviceProblemWizard(IN HWND hWndParent  OPTIONAL,
+                        IN HDEVINFO hDevInfo,
+                        IN PSP_DEVINFO_DATA DevInfoData,
+                        IN HMACHINE hMachine  OPTIONAL);
 
 /* MISC.C */
 
+
+INT
+LengthOfStrResource(IN HINSTANCE hInst,
+                    IN UINT uID);
+
 DWORD
 LoadAndFormatString(IN HINSTANCE hInstance,
                     IN UINT uID,
@@ -233,20 +257,50 @@ GetDeviceStatusString(IN DEVINST DevInst,
                       OUT LPWSTR szBuffer,
                       IN DWORD BufferSize);
 
+BOOL
+GetDriverProviderString(IN HDEVINFO DeviceInfoSet,
+                        IN PSP_DEVINFO_DATA DeviceInfoData,
+                        OUT LPWSTR szBuffer,
+                        IN DWORD BufferSize);
+
+BOOL
+GetDriverVersionString(IN HDEVINFO DeviceInfoSet,
+                       IN PSP_DEVINFO_DATA DeviceInfoData,
+                       OUT LPWSTR szBuffer,
+                       IN DWORD BufferSize);
+
+BOOL
+GetDriverDateString(IN HDEVINFO DeviceInfoSet,
+                    IN PSP_DEVINFO_DATA DeviceInfoData,
+                    OUT LPWSTR szBuffer,
+                    IN DWORD BufferSize);
+
 BOOL
 IsDeviceHidden(IN DEVINST DevInst,
                IN HMACHINE hMachine,
                OUT BOOL *IsHidden);
 
+BOOL
+IsDriverInstalled(IN DEVINST DevInst,
+                  IN HMACHINE hMachine,
+                  OUT BOOL *Installed);
+
 BOOL
 CanDisableDevice(IN DEVINST DevInst,
                  IN HMACHINE hMachine,
                  OUT BOOL *CanDisable);
 
 BOOL
-IsDeviceEnabled(IN DEVINST DevInst,
+IsDeviceStarted(IN DEVINST DevInst,
                 IN HMACHINE hMachine,
-                OUT BOOL *IsEnabled);
+                OUT BOOL *IsStarted);
+
+BOOL
+EnableDevice(IN HDEVINFO DeviceInfoSet,
+             IN PSP_DEVINFO_DATA DevInfoData  OPTIONAL,
+             IN BOOL bEnable,
+             IN DWORD HardwareProfile  OPTIONAL,
+             OUT BOOL *bNeedReboot  OPTIONAL);
 
 BOOL
 GetDeviceTypeString(IN PSP_DEVINFO_DATA DeviceInfoData,
@@ -259,6 +313,11 @@ GetDeviceDescriptionString(IN HDEVINFO DeviceInfoSet,
                            OUT LPWSTR szBuffer,
                            IN DWORD BufferSize);
 
+BOOL
+FindCurrentDriver(IN HDEVINFO DeviceInfoSet,
+                  IN PSP_DEVINFO_DATA DeviceInfoData,
+                  OUT PSP_DRVINFO_DATA DriverInfoData);
+
 #endif /* __DEVMGR_H */
 
 /* EOF */