Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
77fcaa4b
Commit
77fcaa4b
authored
Mar 21, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
Mar 21, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix SHCopyKey to treat string parameter correctly as source path
instead of destination path.
parent
1e365f77
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
reg.c
dlls/shlwapi/reg.c
+13
-13
No files found.
dlls/shlwapi/reg.c
View file @
77fcaa4b
...
@@ -2183,7 +2183,7 @@ HKEY WINAPI SHRegDuplicateHKey(HKEY hKey)
...
@@ -2183,7 +2183,7 @@ HKEY WINAPI SHRegDuplicateHKey(HKEY hKey)
*
*
* PARAMS
* PARAMS
* hKeySrc [I] Source key to copy from
* hKeySrc [I] Source key to copy from
* lpszS
ubKey [I] Sub key under hKeyDst, or NULL to use hKeyDst
directly
* lpszS
rcSubKey [I] Sub key under hKeySrc, or NULL to use hKeySrc
directly
* hKeyDst [I] Destination key
* hKeyDst [I] Destination key
* dwReserved [I] Reserved, must be 0
* dwReserved [I] Reserved, must be 0
*
*
...
@@ -2196,16 +2196,16 @@ HKEY WINAPI SHRegDuplicateHKey(HKEY hKey)
...
@@ -2196,16 +2196,16 @@ HKEY WINAPI SHRegDuplicateHKey(HKEY hKey)
* (It will loop until out of stack, or the registry is full). This
* (It will loop until out of stack, or the registry is full). This
* bug is present in Win32 also.
* bug is present in Win32 also.
*/
*/
DWORD
WINAPI
SHCopyKeyA
(
HKEY
hKeySrc
,
LPCSTR
lpszSubKey
,
HKEY
hKeyDst
,
DWORD
dwReserved
)
DWORD
WINAPI
SHCopyKeyA
(
HKEY
hKeySrc
,
LPCSTR
lpszS
rcS
ubKey
,
HKEY
hKeyDst
,
DWORD
dwReserved
)
{
{
WCHAR
szSubKeyW
[
MAX_PATH
];
WCHAR
szSubKeyW
[
MAX_PATH
];
TRACE
(
"(hkey=%p,%s,%p08x,%ld)
\n
"
,
hKeySrc
,
debugstr_a
(
lpszSubKey
),
hKeyDst
,
dwReserved
);
TRACE
(
"(hkey=%p,%s,%p08x,%ld)
\n
"
,
hKeySrc
,
debugstr_a
(
lpszS
rcS
ubKey
),
hKeyDst
,
dwReserved
);
if
(
lpszSubKey
)
if
(
lpszS
rcS
ubKey
)
MultiByteToWideChar
(
0
,
0
,
lpszSubKey
,
-
1
,
szSubKeyW
,
MAX_PATH
);
MultiByteToWideChar
(
0
,
0
,
lpszS
rcS
ubKey
,
-
1
,
szSubKeyW
,
MAX_PATH
);
return
SHCopyKeyW
(
hKeySrc
,
lpszSubKey
?
szSubKeyW
:
NULL
,
hKeyDst
,
dwReserved
);
return
SHCopyKeyW
(
hKeySrc
,
lpszS
rcS
ubKey
?
szSubKeyW
:
NULL
,
hKeyDst
,
dwReserved
);
}
}
/*************************************************************************
/*************************************************************************
...
@@ -2213,7 +2213,7 @@ DWORD WINAPI SHCopyKeyA(HKEY hKeySrc, LPCSTR lpszSubKey, HKEY hKeyDst, DWORD dwR
...
@@ -2213,7 +2213,7 @@ DWORD WINAPI SHCopyKeyA(HKEY hKeySrc, LPCSTR lpszSubKey, HKEY hKeyDst, DWORD dwR
*
*
* See SHCopyKeyA.
* See SHCopyKeyA.
*/
*/
DWORD
WINAPI
SHCopyKeyW
(
HKEY
hKeySrc
,
LPCWSTR
lpszSubKey
,
HKEY
hKeyDst
,
DWORD
dwReserved
)
DWORD
WINAPI
SHCopyKeyW
(
HKEY
hKeySrc
,
LPCWSTR
lpszS
rcS
ubKey
,
HKEY
hKeyDst
,
DWORD
dwReserved
)
{
{
DWORD
dwKeyCount
=
0
,
dwValueCount
=
0
,
dwMaxKeyLen
=
0
;
DWORD
dwKeyCount
=
0
,
dwValueCount
=
0
,
dwMaxKeyLen
=
0
;
DWORD
dwMaxValueLen
=
0
,
dwMaxDataLen
=
0
,
i
;
DWORD
dwMaxValueLen
=
0
,
dwMaxDataLen
=
0
,
i
;
...
@@ -2222,18 +2222,18 @@ DWORD WINAPI SHCopyKeyW(HKEY hKeySrc, LPCWSTR lpszSubKey, HKEY hKeyDst, DWORD dw
...
@@ -2222,18 +2222,18 @@ DWORD WINAPI SHCopyKeyW(HKEY hKeySrc, LPCWSTR lpszSubKey, HKEY hKeyDst, DWORD dw
WCHAR
szName
[
MAX_PATH
],
*
lpszName
=
szName
;
WCHAR
szName
[
MAX_PATH
],
*
lpszName
=
szName
;
DWORD
dwRet
=
S_OK
;
DWORD
dwRet
=
S_OK
;
TRACE
(
"hkey=%p,%s,%p08x,%ld)
\n
"
,
hKeySrc
,
debugstr_w
(
lpszSubKey
),
hKeyDst
,
dwReserved
);
TRACE
(
"hkey=%p,%s,%p08x,%ld)
\n
"
,
hKeySrc
,
debugstr_w
(
lpszS
rcS
ubKey
),
hKeyDst
,
dwReserved
);
if
(
!
hKeyDst
||
!
hKeySrc
)
if
(
!
hKeyDst
||
!
hKeySrc
)
dwRet
=
ERROR_INVALID_PARAMETER
;
dwRet
=
ERROR_INVALID_PARAMETER
;
else
else
{
{
/* Open
destination
key */
/* Open
source
key */
if
(
lpszSubKey
)
if
(
lpszS
rcS
ubKey
)
dwRet
=
RegOpenKeyExW
(
hKey
Dst
,
lpszSubKey
,
0
,
KEY_ALL_ACCESS
,
&
hKeyDst
);
dwRet
=
RegOpenKeyExW
(
hKey
Src
,
lpszSrcSubKey
,
0
,
KEY_ALL_ACCESS
,
&
hKeySrc
);
if
(
dwRet
)
if
(
dwRet
)
hKeyDst
=
0
;
/* Don't close this key since we didn't open it */
hKeyDst
=
NULL
;
/* Don't close this key since we didn't open it */
else
else
{
{
/* Get details about sub keys and values */
/* Get details about sub keys and values */
...
@@ -2303,7 +2303,7 @@ DWORD WINAPI SHCopyKeyW(HKEY hKeySrc, LPCWSTR lpszSubKey, HKEY hKeyDst, DWORD dw
...
@@ -2303,7 +2303,7 @@ DWORD WINAPI SHCopyKeyW(HKEY hKeySrc, LPCWSTR lpszSubKey, HKEY hKeyDst, DWORD dw
if
(
lpBuff
!=
buff
)
if
(
lpBuff
!=
buff
)
HeapFree
(
GetProcessHeap
(),
0
,
lpBuff
);
HeapFree
(
GetProcessHeap
(),
0
,
lpBuff
);
if
(
lpszSubKey
&&
hKeyDst
)
if
(
lpszS
rcS
ubKey
&&
hKeyDst
)
RegCloseKey
(
hKeyDst
);
RegCloseKey
(
hKeyDst
);
return
dwRet
;
return
dwRet
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment