Skip to content

Commit

Permalink
[HOTPLUG] GetDeviceDisplayInfo: Use friendly name
Browse files Browse the repository at this point in the history
  • Loading branch information
TAN-Gaming committed Nov 2, 2023
1 parent f5929b8 commit 53d5063
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions dll/cpl/hotplug/enum.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <initguid.h>
#include <devguid.h>

#define MAX_DEVICE_DISPLAYNAME_LEN 40
#define MAX_DEVICE_DISPLAYNAME_LEN 256

static
VOID
Expand All @@ -31,13 +31,23 @@ GetDeviceDisplayInfo(
/* Get the device description */
ulSize = cchDesc * sizeof(WCHAR);
cr = CM_Get_DevNode_Registry_PropertyW(DevInst,
CM_DRP_DEVICEDESC,
CM_DRP_FRIENDLYNAME,
NULL,
pszDesc,
&ulSize,
0);
if (cr != CR_SUCCESS)
LoadStringW(hApplet, IDS_UNKNOWN_DEVICE, pszDesc, cchDesc);
{
ulSize = cchDesc * sizeof(WCHAR);
cr = CM_Get_DevNode_Registry_PropertyW(DevInst,
CM_DRP_DEVICEDESC,
NULL,
pszDesc,
&ulSize,
0);
if (cr != CR_SUCCESS)
LoadStringW(hApplet, IDS_UNKNOWN_DEVICE, pszDesc, cchDesc);
}

/* Get the class GUID */
ulSize = sizeof(szGuidString);
Expand Down

0 comments on commit 53d5063

Please sign in to comment.