mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
Implement DevicePropertiesA/W by calling DevicePropertiesExA/W and move function prototypes to a private header
svn path=/trunk/; revision=29231
This commit is contained in:
parent
ab90e188ca
commit
1f14f9be20
5 changed files with 259 additions and 258 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -6,190 +6,13 @@
|
|||
#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 */
|
||||
|
||||
INT_PTR
|
||||
|
|
|
@ -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
|
||||
|
|
181
reactos/include/reactos/dll/devmgr/devmgr.h
Normal file
181
reactos/include/reactos/dll/devmgr/devmgr.h
Normal file
|
@ -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 */
|
Loading…
Reference in a new issue