Signed-off-by: Serge Gautherie winehq-git_serge_180711@gautherie.fr --- Follow-up to https://source.winehq.org/git/wine.git/commit/3e35bf3889031e86f0ad5a6ed54708... --- .../api-ms-win-downlevel-shlwapi-l2-1-0.spec | 2 +- dlls/shcore/main.c | 10 +++++++++- dlls/shcore/shcore.spec | 2 +- dlls/shlwapi/shlwapi.spec | 2 +- include/shlwapi.h | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/dlls/api-ms-win-downlevel-shlwapi-l2-1-0/api-ms-win-downlevel-shlwapi-l2-1-0.spec b/dlls/api-ms-win-downlevel-shlwapi-l2-1-0/api-ms-win-downlevel-shlwapi-l2-1-0.spec index 11c33f8..a2b2ce9 100644 --- a/dlls/api-ms-win-downlevel-shlwapi-l2-1-0/api-ms-win-downlevel-shlwapi-l2-1-0.spec +++ b/dlls/api-ms-win-downlevel-shlwapi-l2-1-0/api-ms-win-downlevel-shlwapi-l2-1-0.spec @@ -40,7 +40,7 @@ @ stdcall SHQueryInfoKeyW(long ptr ptr ptr ptr) shlwapi.SHQueryInfoKeyW @ stdcall SHQueryValueExA(long str ptr ptr ptr ptr) shlwapi.SHQueryValueExA @ stdcall SHQueryValueExW(long wstr ptr ptr ptr ptr) shlwapi.SHQueryValueExW -@ stdcall SHRegDuplicateHKey(long) shlwapi.SHRegDuplicateHKey +@ stdcall SHRegDuplicateHKey(ptr) shlwapi.SHRegDuplicateHKey @ stdcall SHRegGetPathA(long str str ptr long) shlwapi.SHRegGetPathA @ stdcall SHRegGetPathW(long wstr wstr ptr long) shlwapi.SHRegGetPathW @ stdcall SHRegGetValueA( long str str long ptr ptr ptr ) shlwapi.SHRegGetValueA diff --git a/dlls/shcore/main.c b/dlls/shcore/main.c index 3f95c1f..01b7747 100644 --- a/dlls/shcore/main.c +++ b/dlls/shcore/main.c @@ -1781,8 +1781,16 @@ DWORD WINAPI SHAnsiToUnicode(const char *src, WCHAR *dest, int dest_len)
/************************************************************************* * SHRegDuplicateHKey [SHCORE.@] + * + * Create a duplicate of a registry handle. + * + * PARAMS + * hKey [I] key to duplicate. + * + * RETURNS + * A new handle pointing to the same key as hKey. */ -HKEY WINAPI SHRegDuplicateHKey(HKEY hKey) +HKEY WINAPI SHRegDuplicateHKey(IN HKEY hKey) { HKEY newKey = 0;
diff --git a/dlls/shcore/shcore.spec b/dlls/shcore/shcore.spec index d5b7a34..db74017 100644 --- a/dlls/shcore/shcore.spec +++ b/dlls/shcore/shcore.spec @@ -61,7 +61,7 @@ @ stdcall SHQueryInfoKeyW(long ptr ptr ptr ptr) @ stdcall SHQueryValueExA(long str ptr ptr ptr ptr) @ stdcall SHQueryValueExW(long wstr ptr ptr ptr ptr) -@ stdcall SHRegDuplicateHKey(long) +@ stdcall SHRegDuplicateHKey(ptr) @ stdcall SHRegGetIntW(ptr wstr long) @ stdcall SHRegGetPathA(long str str ptr long) @ stdcall SHRegGetPathW(long wstr wstr ptr long) diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec index b126a46..af61b8d 100644 --- a/dlls/shlwapi/shlwapi.spec +++ b/dlls/shlwapi/shlwapi.spec @@ -720,7 +720,7 @@ @ stdcall SHRegDeleteEmptyUSKeyW(long wstr long) @ stdcall SHRegDeleteUSValueA(long str long) @ stdcall SHRegDeleteUSValueW(long wstr long) -@ stdcall -import SHRegDuplicateHKey(long) +@ stdcall -import SHRegDuplicateHKey(ptr) @ stdcall SHRegEnumUSKeyA(long long str ptr long) @ stdcall SHRegEnumUSKeyW(long long wstr ptr long) @ stdcall SHRegEnumUSValueA(long long ptr ptr ptr ptr ptr long) diff --git a/include/shlwapi.h b/include/shlwapi.h index ca15bd2..d6943d0 100644 --- a/include/shlwapi.h +++ b/include/shlwapi.h @@ -91,7 +91,7 @@ DWORD WINAPI SHCopyKeyA(HKEY,LPCSTR,HKEY,DWORD); DWORD WINAPI SHCopyKeyW(HKEY,LPCWSTR,HKEY,DWORD); #define SHCopyKey WINELIB_NAME_AW(SHCopyKey)
-HKEY WINAPI SHRegDuplicateHKey(HKEY); +HKEY WINAPI SHRegDuplicateHKey(IN HKEY hKey);
/* SHRegGetValue flags */ typedef INT SRRF;
On 5/19/20 5:45 PM, Serge Gautherie wrote:
Signed-off-by: Serge Gautherie winehq-git_serge_180711@gautherie.fr
Follow-up to https://source.winehq.org/git/wine.git/commit/3e35bf3889031e86f0ad5a6ed54708...
.../api-ms-win-downlevel-shlwapi-l2-1-0.spec | 2 +- dlls/shcore/main.c | 10 +++++++++- dlls/shcore/shcore.spec | 2 +- dlls/shlwapi/shlwapi.spec | 2 +- include/shlwapi.h | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/dlls/api-ms-win-downlevel-shlwapi-l2-1-0/api-ms-win-downlevel-shlwapi-l2-1-0.spec b/dlls/api-ms-win-downlevel-shlwapi-l2-1-0/api-ms-win-downlevel-shlwapi-l2-1-0.spec index 11c33f8..a2b2ce9 100644 --- a/dlls/api-ms-win-downlevel-shlwapi-l2-1-0/api-ms-win-downlevel-shlwapi-l2-1-0.spec +++ b/dlls/api-ms-win-downlevel-shlwapi-l2-1-0/api-ms-win-downlevel-shlwapi-l2-1-0.spec @@ -40,7 +40,7 @@ @ stdcall SHQueryInfoKeyW(long ptr ptr ptr ptr) shlwapi.SHQueryInfoKeyW @ stdcall SHQueryValueExA(long str ptr ptr ptr ptr) shlwapi.SHQueryValueExA @ stdcall SHQueryValueExW(long wstr ptr ptr ptr ptr) shlwapi.SHQueryValueExW -@ stdcall SHRegDuplicateHKey(long) shlwapi.SHRegDuplicateHKey +@ stdcall SHRegDuplicateHKey(ptr) shlwapi.SHRegDuplicateHKey @ stdcall SHRegGetPathA(long str str ptr long) shlwapi.SHRegGetPathA @ stdcall SHRegGetPathW(long wstr wstr ptr long) shlwapi.SHRegGetPathW @ stdcall SHRegGetValueA( long str str long ptr ptr ptr ) shlwapi.SHRegGetValueA diff --git a/dlls/shcore/main.c b/dlls/shcore/main.c index 3f95c1f..01b7747 100644
This is fine as it is, because argument is a handle.
--- a/dlls/shcore/main.c +++ b/dlls/shcore/main.c @@ -1781,8 +1781,16 @@ DWORD WINAPI SHAnsiToUnicode(const char *src, WCHAR *dest, int dest_len)
/*************************************************************************
- SHRegDuplicateHKey [SHCORE.@]
- Create a duplicate of a registry handle.
- PARAMS
- hKey [I] key to duplicate.
- RETURNS
*/
- A new handle pointing to the same key as hKey.
-HKEY WINAPI SHRegDuplicateHKey(HKEY hKey) +HKEY WINAPI SHRegDuplicateHKey(IN HKEY hKey) { HKEY newKey = 0;
Please don't add such comment headers, most of them were removed during shcore transition.
diff --git a/dlls/shcore/shcore.spec b/dlls/shcore/shcore.spec index d5b7a34..db74017 100644 --- a/dlls/shcore/shcore.spec +++ b/dlls/shcore/shcore.spec @@ -61,7 +61,7 @@ @ stdcall SHQueryInfoKeyW(long ptr ptr ptr ptr) @ stdcall SHQueryValueExA(long str ptr ptr ptr ptr) @ stdcall SHQueryValueExW(long wstr ptr ptr ptr ptr) -@ stdcall SHRegDuplicateHKey(long) +@ stdcall SHRegDuplicateHKey(ptr) @ stdcall SHRegGetIntW(ptr wstr long) @ stdcall SHRegGetPathA(long str str ptr long) @ stdcall SHRegGetPathW(long wstr wstr ptr long) diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec index b126a46..af61b8d 100644 --- a/dlls/shlwapi/shlwapi.spec +++ b/dlls/shlwapi/shlwapi.spec @@ -720,7 +720,7 @@ @ stdcall SHRegDeleteEmptyUSKeyW(long wstr long) @ stdcall SHRegDeleteUSValueA(long str long) @ stdcall SHRegDeleteUSValueW(long wstr long) -@ stdcall -import SHRegDuplicateHKey(long) +@ stdcall -import SHRegDuplicateHKey(ptr) @ stdcall SHRegEnumUSKeyA(long long str ptr long) @ stdcall SHRegEnumUSKeyW(long long wstr ptr long) @ stdcall SHRegEnumUSValueA(long long ptr ptr ptr ptr ptr long) diff --git a/include/shlwapi.h b/include/shlwapi.h index ca15bd2..d6943d0 100644 --- a/include/shlwapi.h +++ b/include/shlwapi.h @@ -91,7 +91,7 @@ DWORD WINAPI SHCopyKeyA(HKEY,LPCSTR,HKEY,DWORD); DWORD WINAPI SHCopyKeyW(HKEY,LPCWSTR,HKEY,DWORD); #define SHCopyKey WINELIB_NAME_AW(SHCopyKey)
-HKEY WINAPI SHRegDuplicateHKey(HKEY); +HKEY WINAPI SHRegDuplicateHKey(IN HKEY hKey);
What is this useful for?
/* SHRegGetValue flags */ typedef INT SRRF;
On 19/05/2020 16:49, Nikolay Sivov wrote:
On 5/19/20 5:45 PM, Serge Gautherie wrote:
-@ stdcall SHRegDuplicateHKey(long) shlwapi.SHRegDuplicateHKey +@ stdcall SHRegDuplicateHKey(ptr) shlwapi.SHRegDuplicateHKey
This is fine as it is, because argument is a handle.
I am wondering about HKEY > HANDLE > void *. Shouldn't handles be declared as pointers in spec files? If not, then what about '@ stdcall SHRegCloseUSKey(ptr)' for example?
Please don't add such comment headers, most of them were removed during shcore transition.
Noted, I wasn't sure this removal was intended.
-HKEY WINAPI SHRegDuplicateHKey(HKEY); +HKEY WINAPI SHRegDuplicateHKey(IN HKEY hKey);
What is this useful for?
There are IN annotations elsewhere in the tree, so why not here too?
On 5/19/20 6:16 PM, Serge Gautherie wrote:
On 19/05/2020 16:49, Nikolay Sivov wrote:
On 5/19/20 5:45 PM, Serge Gautherie wrote:
-@ stdcall SHRegDuplicateHKey(long) shlwapi.SHRegDuplicateHKey +@ stdcall SHRegDuplicateHKey(ptr) shlwapi.SHRegDuplicateHKey
This is fine as it is, because argument is a handle.
I am wondering about HKEY > HANDLE > void *. Shouldn't handles be declared as pointers in spec files? If not, then what about '@ stdcall SHRegCloseUSKey(ptr)' for example?
For relay logs it makes no difference, personally I have no problem with using ptr for that, but you're changing what's already there.
Please don't add such comment headers, most of them were removed during shcore transition.
Noted, I wasn't sure this removal was intended.
-HKEY WINAPI SHRegDuplicateHKey(HKEY); +HKEY WINAPI SHRegDuplicateHKey(IN HKEY hKey);
What is this useful for?
There are IN annotations elsewhere in the tree, so why not here too?
Sure, if such macros were used by anything we could have more, if it's not useful it seems better to have less of it.
On 19/05/2020 17:25, Nikolay Sivov wrote:
On 5/19/20 6:16 PM, Serge Gautherie wrote:
For relay logs it makes no difference, personally I have no problem with using ptr for that, but you're changing what's already there.
Ah, inconsistency, that explains it...
Sure, if such macros were used by anything we could have more, if it's not useful it seems better to have less of it.
Thanks for the explanations!
Nothing left on this patch, then.