ReactOS 0.4.15-dev-7842-g558ab78
devmgr.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DEV_PRINT_ABSTRACT   (0)
 
#define DEV_PRINT_SELECTED   (1)
 
#define DEV_PRINT_ALL   (2)
 
#define DPF_EXTENDED   (0x1)
 
#define DPF_DEVICE_STATUS_ACTION   (0x2)
 
#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
 

Typedefs

typedef enum HWPAGE_DISPLAYMODEPHWPAGE_DISPLAYMODE
 

Enumerations

enum  HWPAGE_DISPLAYMODE {
  HWPD_STANDARDLIST = 0 , HWPD_LARGELIST , HWPD_MAX = HWPD_LARGELIST , HWPD_STANDARDLIST = 0 ,
  HWPD_LARGELIST , HWPD_MAX = HWPD_LARGELIST , HWPD_STANDARDLIST = 0 , HWPD_LARGELIST ,
  HWPD_MAX = HWPD_LARGELIST , HWPD_STANDARDLIST = 0 , HWPD_LARGELIST , HWPD_MAX = HWPD_LARGELIST
}
 

Functions

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)
 
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)
 
HWND WINAPI DeviceCreateHardwarePage (HWND hWndParent, LPGUID lpGuid)
 
HWND WINAPI DeviceCreateHardwarePageEx (IN HWND hWndParent, IN LPGUID lpGuids, IN UINT uNumberOfGuids, IN HWPAGE_DISPLAYMODE DisplayMode)
 
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)
 

Macro Definition Documentation

◆ DEV_PRINT_ABSTRACT

#define DEV_PRINT_ABSTRACT   (0)

Definition at line 93 of file devmgr.h.

◆ DEV_PRINT_ALL

#define DEV_PRINT_ALL   (2)

Definition at line 95 of file devmgr.h.

◆ DEV_PRINT_SELECTED

#define DEV_PRINT_SELECTED   (1)

Definition at line 94 of file devmgr.h.

◆ DeviceAdvancedProperties

#define DeviceAdvancedProperties   DeviceAdvancedPropertiesA

Definition at line 181 of file devmgr.h.

◆ DeviceManager_Execute

#define DeviceManager_Execute   DeviceManager_ExecuteA

Definition at line 174 of file devmgr.h.

◆ DeviceManagerPrint

#define DeviceManagerPrint   DeviceManagerPrintA

Definition at line 180 of file devmgr.h.

◆ DeviceProblemText

#define DeviceProblemText   DeviceProblemTextA

Definition at line 177 of file devmgr.h.

◆ DeviceProblemWizard

#define DeviceProblemWizard   DeviceProblemWizardA

Definition at line 178 of file devmgr.h.

◆ DeviceProblemWizard_RunDLL

#define DeviceProblemWizard_RunDLL   DeviceProblemWizard_RunDLLA

Definition at line 179 of file devmgr.h.

◆ DeviceProperties

#define DeviceProperties   DevicePropertiesA

Definition at line 176 of file devmgr.h.

◆ DeviceProperties_RunDLL

#define DeviceProperties_RunDLL   DeviceProperties_RunDLLA

Definition at line 175 of file devmgr.h.

◆ DevicePropertiesEx

#define DevicePropertiesEx   DevicePropertiesExA

Definition at line 182 of file devmgr.h.

◆ DPF_DEVICE_STATUS_ACTION

#define DPF_DEVICE_STATUS_ACTION   (0x2)

Definition at line 145 of file devmgr.h.

◆ DPF_EXTENDED

#define DPF_EXTENDED   (0x1)

Definition at line 144 of file devmgr.h.

Typedef Documentation

◆ PHWPAGE_DISPLAYMODE

Enumeration Type Documentation

◆ HWPAGE_DISPLAYMODE

Enumerator
HWPD_STANDARDLIST 
HWPD_LARGELIST 
HWPD_MAX 
HWPD_STANDARDLIST 
HWPD_LARGELIST 
HWPD_MAX 
HWPD_STANDARDLIST 
HWPD_LARGELIST 
HWPD_MAX 
HWPD_STANDARDLIST 
HWPD_LARGELIST 
HWPD_MAX 

Definition at line 125 of file devmgr.h.

126{
HWPAGE_DISPLAYMODE
Definition: devmgr.h:126
@ HWPD_STANDARDLIST
Definition: devmgr.h:127
@ HWPD_LARGELIST
Definition: devmgr.h:128
@ HWPD_MAX
Definition: devmgr.h:129
enum HWPAGE_DISPLAYMODE * PHWPAGE_DISPLAYMODE

Function Documentation

◆ DeviceAdvancedPropertiesA()

INT_PTR WINAPI DeviceAdvancedPropertiesA ( IN HWND hWndParent  OPTIONAL,
IN LPCSTR lpMachineName  OPTIONAL,
IN LPCSTR  lpDeviceID 
)

Definition at line 118 of file api.cpp.

121{
122 LPWSTR lpMachineNameW = NULL;
123 LPWSTR lpDeviceIDW = NULL;
124 INT_PTR Ret = -1;
125
126 if (lpMachineName != NULL)
127 {
128 if (!(lpMachineNameW = ConvertMultiByteToUnicode(lpMachineName,
129 CP_ACP)))
130 {
131 goto Cleanup;
132 }
133 }
134 if (lpDeviceID != NULL)
135 {
136 if (!(lpDeviceIDW = ConvertMultiByteToUnicode(lpDeviceID,
137 CP_ACP)))
138 {
139 goto Cleanup;
140 }
141 }
142
144 lpMachineNameW,
145 lpDeviceIDW);
146
147Cleanup:
148 if (lpMachineNameW != NULL)
149 {
151 0,
152 lpMachineNameW);
153 }
154 if (lpDeviceIDW != NULL)
155 {
157 0,
158 lpDeviceIDW);
159 }
160
161 return Ret;
162}
#define NULL
Definition: types.h:112
#define GetProcessHeap()
Definition: compat.h:736
#define CP_ACP
Definition: compat.h:109
#define HeapFree(x, y, z)
Definition: compat.h:735
INT_PTR WINAPI DeviceAdvancedPropertiesW(IN HWND hWndParent OPTIONAL, IN LPCWSTR lpMachineName OPTIONAL, IN LPCWSTR lpDeviceID)
Definition: api.cpp:47
LPWSTR ConvertMultiByteToUnicode(IN LPCSTR lpMultiByteStr, IN UINT uCodePage)
Definition: misc.cpp:239
static const WCHAR Cleanup[]
Definition: register.c:80
int32_t INT_PTR
Definition: typedefs.h:64
WCHAR * LPWSTR
Definition: xmlstorage.h:184

◆ DeviceAdvancedPropertiesW()

INT_PTR WINAPI DeviceAdvancedPropertiesW ( IN HWND hWndParent  OPTIONAL,
IN LPCWSTR lpMachineName  OPTIONAL,
IN LPCWSTR  lpDeviceID 
)

Definition at line 47 of file api.cpp.

50{
51 HDEVINFO hDevInfo;
52 SP_DEVINFO_DATA DevInfoData;
53 HINSTANCE hComCtl32;
54 INT_PTR Ret = -1;
55
56 if (lpDeviceID == NULL)
57 {
59 return FALSE;
60 }
61
62 /* dynamically load comctl32 */
63 hComCtl32 = LoadAndInitComctl32();
64 if (hComCtl32 != NULL)
65 {
68 lpMachineName,
69 NULL);
70 if (hDevInfo != INVALID_HANDLE_VALUE)
71 {
72 DevInfoData.cbSize = sizeof(SP_DEVINFO_DATA);
73 if (SetupDiOpenDeviceInfo(hDevInfo,
74 lpDeviceID,
76 0,
77 &DevInfoData))
78 {
80 lpDeviceID,
81 hDevInfo,
82 &DevInfoData,
83 hComCtl32,
84 lpMachineName,
85 0);
86 }
87
89 }
90
91 FreeLibrary(hComCtl32);
92 }
93
94 return Ret;
95}
INT_PTR DisplayDeviceAdvancedProperties(IN HWND hWndParent, IN LPCWSTR lpDeviceID OPTIONAL, IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData, IN HINSTANCE hComCtl32, IN LPCWSTR lpMachineName, IN DWORD dwFlags)
Definition: advprop.cpp:2940
#define FALSE
Definition: types.h:117
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define FreeLibrary(x)
Definition: compat.h:748
HINSTANCE LoadAndInitComctl32(VOID)
Definition: misc.cpp:1106
BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO devinfo)
Definition: devinst.c:2893
#define SetupDiOpenDeviceInfo
Definition: setupapi.h:2614
#define SetupDiCreateDeviceInfoListEx
Definition: setupapi.h:2580
struct _SP_DEVINFO_DATA SP_DEVINFO_DATA

Referenced by DeviceAdvancedPropertiesA().

◆ DeviceCreateHardwarePage()

HWND WINAPI DeviceCreateHardwarePage ( HWND  hWndParent,
LPGUID  lpGuid 
)

◆ DeviceCreateHardwarePageEx()

HWND WINAPI DeviceCreateHardwarePageEx ( IN HWND  hWndParent,
IN LPGUID  lpGuids,
IN UINT  uNumberOfGuids,
IN HWPAGE_DISPLAYMODE  DisplayMode 
)

Definition at line 1021 of file hwpage.cpp.

1025{
1027
1028 /* allocate the HARDWARE_PAGE_DATA structure. Make sure it is
1029 zeroed because the initialization code assumes that in
1030 failure cases! */
1034 ClassDevInfo[uNumberOfGuids]));
1035 if (hpd != NULL)
1036 {
1037 HWND hWnd;
1038 UINT i;
1039
1041
1042 /* initialize the HARDWARE_PAGE_DATA structure */
1043 hpd->NumberOfGuids = uNumberOfGuids;
1044 for (i = 0;
1045 i < uNumberOfGuids;
1046 i++)
1047 {
1049 hpd->ClassDevInfo[i].Guid = lpGuids[i];
1050 }
1051
1052 /* load comctl32.dll dynamically */
1054 if (hpd->hComCtl32 == NULL)
1055 {
1056 goto Cleanup;
1057 }
1058
1059 /* create the dialog */
1062 hWndParent,
1064 (LPARAM)hpd);
1065 if (hWnd != NULL)
1066 {
1067 return hWnd;
1068 }
1069 else
1070 {
1071Cleanup:
1072 /* oops, something went wrong... */
1073 if (hpd->hComCtl32 != NULL)
1074 {
1075 FreeLibrary(hpd->hComCtl32);
1076 }
1077
1079 0,
1080 hpd);
1081 }
1082 }
1083
1084 return NULL;
1085}
HWND hWnd
Definition: settings.c:17
static HINSTANCE hDllInstance
Definition: clb.c:30
@ HWPD_STANDARDLIST
Definition: main.h:24
@ HWPD_MAX
Definition: main.h:26
#define IDD_HARDWARE
Definition: resource.h:30
#define HeapAlloc
Definition: compat.h:733
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
struct _HARDWARE_PAGE_DATA * PHARDWARE_PAGE_DATA
static INT_PTR CALLBACK HardwareDlgProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: hwpage.cpp:798
unsigned int UINT
Definition: ndis.h:50
static VIDEODISPLAYMODE DisplayMode
Definition: pcvideo.c:117
HINSTANCE hComCtl32
Definition: hwpage.cpp:53
HWCLASSDEVINFO ClassDevInfo[1]
Definition: hwpage.cpp:63
HWPAGE_DISPLAYMODE DisplayMode
Definition: hwpage.cpp:56
HDEVINFO hDevInfo
Definition: hwpage.cpp:43
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
LONG_PTR LPARAM
Definition: windef.h:208
#define CreateDialogParam
Definition: winuser.h:5752
#define MAKEINTRESOURCE
Definition: winuser.h:591

Referenced by DeviceCreateHardwarePage().

◆ DeviceManager_ExecuteA()

BOOL WINAPI DeviceManager_ExecuteA ( HWND  hWndParent,
HINSTANCE  hInst,
LPCSTR  lpMachineName,
int  nCmdShow 
)

Definition at line 550 of file api.cpp.

554{
555 LPWSTR lpMachineNameW = NULL;
556 BOOL Ret;
557
558 if (lpMachineName != NULL)
559 {
560 if (!(lpMachineNameW = ConvertMultiByteToUnicode(lpMachineName,
561 CP_ACP)))
562 {
563 return FALSE;
564 }
565 }
566
568 hInst,
569 lpMachineNameW,
570 nCmdShow);
571
572 if (lpMachineNameW != NULL)
573 {
575 0,
576 lpMachineNameW);
577 }
578
579
580 return Ret;
581}
BOOL WINAPI DeviceManager_ExecuteW(HWND hWndParent, HINSTANCE hInst, LPCWSTR lpMachineName, int nCmdShow)
Definition: api.cpp:611
HINSTANCE hInst
Definition: dxdiag.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94

◆ DeviceManager_ExecuteW()

BOOL WINAPI DeviceManager_ExecuteW ( HWND  hWndParent,
HINSTANCE  hInst,
LPCWSTR  lpMachineName,
int  nCmdShow 
)

Definition at line 611 of file api.cpp.

615{
616 // FIXME: Call mmc with devmgmt.msc
617
618 CDeviceManager DevMgr;
619 return DevMgr.Create(hWndParent, hInst, lpMachineName, nCmdShow);
620}
bool Create(_In_ HWND hWndParent, _In_ HINSTANCE hInst, _In_opt_z_ LPCWSTR lpMachineName, _In_ int nCmdShow)
Definition: MainWindow.cpp:95

Referenced by DeviceManager_ExecuteA(), and wWinMain().

◆ DeviceManagerPrintA()

BOOL WINAPI DeviceManagerPrintA ( LPCSTR  lpMachineName,
LPCSTR  lpPrinter,
int  nPrintMode,
UINT  uNumberOfGuids,
LPGUID  lpGuids 
)

Definition at line 732 of file api.cpp.

737{
739 return FALSE;
740}
#define UNIMPLEMENTED
Definition: debug.h:115

◆ DeviceManagerPrintW()

BOOL WINAPI DeviceManagerPrintW ( LPCWSTR  lpMachineName,
LPCWSTR  lpPrinter,
int  nPrintMode,
UINT  uNumberOfGuids,
LPGUID  lpGuids 
)

Definition at line 776 of file api.cpp.

781{
783 return FALSE;
784}

◆ DeviceProblemTextA()

UINT WINAPI DeviceProblemTextA ( IN HMACHINE hMachine  OPTIONAL,
IN DEVINST  dnDevInst,
IN ULONG  uProblemId,
OUT LPSTR  lpString,
IN UINT  uMaxString 
)

Definition at line 417 of file devprblm.cpp.

422{
424 UINT Ret = 0;
425
426 if (uMaxString != 0)
427 {
429 0,
430 (uMaxString + 1) * sizeof(WCHAR));
431 if (lpBuffer == NULL)
432 {
434 return 0;
435 }
436 }
437
438 Ret = DeviceProblemTextW(hMachine,
439 dnDevInst,
440 uProblemId,
441 lpBuffer,
442 uMaxString);
443
444 if (lpBuffer != NULL)
445 {
446 if (Ret)
447 {
449 0,
450 lpBuffer,
451 (int)Ret,
452 lpString,
453 (int)uMaxString,
454 NULL,
455 NULL);
456 }
457
459 0,
460 lpBuffer);
461 }
462
463 return Ret;
464}
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
Definition: db.cpp:175
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
UINT WINAPI DeviceProblemTextW(IN HMACHINE hMachine OPTIONAL, IN DEVINST dnDevInst, IN ULONG uProblemId, OUT LPWSTR lpString, IN UINT uMaxString)
Definition: devprblm.cpp:491
#define WideCharToMultiByte
Definition: compat.h:111
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ DeviceProblemTextW()

UINT WINAPI DeviceProblemTextW ( IN HMACHINE hMachine  OPTIONAL,
IN DEVINST  dnDevInst,
IN ULONG  uProblemId,
OUT LPWSTR  lpString,
IN UINT  uMaxString 
)

Definition at line 491 of file devprblm.cpp.

