Commit f1706b03 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

shlwapi: Implement SHRegCreateUSKeyA().

parent 3f0a2434
......@@ -209,31 +209,48 @@ LONG WINAPI SHRegCloseUSKey(
/*************************************************************************
* SHRegCreateUSKeyA [SHLWAPI.@]
*
* Create or open a user-specific registry key.
*
* PARAMS
* pszPath [I] Key name to create or open.
* samDesired [I] Wanted security access.
* hRelativeUSKey [I] Base path if pszPath is relative. NULL otherwise.
* phNewUSKey [O] Receives a handle to the new or opened key.
* dwFlags [I] Base key under which the key should be opened.
*
* RETURNS
* Success: ERROR_SUCCESS
* Failure: Nonzero error code from winerror.h
* See SHRegCreateUSKeyW.
*/
LONG WINAPI SHRegCreateUSKeyA(LPCSTR pszPath, REGSAM samDesired, HUSKEY hRelativeUSKey,
PHUSKEY phNewUSKey, DWORD dwFlags)
LONG WINAPI SHRegCreateUSKeyA(LPCSTR path, REGSAM samDesired, HUSKEY relative_key,
PHUSKEY new_uskey, DWORD flags)
{
FIXME("(%s, 0x%08x, %p, %p, 0x%08x) stub\n", debugstr_a(pszPath), samDesired,
hRelativeUSKey, phNewUSKey, dwFlags);
return ERROR_SUCCESS;
WCHAR *pathW;
LONG ret;
TRACE("(%s, 0x%08x, %p, %p, 0x%08x)\n", debugstr_a(path), samDesired, relative_key,
new_uskey, flags);
if (path)
{
INT len = MultiByteToWideChar(CP_ACP, 0, path, -1, NULL, 0);
pathW = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR));
if (!pathW)
return ERROR_NOT_ENOUGH_MEMORY;
MultiByteToWideChar(CP_ACP, 0, path, -1, pathW, len);
}
else
pathW = NULL;
ret = SHRegCreateUSKeyW(pathW, samDesired, relative_key, new_uskey, flags);
HeapFree(GetProcessHeap(), 0, pathW);
return ret;
}
/*************************************************************************
* SHRegCreateUSKeyW [SHLWAPI.@]
*
* See SHRegCreateUSKeyA.
* Create or open a user-specific registry key.
*
* PARAMS
* path [I] Key name to create or open.
* samDesired [I] Wanted security access.
* relative_key [I] Base path if 'path' is relative. NULL otherwise.
* new_uskey [O] Receives a handle to the new or opened key.
* flags [I] Base key under which the key should be opened.
*
* RETURNS
* Success: ERROR_SUCCESS
* Failure: Nonzero error code from winerror.h
*/
LONG WINAPI SHRegCreateUSKeyW(LPCWSTR path, REGSAM samDesired, HUSKEY relative_key,
PHUSKEY new_uskey, DWORD flags)
......
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