Commit 51cd07c3 authored by Christian Gmeiner's avatar Christian Gmeiner Committed by Alexandre Julliard

setupapi: Implemented SetupDiCreateDeviceInfoA.

parent dce52c1b
...@@ -697,6 +697,46 @@ SetupDiCreateDeviceInfoListExW(const GUID *ClassGuid, ...@@ -697,6 +697,46 @@ SetupDiCreateDeviceInfoListExW(const GUID *ClassGuid,
} }
/*********************************************************************** /***********************************************************************
* SetupDiCreateDeviceInfoA (SETUPAPI.@)
*/
BOOL WINAPI SetupDiCreateDeviceInfoA(
HDEVINFO DeviceInfoSet,
PCSTR DeviceName,
CONST GUID *ClassGuid,
PCSTR DeviceDescription,
HWND hwndParent,
DWORD CreationFlags,
PSP_DEVINFO_DATA DeviceInfoData)
{
BOOL ret = FALSE;
LPWSTR DeviceNameW = NULL;
LPWSTR DeviceDescriptionW = NULL;
if (DeviceName)
{
DeviceNameW = MultiByteToUnicode(DeviceName, CP_ACP);
if (DeviceNameW == NULL) return FALSE;
}
if (DeviceDescription)
{
DeviceDescriptionW = MultiByteToUnicode(DeviceDescription, CP_ACP);
if (DeviceDescriptionW == NULL)
{
MyFree(DeviceNameW);
return FALSE;
}
}
ret = SetupDiCreateDeviceInfoW(DeviceInfoSet, DeviceNameW, ClassGuid, DeviceDescriptionW,
hwndParent, CreationFlags, DeviceInfoData);
MyFree(DeviceNameW);
MyFree(DeviceDescriptionW);
return ret;
}
/***********************************************************************
* SetupDiCreateDeviceInfoW (SETUPAPI.@) * SetupDiCreateDeviceInfoW (SETUPAPI.@)
*/ */
BOOL WINAPI SetupDiCreateDeviceInfoW( BOOL WINAPI SetupDiCreateDeviceInfoW(
......
...@@ -282,7 +282,7 @@ ...@@ -282,7 +282,7 @@
@ stdcall SetupDiClassNameFromGuidW(ptr wstr long ptr) @ stdcall SetupDiClassNameFromGuidW(ptr wstr long ptr)
@ stub SetupDiCreateDevRegKeyA @ stub SetupDiCreateDevRegKeyA
@ stub SetupDiCreateDevRegKeyW @ stub SetupDiCreateDevRegKeyW
@ stub SetupDiCreateDeviceInfoA @ stdcall SetupDiCreateDeviceInfoA(long str ptr str long long ptr)
@ stdcall SetupDiCreateDeviceInfoList(ptr ptr) @ stdcall SetupDiCreateDeviceInfoList(ptr ptr)
@ stdcall SetupDiCreateDeviceInfoListExA(ptr long str ptr) @ stdcall SetupDiCreateDeviceInfoListExA(ptr long str ptr)
@ stdcall SetupDiCreateDeviceInfoListExW(ptr long str ptr) @ stdcall SetupDiCreateDeviceInfoListExW(ptr long str ptr)
......
...@@ -744,6 +744,9 @@ HDEVINFO WINAPI SetupDiCreateDeviceInfoList(const GUID *, HWND); ...@@ -744,6 +744,9 @@ HDEVINFO WINAPI SetupDiCreateDeviceInfoList(const GUID *, HWND);
HDEVINFO WINAPI SetupDiCreateDeviceInfoListExA(const GUID *, HWND, PCSTR, PVOID); HDEVINFO WINAPI SetupDiCreateDeviceInfoListExA(const GUID *, HWND, PCSTR, PVOID);
HDEVINFO WINAPI SetupDiCreateDeviceInfoListExW(const GUID *, HWND, PCWSTR, PVOID); HDEVINFO WINAPI SetupDiCreateDeviceInfoListExW(const GUID *, HWND, PCWSTR, PVOID);
#define SetupDiCreateDeviceInfoListEx WINELIB_NAME_AW(SetupDiCreateDeviceInfoListEx) #define SetupDiCreateDeviceInfoListEx WINELIB_NAME_AW(SetupDiCreateDeviceInfoListEx)
BOOL WINAPI SetupDiCreateDeviceInfoA(HDEVINFO, PCSTR, CONST GUID*, PCSTR, HWND, DWORD,PSP_DEVINFO_DATA);
BOOL WINAPI SetupDiCreateDeviceInfoW(HDEVINFO, PCWSTR, CONST GUID*, PCWSTR, HWND, DWORD,PSP_DEVINFO_DATA);
#define SetupDiCreateDeviceInfo WINELIB_NAME_AW(SetupDiCreateDeviceInfo)
BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO); BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO);
BOOL WINAPI SetupDiEnumDeviceInfo(HDEVINFO, DWORD, PSP_DEVINFO_DATA); BOOL WINAPI SetupDiEnumDeviceInfo(HDEVINFO, DWORD, PSP_DEVINFO_DATA);
BOOL WINAPI SetupDiEnumDeviceInterfaces(HDEVINFO, PSP_DEVINFO_DATA, const GUID *, DWORD, PSP_DEVICE_INTERFACE_DATA); BOOL WINAPI SetupDiEnumDeviceInterfaces(HDEVINFO, PSP_DEVINFO_DATA, const GUID *, DWORD, PSP_DEVICE_INTERFACE_DATA);
......
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