496{
497 UINT MessageId = IDS_UNKNOWN;
498 UINT Ret = 0;
499
500 if (uProblemId < sizeof(ProblemStringId) / sizeof(ProblemStringId[0]))
501 MessageId = ProblemStringId[uProblemId];
502
503 if (uProblemId == 0)
504 {
505 if (uMaxString != 0)
506 {
508 MessageId,
509 lpString,
510 (int)uMaxString);
511 }
512 else
513 {
515 MessageId);
516 }
517 }
518 else
519 {
520 LPWSTR szProblem;
521 WCHAR szInfo[] = L"FIXME";
522 DWORD dwRet;
523 BOOL AdvFormat = FALSE;
524 UINT StringIDs[] =
525 {
526 MessageId,
528 };
529
530 switch (uProblemId)
531 {
533 {
534 /* FIXME - if not a root bus devloader then use IDS_DEV_DEVLOADER_FAILED2 */
535 /* FIXME - get the type string (ie. ISAPNP, PCI or BIOS for root bus devloaders,
536 or FLOP, ESDI, SCSI, etc for others */
537 AdvFormat = TRUE;
538 break;
539 }
540
542 {
543 /* FIXME - 4 cases:
544 1) if it's a missing system devloader:
545 - get the system devloader name
546 2) if it's not a system devloader but still missing:
547 - get the devloader name (file name?)
548 3) if it's not a system devloader but the file can be found:
549 - use IDS_DEV_DEVLOADER_NOT_FOUND2
550 4) if it's a missing or empty software key
551 - use IDS_DEV_DEVLOADER_NOT_FOUND3
552 - AdvFormat = FALSE!
553 */
554 AdvFormat = TRUE;
555 break;
556 }
557
559 /* FIXME - if the device isn't enumerated by the BIOS/ACPI use IDS_DEV_INVALID_DATA2 */
560 AdvFormat = FALSE;
561 break;
562
564 /* FIXME - get resource type (IRQ, DMA, Memory or I/O) */
565 AdvFormat = TRUE;
566 break;
567
569 /* FIXME - get the .inf file name */
570 AdvFormat = TRUE;
571 break;
572
573 case CM_PROB_DISABLED:
574 /* FIXME - if the device was disabled by the system use IDS_DEV_DISABLED2 */
575 break;
576 }
577
578 if (AdvFormat)
579 {
580 StringIDs[1] = IDS_DEVCODE2;
582 StringIDs,
583 sizeof(StringIDs) / sizeof(StringIDs[0]),
584 &szProblem,
585 szInfo,
586 uProblemId);
587 }
588 else
589 {
591 StringIDs,
592 sizeof(StringIDs) / sizeof(StringIDs[0]),
593 &szProblem,
594 uProblemId);
595 }
596
597 if (dwRet != 0)
598 {
599 if (uMaxString != 0 && uMaxString >= dwRet)
600 {
601 wcscpy(lpString,
602 szProblem);
603 }
604
605 LocalFree((HLOCAL)szProblem);
606
607 Ret = dwRet;
608 }
609 }
610
611 return Ret;
612}
INT LengthOfStrResource(IN HINSTANCE hInst, IN UINT uID)
Definition: misc.c:23
#define IDS_UNKNOWN
Definition: resource.h:7
#define CM_PROB_INVALID_DATA
Definition: cfg.h:39
#define CM_PROB_NORMAL_CONFLICT
Definition: cfg.h:42
#define CM_PROB_UNKNOWN_RESOURCE
Definition: cfg.h:47
#define CM_PROB_DISABLED
Definition: cfg.h:52
#define CM_PROB_DEVLOADER_FAILED
Definition: cfg.h:32
#define CM_PROB_DEVLOADER_NOT_FOUND
Definition: cfg.h:38
static const UINT ProblemStringId[NUM_CM_PROB]
Definition: devprblm.cpp:337
#define TRUE
Definition: types.h:120
DWORD LoadAndFormatStringsCat(IN HINSTANCE hInstance, IN UINT *uID, IN UINT nIDs, OUT LPWSTR *lpTarget,...)
Definition: misc.cpp:177
#define IDS_DEVCODE2
Definition: resource.h:110
#define IDS_DEVCODE
Definition: resource.h:109
unsigned long DWORD
Definition: ntddk_ex.h:95
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
#define L(x)
Definition: ntvdm.h:50
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define LoadString
Definition: winuser.h:5819

Referenced by DeviceProblemTextA(), GetDeviceStatusString(), and InitProbeListPage().

◆ DeviceProblemWizard_RunDLLA()

VOID WINAPI DeviceProblemWizard_RunDLLA ( HWND  hWndParent,
HINSTANCE  hInst,
LPCSTR  lpDeviceCmd,
int  nCmdShow 
)

Definition at line 652 of file api.cpp.

656{
658}

◆ DeviceProblemWizard_RunDLLW()

VOID WINAPI DeviceProblemWizard_RunDLLW ( HWND  hWndParent,
HINSTANCE  hInst,
LPCWSTR  lpDeviceCmd,
int  nCmdShow 
)

Definition at line 690 of file api.cpp.

694{
696}

◆ DeviceProblemWizardA()

BOOL WINAPI DeviceProblemWizardA ( IN HWND hWndParent  OPTIONAL,
IN LPCSTR lpMachineName  OPTIONAL,
IN LPCSTR  lpDeviceID 
)

Definition at line 213 of file devprblm.cpp.

216{
217 LPWSTR lpMachineNameW = NULL;
218 LPWSTR lpDeviceIDW = NULL;
219 BOOL Ret = FALSE;
220
221 if (lpMachineName != NULL)
222 {
223 if (!(lpMachineNameW = ConvertMultiByteToUnicode(lpMachineName,
224 CP_ACP)))
225 {
226 goto Cleanup;
227 }
228 }
229 if (lpDeviceID != NULL)
230 {
231 if (!(lpDeviceIDW = ConvertMultiByteToUnicode(lpDeviceID,
232 CP_ACP)))
233 {
234 goto Cleanup;
235 }
236 }
237
239 lpMachineNameW,
240 lpDeviceIDW);
241
242Cleanup:
243 if (lpMachineNameW != NULL)
244 {
246 0,
247 lpMachineNameW);
248 }
249 if (lpDeviceIDW != NULL)
250 {
252 0,
253 lpDeviceIDW);
254 }
255
256 return Ret;
257}
BOOL WINAPI DeviceProblemWizardW(IN HWND hWndParent OPTIONAL, IN LPCWSTR lpMachineName OPTIONAL, IN LPCWSTR lpDeviceID)
Definition: devprblm.cpp:280

◆ DeviceProblemWizardW()

BOOL WINAPI DeviceProblemWizardW ( IN HWND hWndParent  OPTIONAL,
IN LPCWSTR lpMachineName  OPTIONAL,
IN LPCWSTR  lpDeviceID 
)

Definition at line 280 of file devprblm.cpp.

283{
284 HDEVINFO hDevInfo;
285 SP_DEVINFO_DATA DevInfoData;
286 HINSTANCE hComCtl32;
287 CONFIGRET cr;
288 HMACHINE hMachine;
289 BOOL Ret = FALSE;
290
291 if (lpDeviceID == NULL)
292 {
294 return FALSE;
295 }
296
297 /* dynamically load comctl32 */
298 hComCtl32 = LoadAndInitComctl32();
299 if (hComCtl32 != NULL)
300 {
303 lpMachineName,
304 NULL);
305 if (hDevInfo != INVALID_HANDLE_VALUE)
306 {
307 cr = CM_Connect_Machine(lpMachineName,
308 &hMachine);
309 if (cr == CR_SUCCESS)
310 {
311 DevInfoData.cbSize = sizeof(SP_DEVINFO_DATA);
312 if (SetupDiOpenDeviceInfo(hDevInfo,
313 lpDeviceID,
315 0,
316 &DevInfoData))
317 {
319 hDevInfo,
320 &DevInfoData,
321 hMachine);
322 }
323
324 CM_Disconnect_Machine(hMachine);
325 }
326
328 }
329
330 FreeLibrary(hComCtl32);
331 }
332
333 return Ret;
334}
#define CM_Connect_Machine
Definition: cfgmgr32.h:1074
RETURN_TYPE CONFIGRET
Definition: cfgmgr32.h:74
#define CR_SUCCESS
Definition: cfgmgr32.h:842
CONFIGRET WINAPI CM_Disconnect_Machine(_In_opt_ HMACHINE hMachine)
Definition: cfgmgr.c:1863
BOOL ShowDeviceProblemWizard(IN HWND hWndParent OPTIONAL, IN HDEVINFO hDevInfo, IN PSP_DEVINFO_DATA DevInfoData, IN HMACHINE hMachine OPTIONAL)
Definition: devprblm.cpp:34

Referenced by DeviceProblemWizardA().

◆ DeviceProperties_RunDLLA()

VOID WINAPI DeviceProperties_RunDLLA ( HWND  hWndParent,
HINSTANCE  hInst,
LPCSTR  lpDeviceCmd,
int  nCmdShow 
)

Definition at line 443 of file api.cpp.

447{
448 LPWSTR lpDeviceCmdW = NULL;
449
450 if (lpDeviceCmd != NULL)
451 {
452 if ((lpDeviceCmdW = ConvertMultiByteToUnicode(lpDeviceCmd,
453 CP_ACP)))
454 {
456 hInst,
457 lpDeviceCmdW,
458 nCmdShow);
459 }
460 }
461
462 if (lpDeviceCmdW != NULL)
463 {
465 0,
466 lpDeviceCmdW);
467 }
468}
VOID WINAPI DeviceProperties_RunDLLW(HWND hWndParent, HINSTANCE hInst, LPCWSTR lpDeviceCmd, int nCmdShow)
Definition: api.cpp:498

◆ DeviceProperties_RunDLLW()

VOID WINAPI DeviceProperties_RunDLLW ( HWND  hWndParent,
HINSTANCE  hInst,
LPCWSTR  lpDeviceCmd,
int  nCmdShow 
)

Definition at line 498 of file api.cpp.

502{
503 WCHAR szDeviceID[MAX_DEVICE_ID_LEN + 1];
504 WCHAR szMachineName[MAX_COMPUTERNAME_LENGTH + 1];
505 LPWSTR lpString = (LPWSTR)lpDeviceCmd;
506
507 if (!GetDeviceAndComputerName(lpString,
508 szDeviceID,
509 szMachineName))
510 {
511 ERR("DeviceProperties_RunDLLW DeviceID: %S, MachineName: %S\n", szDeviceID, szMachineName);
512 return;
513 }
514
516 szMachineName,
517 szDeviceID,
518 FALSE);
519}
#define ERR(fmt,...)
Definition: debug.h:110
#define MAX_DEVICE_ID_LEN
Definition: devaction.c:40
int WINAPI DevicePropertiesW(HWND hWndParent, LPCWSTR lpMachineName, LPCWSTR lpDeviceID, BOOL bShowDevMgr)
Definition: api.cpp:403
BOOL GetDeviceAndComputerName(LPWSTR lpString, WCHAR szDeviceID[], WCHAR szMachineName[])
Definition: misc.cpp:1132
#define MAX_COMPUTERNAME_LENGTH
Definition: winbase.h:243

Referenced by DeviceProperties_RunDLLA().

◆ DevicePropertiesA()

int WINAPI DevicePropertiesA ( HWND  hWndParent,
LPCSTR  lpMachineName,
LPCSTR  lpDeviceID,
BOOL  bShowDevMgr 
)

Definition at line 366 of file api.cpp.

370{
372 lpMachineName,
373 lpDeviceID,
375 bShowDevMgr);
376}
INT_PTR WINAPI DevicePropertiesExA(IN HWND hWndParent OPTIONAL, IN LPCSTR lpMachineName OPTIONAL, IN LPCSTR lpDeviceID OPTIONAL, IN DWORD dwFlags OPTIONAL, IN BOOL bShowDevMgr)
Definition: api.cpp:193
#define DPF_EXTENDED
Definition: devmgr.h:144

◆ DevicePropertiesExA()

INT_PTR WINAPI DevicePropertiesExA ( IN HWND hWndParent  OPTIONAL,
IN LPCSTR lpMachineName  OPTIONAL,
IN LPCSTR lpDeviceID  OPTIONAL,
IN DWORD dwFlags  OPTIONAL,
IN BOOL  bShowDevMgr 
)

