mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 12:55:43 +00:00
[ADVAPI32]
- Katayama Hirofumi: Create GUID instead of hardcoding to 0 every time. See issue #5364 for more details. svn path=/trunk/; revision=47111
This commit is contained in:
parent
6b6c137341
commit
50367b3dac
1 changed files with 16 additions and 8 deletions
|
@ -1,15 +1,14 @@
|
||||||
/* $Id$
|
/*
|
||||||
*
|
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
* FILE: lib/advapi32/misc/hwprofiles.c
|
* FILE: dll/win32/advapi32/misc/hwprofiles.c
|
||||||
* PURPOSE: advapi32.dll Hardware Functions
|
* PURPOSE: advapi32.dll Hardware Functions
|
||||||
* PROGRAMMER: Steven Edwards
|
* PROGRAMMER: Steven Edwards
|
||||||
* UPDATE HISTORY:
|
* Eric Kohl
|
||||||
* 20042502
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <advapi32.h>
|
#include <advapi32.h>
|
||||||
|
#include <rpc.h>
|
||||||
#include <wine/debug.h>
|
#include <wine/debug.h>
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(advapi);
|
WINE_DEFAULT_DEBUG_CHANNEL(advapi);
|
||||||
|
|
||||||
|
@ -91,6 +90,7 @@ GetCurrentHwProfileW(LPHW_PROFILE_INFOW lpHwProfileInfo)
|
||||||
HKEY hProfileKey;
|
HKEY hProfileKey;
|
||||||
DWORD dwLength;
|
DWORD dwLength;
|
||||||
DWORD dwConfigId;
|
DWORD dwConfigId;
|
||||||
|
UUID uuid;
|
||||||
|
|
||||||
TRACE("GetCurrentHwProfileW() called\n");
|
TRACE("GetCurrentHwProfileW() called\n");
|
||||||
|
|
||||||
|
@ -158,9 +158,17 @@ GetCurrentHwProfileW(LPHW_PROFILE_INFOW lpHwProfileInfo)
|
||||||
(LPBYTE)&lpHwProfileInfo->szHwProfileGuid,
|
(LPBYTE)&lpHwProfileInfo->szHwProfileGuid,
|
||||||
&dwLength))
|
&dwLength))
|
||||||
{
|
{
|
||||||
/* FIXME: Create a new GUID */
|
/* Create a new GUID */
|
||||||
wcscpy(lpHwProfileInfo->szHwProfileGuid,
|
UuidCreate(&uuid);
|
||||||
L"{00000000-0000-0000-0000-000000000000}");
|
swprintf(
|
||||||
|
lpHwProfileInfo->szHwProfileGuid,
|
||||||
|
L"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
|
||||||
|
uuid.Data1,
|
||||||
|
uuid.Data2,
|
||||||
|
uuid.Data3,
|
||||||
|
uuid.Data4[0], uuid.Data4[1],
|
||||||
|
uuid.Data4[2], uuid.Data4[3], uuid.Data4[4], uuid.Data4[5],
|
||||||
|
uuid.Data4[6], uuid.Data4[7]);
|
||||||
|
|
||||||
dwLength = (wcslen(lpHwProfileInfo->szHwProfileGuid) + 1) * sizeof(WCHAR);
|
dwLength = (wcslen(lpHwProfileInfo->szHwProfileGuid) + 1) * sizeof(WCHAR);
|
||||||
RegSetValueExW(hProfileKey,
|
RegSetValueExW(hProfileKey,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue