Commit 6f3228a5 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

Implement SetupDiClassNameFromGuidExA.

parent 0a1481a7
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "setupapi.h" #include "setupapi.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#include "cfgmgr32.h"
#include "initguid.h" #include "initguid.h"
#include "winioctl.h" #include "winioctl.h"
#include "rpc.h" #include "rpc.h"
...@@ -469,8 +470,24 @@ BOOL WINAPI SetupDiClassNameFromGuidExA( ...@@ -469,8 +470,24 @@ BOOL WINAPI SetupDiClassNameFromGuidExA(
PCSTR MachineName, PCSTR MachineName,
PVOID Reserved) PVOID Reserved)
{ {
FIXME("\n"); WCHAR ClassNameW[MAX_CLASS_NAME_LEN];
return FALSE; LPWSTR MachineNameW = NULL;
BOOL ret;
if (MachineName)
MachineNameW = MultiByteToUnicode(MachineName, CP_ACP);
ret = SetupDiClassNameFromGuidExW(ClassGuid, ClassNameW, MAX_CLASS_NAME_LEN,
NULL, MachineNameW, Reserved);
if (ret)
{
int len = WideCharToMultiByte(CP_ACP, 0, ClassNameW, -1, ClassName,
ClassNameSize, NULL, NULL);
if (!ClassNameSize && RequiredSize)
*RequiredSize = len;
}
MyFree(MachineNameW);
return ret;
} }
/*********************************************************************** /***********************************************************************
......
...@@ -23,6 +23,10 @@ typedef DWORD CONFIGRET; ...@@ -23,6 +23,10 @@ typedef DWORD CONFIGRET;
#define CR_SUCCESS 0 #define CR_SUCCESS 0
#define MAX_CLASS_NAME_LEN 32
#define MAX_GUID_STRING_LEN 39
#define MAX_PROFILE_LEN 80
CONFIGRET WINAPI CM_Get_Device_ID_ListA( PCSTR, PCHAR, ULONG, ULONG ); CONFIGRET WINAPI CM_Get_Device_ID_ListA( PCSTR, PCHAR, ULONG, ULONG );
CONFIGRET WINAPI CM_Get_Device_ID_ListW( PCWSTR, PWCHAR, ULONG, ULONG ); CONFIGRET WINAPI CM_Get_Device_ID_ListW( PCWSTR, PWCHAR, ULONG, ULONG );
#define CM_Get_Device_ID_List WINELIB_NAME_AW(CM_Get_Device_ID_List) #define CM_Get_Device_ID_List WINELIB_NAME_AW(CM_Get_Device_ID_List)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment