Re: [PATCH] slc: Fix return type
Le 29/05/2013 12:06, Detlef Riekenberg a écrit :
-- By by ... Detlef --- dlls/slc/slc.c | 31 +++++++++++++++++++++++-------- include/slpublic.h | 2 +- 2 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/dlls/slc/slc.c b/dlls/slc/slc.c index e7416f1..7fc9b93 100644 --- a/dlls/slc/slc.c +++ b/dlls/slc/slc.c @@ -1,6 +1,7 @@ /* * * Copyright 2008 Alistair Leslie-Hughes + * Copyright 2010 Detlef Riekenberg * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -28,15 +29,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(slc);
-DWORD WINAPI SLGetWindowsInformationDWORD(LPCWSTR lpszValueName, LPDWORD pdwValue) -{ - FIXME("(%s) stub\n", debugstr_w(lpszValueName) ); - - return SL_E_RIGHT_NOT_GRANTED; -} - /*********************************************************************** - * DllMain (CLUSAPI.@) + * DllMain (slc.@) * */ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) @@ -51,3 +45,24 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) } return TRUE; } + +/*********************************************************************** + * SLGetWindowsInformationDWORD (slc.@) + * + * check the license and return the value for the given name + * + * PARAMS + * name [i] application related value name to check + * pvalue [o] ptr, where the value for the given name should be saved + * + * RETURNS + * Success: S_OK + * Failure: A HRESULT error code + * + */ +HRESULT WINAPI SLGetWindowsInformationDWORD(PCWSTR name, DWORD *pvalue) +{ + FIXME("(%s, %p) stub\n", debugstr_w(name), pvalue); + + return SL_E_RIGHT_NOT_GRANTED; +} diff --git a/include/slpublic.h b/include/slpublic.h index a2c6d42..5553787 100644 --- a/include/slpublic.h +++ b/include/slpublic.h @@ -29,7 +29,7 @@ extern "C" { #define SLCAPI DECLSPEC_IMPORT #endif
-SLCAPI DWORD WINAPI SLGetWindowsInformationDWORD(LPCWSTR lpszValueName, LPDWORD pdwValue); +SLCAPI HRESULT WINAPI SLGetWindowsInformationDWORD(PCWSTR, DWORD *);
#ifdef __cplusplus I think s/PCWSTR/const WCHAR */ and s/pvalue/value/ would be better. :)
Christian wrote at Wednesday, 29. Mai 2013 at 23:12 Uhr
+ */ +HRESULT WINAPI SLGetWindowsInformationDWORD(PCWSTR name, DWORD *pvalue) +{
-SLCAPI DWORD WINAPI SLGetWindowsInformationDWORD(LPCWSTR lpszValueName, LPDWORD pdwValue); +SLCAPI HRESULT WINAPI SLGetWindowsInformationDWORD(PCWSTR, DWORD *);
I think s/PCWSTR/const WCHAR */ and s/pvalue/value/ would be better. :)
I disagree for "const WCHAR *", which is really rare used in Wine (Please grep the headers yourself) pvalue is a matter of taste. I will send an updated version -- By by ... Detlef
2013/5/31 Detlef Riekenberg <wine.dev(a)web.de>
Christian wrote at Wednesday, 29. Mai 2013 at 23:12 Uhr
+ */ +HRESULT WINAPI SLGetWindowsInformationDWORD(PCWSTR name, DWORD *pvalue) +{
-SLCAPI DWORD WINAPI SLGetWindowsInformationDWORD(LPCWSTR lpszValueName, LPDWORD pdwValue); +SLCAPI HRESULT WINAPI SLGetWindowsInformationDWORD(PCWSTR, DWORD *);
I think s/PCWSTR/const WCHAR */ and s/pvalue/value/ would be better. :)
I disagree for "const WCHAR *", which is really rare used in Wine (Please grep the headers yourself)
There was a discussion about the LPxxx stuff removal (I guess Pxxx as well) some time ago. There was also something about const that doesn't behave as expected in that case but I don't remember the details.
pvalue is a matter of taste.
It's not particularily my taste. It's something preferred. It was just a guess since the patch was pending. Christian
participants (2)
-
Christian Costa -
Detlef Riekenberg