Definition at line 193 of file api.cpp.

198{
199 LPWSTR lpMachineNameW = NULL;
200 LPWSTR lpDeviceIDW = NULL;
201 INT_PTR Ret = -1;
202
203 if (lpMachineName != NULL)
204 {
205 if (!(lpMachineNameW = ConvertMultiByteToUnicode(lpMachineName,
206 CP_ACP)))
207 {
208 goto Cleanup;
209 }
210 }
211 if (lpDeviceID != NULL)
212 {
213 if (!(lpDeviceIDW = ConvertMultiByteToUnicode(lpDeviceID,
214 CP_ACP)))
215 {
216 goto Cleanup;
217 }
218 }
219
221 lpMachineNameW,
222 lpDeviceIDW,
223 dwFlags,
224 bShowDevMgr);
225
226Cleanup:
227 if (lpMachineNameW != NULL)
228 {
230 0,
231 lpMachineNameW);
232 }
233 if (lpDeviceIDW != NULL)
234 {
236 0,
237 lpDeviceIDW);
238 }
239
240 return Ret;
241}
INT_PTR WINAPI DevicePropertiesExW(IN HWND hWndParent OPTIONAL, IN LPCWSTR lpMachineName OPTIONAL, IN LPCWSTR lpDeviceID OPTIONAL, IN DWORD dwFlags OPTIONAL, IN BOOL bShowDevMgr)
Definition: api.cpp:272
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176

Referenced by DevicePropertiesA().

◆ DevicePropertiesExW()

INT_PTR WINAPI DevicePropertiesExW ( IN HWND hWndParent  OPTIONAL,
IN LPCWSTR lpMachineName  OPTIONAL,
IN LPCWSTR lpDeviceID  OPTIONAL,
IN DWORD dwFlags  OPTIONAL,
IN BOOL  bShowDevMgr 
)

Definition at line 272 of file api.cpp.

277{
278 INT_PTR Ret = -1;
279
281 {
282 FIXME("DevPropertiesExW: Invalid flags: 0x%x\n",
285 return -1;
286 }
287
288 if (bShowDevMgr)
289 {
290 FIXME("DevPropertiesExW doesn't support bShowDevMgr!\n");
292 }
293 else
294 {
295 HDEVINFO hDevInfo;
296 SP_DEVINFO_DATA DevInfoData;
297 HINSTANCE hComCtl32;
298
299 if (lpDeviceID == NULL)
300 {
302 return -1;
303 }
304
305 /* dynamically load comctl32 */
306 hComCtl32 = LoadAndInitComctl32();
307 if (hComCtl32 != NULL)
308 {
311 lpMachineName,
312 NULL);
313 if (hDevInfo != INVALID_HANDLE_VALUE)
314 {
315 DevInfoData.cbSize = sizeof(SP_DEVINFO_DATA);
316 if (SetupDiOpenDeviceInfo(hDevInfo,
317 lpDeviceID,
319 0,
320 &DevInfoData))
321 {
323 lpDeviceID,
324 hDevInfo,
325 &DevInfoData,
326 hComCtl32,
327 lpMachineName,
328 dwFlags);
329 }
330
332 }
333
334 FreeLibrary(hComCtl32);
335 }
336 }
337
338 return Ret;
339}
#define FIXME(fmt,...)
Definition: debug.h:111
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102
#define DPF_DEVICE_STATUS_ACTION
Definition: devmgr.h:145
#define ERROR_INVALID_FLAGS
Definition: winerror.h:583

Referenced by DevicePropertiesExA(), DevicePropertiesW(), and CDeviceView::DisplayPropertySheet().

◆ DevicePropertiesW()

int WINAPI DevicePropertiesW ( HWND  hWndParent,
LPCWSTR  lpMachineName,
LPCWSTR  lpDeviceID,
BOOL  bShowDevMgr 
)

Definition at line 403 of file api.cpp.

407{
409 lpMachineName,
410 lpDeviceID,
412 bShowDevMgr);
413}

Referenced by DeviceProperties_RunDLLW().