Author: weiden Date: Thu Sep 27 06:49:31 2007 New Revision: 29231
URL: http://svn.reactos.org/svn/reactos?rev=29231&view=rev Log: Implement DevicePropertiesA/W by calling DevicePropertiesExA/W and move function prototypes to a private header
Added: trunk/reactos/include/reactos/dll/devmgr/ trunk/reactos/include/reactos/dll/devmgr/devmgr.h (with props) Modified: trunk/reactos/dll/win32/devmgr/advprop.c trunk/reactos/dll/win32/devmgr/devmgr.spec trunk/reactos/dll/win32/devmgr/precomp.h trunk/reactos/dll/win32/devmgr/stubs.c
Modified: trunk/reactos/dll/win32/devmgr/advprop.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/advprop.c?... ============================================================================== --- trunk/reactos/dll/win32/devmgr/advprop.c (original) +++ trunk/reactos/dll/win32/devmgr/advprop.c Thu Sep 27 06:49:31 2007 @@ -1877,6 +1877,80 @@
/*************************************************************************** * 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 * * DESCRIPTION @@ -1975,8 +2049,7 @@ }
DevicePropertiesW(hWndParent, - hInst, szMachineName, szDeviceID, - 0); + FALSE); }
Modified: trunk/reactos/dll/win32/devmgr/devmgr.spec URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgr.spe... ============================================================================== --- trunk/reactos/dll/win32/devmgr/devmgr.spec (original) +++ trunk/reactos/dll/win32/devmgr/devmgr.spec Thu Sep 27 06:49:31 2007 @@ -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)
Modified: trunk/reactos/dll/win32/devmgr/precomp.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/precomp.h?... ============================================================================== --- trunk/reactos/dll/win32/devmgr/precomp.h (original) +++ trunk/reactos/dll/win32/devmgr/precomp.h Thu Sep 27 06:49:31 2007 @@ -6,189 +6,12 @@ #include <setupapi.h> #include <cfgmgr32.h> #include <commctrl.h> +#include <dll/devmgr/devmgr.h> #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 */
Modified: trunk/reactos/dll/win32/devmgr/stubs.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/stubs.c?re... ============================================================================== --- trunk/reactos/dll/win32/devmgr/stubs.c (original) +++ trunk/reactos/dll/win32/devmgr/stubs.c Thu Sep 27 06:49:31 2007 @@ -91,82 +91,6 @@ { UNIMPLEMENTED; return FALSE; -} - - -/*************************************************************************** - * 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; }
Added: trunk/reactos/include/reactos/dll/devmgr/devmgr.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/dll/devmgr/... ============================================================================== --- trunk/reactos/include/reactos/dll/devmgr/devmgr.h (added) +++ trunk/reactos/include/reactos/dll/devmgr/devmgr.h Thu Sep 27 06:49:31 2007 @@ -1,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 */
Propchange: trunk/reactos/include/reactos/dll/devmgr/devmgr.h ------------------------------------------------------------------------------ svn:eol-style = native