diff --git a/reactos/dll/win32/devmgr/advprop.c b/reactos/dll/win32/devmgr/advprop.c index 12089e8d5c4..0d70ff5ad63 100644 --- a/reactos/dll/win32/devmgr/advprop.c +++ b/reactos/dll/win32/devmgr/advprop.c @@ -1875,6 +1875,80 @@ DevicePropertiesExW(IN HWND hWndParent OPTIONAL, } +/*************************************************************************** + * NAME EXPORTED + * DevicePropertiesA + * + * DESCRIPTION + * Invokes the device properties dialog directly + * + * ARGUMENTS + * hWndParent: Handle to the parent window + * lpMachineName: Machine Name, NULL is the local machine + * lpDeviceID: Specifies the device whose properties are to be shown + * bShowDevMgr: If non-zero it displays the device manager instead of + * the device property dialog + * + * RETURN VALUE + * >=0: if no errors occured + * -1: if errors occured + * + * REVISIONS + * + * @implemented + */ +int +WINAPI +DevicePropertiesA(HWND hWndParent, + LPCSTR lpMachineName, + LPCSTR lpDeviceID, + BOOL bShowDevMgr) +{ + return DevicePropertiesExA(hWndParent, + lpMachineName, + lpDeviceID, + 0, + bShowDevMgr); +} + + +/*************************************************************************** + * NAME EXPORTED + * DevicePropertiesW + * + * DESCRIPTION + * Invokes the device properties dialog directly + * + * ARGUMENTS + * hWndParent: Handle to the parent window + * lpMachineName: Machine Name, NULL is the local machine + * lpDeviceID: Specifies the device whose properties are to be shown + * bShowDevMgr: If non-zero it displays the device manager instead of + * the device property dialog + * + * RETURN VALUE + * >=0: if no errors occured + * -1: if errors occured + * + * REVISIONS + * + * @implemented + */ +int +WINAPI +DevicePropertiesW(HWND hWndParent, + LPCWSTR lpMachineName, + LPCWSTR lpDeviceID, + BOOL bShowDevMgr) +{ + return DevicePropertiesExW(hWndParent, + lpMachineName, + lpDeviceID, + 0, + bShowDevMgr); +} + + /*************************************************************************** * NAME EXPORTED * DeviceProperties_RunDLLA @@ -1975,8 +2049,7 @@ DeviceProperties_RunDLLW(HWND hWndParent, } DevicePropertiesW(hWndParent, - hInst, szMachineName, szDeviceID, - 0); + FALSE); } diff --git a/reactos/dll/win32/devmgr/devmgr.spec b/reactos/dll/win32/devmgr/devmgr.spec index b16d6473c52..e64a24a29f5 100644 --- a/reactos/dll/win32/devmgr/devmgr.spec +++ b/reactos/dll/win32/devmgr/devmgr.spec @@ -2,8 +2,8 @@ 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) + 7 stdcall DevicePropertiesA(ptr str str long) + 8 stdcall DevicePropertiesW(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) diff --git a/reactos/dll/win32/devmgr/precomp.h b/reactos/dll/win32/devmgr/precomp.h index 42eb8404e26..2f7d1b9ada5 100644 --- a/reactos/dll/win32/devmgr/precomp.h +++ b/reactos/dll/win32/devmgr/precomp.h @@ -6,190 +6,13 @@ #include #include #include +#include #include "resource.h" extern HINSTANCE hDllInstance; ULONG DbgPrint(PCCH Format,...); -BOOL -WINAPI -DeviceManager_ExecuteA(HWND hWndParent, - HINSTANCE hInst, - LPCSTR lpMachineName, - int nCmdShow); - -BOOL -WINAPI -DeviceManager_ExecuteW(HWND hWndParent, - HINSTANCE hInst, - LPCWSTR lpMachineName, - int nCmdShow); - -VOID -WINAPI -DeviceProperties_RunDLLA(HWND hWndParent, - HINSTANCE hInst, - LPCSTR lpDeviceCmd, - int nCmdShow); - -VOID -WINAPI -DeviceProperties_RunDLLW(HWND hWndParent, - HINSTANCE hInst, - LPCWSTR lpDeviceCmd, - int nCmdShow); - -int -WINAPI -DevicePropertiesA(HWND hWndParent, - HINSTANCE hInst, - LPCSTR lpMachineName, - LPCSTR lpDeviceID, - DWORD Unknown); - -int -WINAPI -DevicePropertiesW(HWND hWndParent, - HINSTANCE hInst, - LPCWSTR lpMachineName, - LPCWSTR lpDeviceID, - DWORD Unknown); - -UINT -WINAPI -DeviceProblemTextA(IN HMACHINE hMachine OPTIONAL, - IN DEVINST dnDevInst, - IN ULONG uProblemId, - OUT LPSTR lpString, - IN UINT uMaxString); - -UINT -WINAPI -DeviceProblemTextW(IN HMACHINE hMachine OPTIONAL, - IN DEVINST dnDevInst, - IN ULONG uProblemId, - OUT LPWSTR lpString, - IN UINT uMaxString); - -BOOL -WINAPI -DeviceProblemWizardA(IN HWND hWndParent OPTIONAL, - IN LPCSTR lpMachineName OPTIONAL, - IN LPCSTR lpDeviceID); - - -BOOL -WINAPI -DeviceProblemWizardW(IN HWND hWndParent OPTIONAL, - IN LPCWSTR lpMachineName OPTIONAL, - IN LPCWSTR lpDeviceID); - -VOID -WINAPI -DeviceProblemWizard_RunDLLA(HWND hWndParent, - HINSTANCE hInst, - LPCSTR lpDeviceCmd, - int nCmdShow); - -VOID -WINAPI -DeviceProblemWizard_RunDLLW(HWND hWndParent, - HINSTANCE hInst, - LPCWSTR lpDeviceCmd, - int nCmdShow); - -#define DEV_PRINT_ABSTRACT (0) -#define DEV_PRINT_SELECTED (1) -#define DEV_PRINT_ALL (2) - -BOOL -WINAPI -DeviceManagerPrintA(LPCSTR lpMachineName, - LPCSTR lpPrinter, - int nPrintMode, - UINT uNumberOfGuids, - LPGUID lpGuids); - -BOOL -WINAPI -DeviceManagerPrintW(LPCWSTR lpMachineName, - LPCWSTR lpPrinter, - int nPrintMode, - UINT uNumberOfGuids, - LPGUID lpGuids); - -INT_PTR -WINAPI -DeviceAdvancedPropertiesA(IN HWND hWndParent OPTIONAL, - IN LPCSTR lpMachineName OPTIONAL, - IN LPCSTR lpDeviceID); - -INT_PTR -WINAPI -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 -DeviceCreateHardwarePage(HWND hWndParent, - LPGUID lpGuid); - -HWND -WINAPI -DeviceCreateHardwarePageEx(IN HWND hWndParent, - IN LPGUID lpGuids, - IN UINT uNumberOfGuids, - IN HWPAGE_DISPLAYMODE DisplayMode); - -#define DPF_UNKNOWN (0x1) -#define DPF_DEVICE_STATUS_ACTION (0x2) -INT_PTR -WINAPI -DevicePropertiesExA(IN HWND hWndParent OPTIONAL, - IN LPCSTR lpMachineName OPTIONAL, - IN LPCSTR lpDeviceID OPTIONAL, - IN DWORD dwFlags OPTIONAL, - IN BOOL bShowDevMgr); - -INT_PTR -WINAPI -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 -#define DeviceProperties_RunDLL DeviceProperties_RunDLLW -#define DeviceProperties DevicePropertiesW -#define DeviceProblemText DeviceProblemTextW -#define DeviceProblemWizard DeviceProblemWizardW -#define DeviceProblemWizard_RunDLL DeviceProblemWizard_RunDLLW -#define DeviceManagerPrint DeviceManagerPrintW -#define DeviceAdvancedProperties DeviceAdvancedPropertiesW -#define DevicePropertiesEx DevicePropertiesExW -#else -#define DeviceManager_Execute DeviceManager_ExecuteA -#define DeviceProperties_RunDLL DeviceProperties_RunDLLA -#define DeviceProperties DevicePropertiesA -#define DeviceProblemText DeviceProblemTextA -#define DeviceProblemWizard DeviceProblemWizardA -#define DeviceProblemWizard_RunDLL DeviceProblemWizard_RunDLLA -#define DeviceManagerPrint DeviceManagerPrintA -#define DeviceAdvancedProperties DeviceAdvancedPropertiesA -#define DevicePropertiesEx DevicePropertiesExA -#endif - /* ADVPROP.C */ INT_PTR diff --git a/reactos/dll/win32/devmgr/stubs.c b/reactos/dll/win32/devmgr/stubs.c index b66d7a328c8..8e6c9fb02ab 100644 --- a/reactos/dll/win32/devmgr/stubs.c +++ b/reactos/dll/win32/devmgr/stubs.c @@ -94,82 +94,6 @@ DeviceManager_ExecuteW(HWND hWndParent, } -/*************************************************************************** - * NAME EXPORTED - * DevicePropertiesA - * - * DESCRIPTION - * Invokes the device properties dialog directly - * - * ARGUMENTS - * hWndParent: Handle to the parent window - * hInst: Handle to the application instance - * lpMachineName: Machine Name, NULL is the local machine - * lpDeviceID: Specifies the device whose properties are to be shown - * Unknown: Unknown parameter, see NOTEs - * - * RETURN VALUE - * >=0: if no errors occured - * -1: if errors occured - * - * REVISIONS - * - * NOTE - * Unknown seems to be a BOOL, not sure what it does - * - * @unimplemented - */ -int -WINAPI -DevicePropertiesA(HWND hWndParent, - HINSTANCE hInst, - LPCSTR lpMachineName, - LPCSTR lpDeviceID, - DWORD Unknown) -{ - UNIMPLEMENTED; - return -1; -} - - -/*************************************************************************** - * NAME EXPORTED - * DevicePropertiesW - * - * DESCRIPTION - * Invokes the device properties dialog directly - * - * ARGUMENTS - * hWndParent: Handle to the parent window - * hInst: Handle to the application instance - * lpMachineName: Machine Name, NULL is the local machine - * lpDeviceID: Specifies the device whose properties are to be shown - * Unknown: Unknown parameter, see NOTEs - * - * RETURN VALUE - * >=0: if no errors occured - * -1: if errors occured - * - * REVISIONS - * - * NOTE - * Unknown seems to be a BOOL, not sure what it does - * - * @unimplemented - */ -int -WINAPI -DevicePropertiesW(HWND hWndParent, - HINSTANCE hInst, - LPCWSTR lpMachineName, - LPCWSTR lpDeviceID, - DWORD Unknown) -{ - UNIMPLEMENTED; - return -1; -} - - /*************************************************************************** * NAME EXPORTED * DeviceProblemWizard_RunDLLA diff --git a/reactos/include/reactos/dll/devmgr/devmgr.h b/reactos/include/reactos/dll/devmgr/devmgr.h new file mode 100644 index 00000000000..f9a8fca1ec8 --- /dev/null +++ b/reactos/include/reactos/dll/devmgr/devmgr.h @@ -0,0 +1,181 @@ +#ifndef __DEVMGR__H +#define __DEVMGR__H + +BOOL +WINAPI +DeviceManager_ExecuteA(HWND hWndParent, + HINSTANCE hInst, + LPCSTR lpMachineName, + int nCmdShow); + +BOOL +WINAPI +DeviceManager_ExecuteW(HWND hWndParent, + HINSTANCE hInst, + LPCWSTR lpMachineName, + int nCmdShow); + +VOID +WINAPI +DeviceProperties_RunDLLA(HWND hWndParent, + HINSTANCE hInst, + LPCSTR lpDeviceCmd, + int nCmdShow); + +VOID +WINAPI +DeviceProperties_RunDLLW(HWND hWndParent, + HINSTANCE hInst, + LPCWSTR lpDeviceCmd, + int nCmdShow); + +int +WINAPI +DevicePropertiesA(HWND hWndParent, + LPCSTR lpMachineName, + LPCSTR lpDeviceID, + BOOL bShowDevMgr); + +int +WINAPI +DevicePropertiesW(HWND hWndParent, + LPCWSTR lpMachineName, + LPCWSTR lpDeviceID, + BOOL bShowDevMgr); + +UINT +WINAPI +DeviceProblemTextA(IN HMACHINE hMachine OPTIONAL, + IN DEVINST dnDevInst, + IN ULONG uProblemId, + OUT LPSTR lpString, + IN UINT uMaxString); + +UINT +WINAPI +DeviceProblemTextW(IN HMACHINE hMachine OPTIONAL, + IN DEVINST dnDevInst, + IN ULONG uProblemId, + OUT LPWSTR lpString, + IN UINT uMaxString); + +BOOL +WINAPI +DeviceProblemWizardA(IN HWND hWndParent OPTIONAL, + IN LPCSTR lpMachineName OPTIONAL, + IN LPCSTR lpDeviceID); + + +BOOL +WINAPI +DeviceProblemWizardW(IN HWND hWndParent OPTIONAL, + IN LPCWSTR lpMachineName OPTIONAL, + IN LPCWSTR lpDeviceID); + +VOID +WINAPI +DeviceProblemWizard_RunDLLA(HWND hWndParent, + HINSTANCE hInst, + LPCSTR lpDeviceCmd, + int nCmdShow); + +VOID +WINAPI +DeviceProblemWizard_RunDLLW(HWND hWndParent, + HINSTANCE hInst, + LPCWSTR lpDeviceCmd, + int nCmdShow); + +#define DEV_PRINT_ABSTRACT (0) +#define DEV_PRINT_SELECTED (1) +#define DEV_PRINT_ALL (2) + +BOOL +WINAPI +DeviceManagerPrintA(LPCSTR lpMachineName, + LPCSTR lpPrinter, + int nPrintMode, + UINT uNumberOfGuids, + LPGUID lpGuids); + +BOOL +WINAPI +DeviceManagerPrintW(LPCWSTR lpMachineName, + LPCWSTR lpPrinter, + int nPrintMode, + UINT uNumberOfGuids, + LPGUID lpGuids); + +INT_PTR +WINAPI +DeviceAdvancedPropertiesA(IN HWND hWndParent OPTIONAL, + IN LPCSTR lpMachineName OPTIONAL, + IN LPCSTR lpDeviceID); + +INT_PTR +WINAPI +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 +DeviceCreateHardwarePage(HWND hWndParent, + LPGUID lpGuid); + +HWND +WINAPI +DeviceCreateHardwarePageEx(IN HWND hWndParent, + IN LPGUID lpGuids, + IN UINT uNumberOfGuids, + IN HWPAGE_DISPLAYMODE DisplayMode); + +#define DPF_UNKNOWN (0x1) +#define DPF_DEVICE_STATUS_ACTION (0x2) + +INT_PTR +WINAPI +DevicePropertiesExA(IN HWND hWndParent OPTIONAL, + IN LPCSTR lpMachineName OPTIONAL, + IN LPCSTR lpDeviceID OPTIONAL, + IN DWORD dwFlags OPTIONAL, + IN BOOL bShowDevMgr); + +INT_PTR +WINAPI +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 +#define DeviceProperties_RunDLL DeviceProperties_RunDLLW +#define DeviceProperties DevicePropertiesW +#define DeviceProblemText DeviceProblemTextW +#define DeviceProblemWizard DeviceProblemWizardW +#define DeviceProblemWizard_RunDLL DeviceProblemWizard_RunDLLW +#define DeviceManagerPrint DeviceManagerPrintW +#define DeviceAdvancedProperties DeviceAdvancedPropertiesW +#define DevicePropertiesEx DevicePropertiesExW +#else +#define DeviceManager_Execute DeviceManager_ExecuteA +#define DeviceProperties_RunDLL DeviceProperties_RunDLLA +#define DeviceProperties DevicePropertiesA +#define DeviceProblemText DeviceProblemTextA +#define DeviceProblemWizard DeviceProblemWizardA +#define DeviceProblemWizard_RunDLL DeviceProblemWizard_RunDLLA +#define DeviceManagerPrint DeviceManagerPrintA +#define DeviceAdvancedProperties DeviceAdvancedPropertiesA +#define DevicePropertiesEx DevicePropertiesExA +#endif + +#endif /* __DEVMGR__H */