Francois Gouget : version: Fix some Ver*() prototypes (
especially wrt constness).
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Sep 10 10:17:48 CDT 2007
Module: wine
Branch: master
Commit: 015dc79cd41f692ecf45bbb19fa95cbcd4e999ba
URL: http://source.winehq.org/git/wine.git/?a=commit;h=015dc79cd41f692ecf45bbb19fa95cbcd4e999ba
Author: Francois Gouget <fgouget at free.fr>
Date: Sat Sep 1 02:46:03 2007 +0200
version: Fix some Ver*() prototypes (especially wrt constness).
Better match the PSDK types and fix the winapi_check warnings.
---
dlls/kernel32/locale.c | 4 ++--
dlls/version/info.c | 4 ++--
dlls/version/install.c | 26 +++++++++++++-------------
include/winver.h | 16 ++++++++--------
tools/winapi/win32.api | 4 ++--
5 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c
index 1d607f1..8a62991 100644
--- a/dlls/kernel32/locale.c
+++ b/dlls/kernel32/locale.c
@@ -2140,7 +2140,7 @@ BOOL WINAPI EnumSystemLocalesW( LOCALE_ENUMPROCW lpfnLocaleEnum, DWORD dwFlags )
* Failure: 0. Use GetLastError() to determine the cause.
*
*/
-DWORD WINAPI VerLanguageNameA( UINT wLang, LPSTR szLang, UINT nSize )
+DWORD WINAPI VerLanguageNameA( DWORD wLang, LPSTR szLang, DWORD nSize )
{
return GetLocaleInfoA( MAKELCID(wLang, SORT_DEFAULT), LOCALE_SENGLANGUAGE, szLang, nSize );
}
@@ -2151,7 +2151,7 @@ DWORD WINAPI VerLanguageNameA( UINT wLang, LPSTR szLang, UINT nSize )
*
* See VerLanguageNameA.
*/
-DWORD WINAPI VerLanguageNameW( UINT wLang, LPWSTR szLang, UINT nSize )
+DWORD WINAPI VerLanguageNameW( DWORD wLang, LPWSTR szLang, DWORD nSize )
{
return GetLocaleInfoW( MAKELCID(wLang, SORT_DEFAULT), LOCALE_SENGLANGUAGE, szLang, nSize );
}
diff --git a/dlls/version/info.c b/dlls/version/info.c
index 907cd23..0ad288e 100644
--- a/dlls/version/info.c
+++ b/dlls/version/info.c
@@ -762,7 +762,7 @@ static BOOL WINAPI VersionInfo32_QueryValue( const VS_VERSION_INFO_STRUCT32 *inf
* VerQueryValueA [VERSION.@]
*/
BOOL WINAPI VerQueryValueA( LPCVOID pBlock, LPCSTR lpSubBlock,
- LPVOID *lplpBuffer, UINT *puLen )
+ LPVOID *lplpBuffer, PUINT puLen )
{
static const char rootA[] = "\\";
static const char varfileinfoA[] = "\\VarFileInfo\\Translation";
@@ -815,7 +815,7 @@ BOOL WINAPI VerQueryValueA( LPCVOID pBlock, LPCSTR lpSubBlock,
* VerQueryValueW [VERSION.@]
*/
BOOL WINAPI VerQueryValueW( LPCVOID pBlock, LPCWSTR lpSubBlock,
- LPVOID *lplpBuffer, UINT *puLen )
+ LPVOID *lplpBuffer, PUINT puLen )
{
static const WCHAR rootW[] = { '\\', 0 };
static const WCHAR varfileinfoW[] = { '\\','V','a','r','F','i','l','e','I','n','f','o',
diff --git a/dlls/version/install.c b/dlls/version/install.c
index 2f70b10..5ff25e7 100644
--- a/dlls/version/install.c
+++ b/dlls/version/install.c
@@ -122,14 +122,14 @@ static int testFileExistenceW( const WCHAR *path, const WCHAR *file, BOOL excl )
* Reimplementation of VerFindFile from original stub.
*/
DWORD WINAPI VerFindFileA(
- UINT flags,
- LPSTR lpszFilename,
- LPSTR lpszWinDir,
- LPSTR lpszAppDir,
+ DWORD flags,
+ LPCSTR lpszFilename,
+ LPCSTR lpszWinDir,
+ LPCSTR lpszAppDir,
LPSTR lpszCurDir,
- UINT *lpuCurDirLen,
+ PUINT lpuCurDirLen,
LPSTR lpszDestDir,
- UINT *lpuDestDirLen )
+ PUINT lpuDestDirLen )
{
DWORD retval = 0;
const char *curDir;
@@ -220,9 +220,9 @@ DWORD WINAPI VerFindFileA(
/*****************************************************************************
* VerFindFileW [VERSION.@]
*/
-DWORD WINAPI VerFindFileW( UINT flags,LPWSTR lpszFilename,LPWSTR lpszWinDir,
- LPWSTR lpszAppDir, LPWSTR lpszCurDir,UINT *lpuCurDirLen,
- LPWSTR lpszDestDir,UINT *lpuDestDirLen )
+DWORD WINAPI VerFindFileW( DWORD flags,LPCWSTR lpszFilename,LPCWSTR lpszWinDir,
+ LPCWSTR lpszAppDir, LPWSTR lpszCurDir,PUINT lpuCurDirLen,
+ LPWSTR lpszDestDir,PUINT lpuDestDirLen )
{
static const WCHAR emptyW;
DWORD retval = 0;
@@ -361,8 +361,8 @@ _error2vif(DWORD error) {
* VerInstallFileA [VERSION.@]
*/
DWORD WINAPI VerInstallFileA(
- UINT flags,LPSTR srcfilename,LPSTR destfilename,LPSTR srcdir,
- LPSTR destdir,LPSTR curdir,LPSTR tmpfile,UINT *tmpfilelen )
+ DWORD flags,LPCSTR srcfilename,LPCSTR destfilename,LPCSTR srcdir,
+ LPCSTR destdir,LPCSTR curdir,LPSTR tmpfile,PUINT tmpfilelen )
{
LPCSTR pdest;
char destfn[260],tmpfn[260],srcfn[260];
@@ -529,8 +529,8 @@ DWORD WINAPI VerInstallFileA(
* VerInstallFileW [VERSION.@]
*/
DWORD WINAPI VerInstallFileW(
- UINT flags,LPWSTR srcfilename,LPWSTR destfilename,LPWSTR srcdir,
- LPWSTR destdir,LPWSTR curdir,LPWSTR tmpfile,UINT *tmpfilelen )
+ DWORD flags,LPCWSTR srcfilename,LPCWSTR destfilename,LPCWSTR srcdir,
+ LPCWSTR destdir,LPCWSTR curdir,LPWSTR tmpfile,PUINT tmpfilelen )
{
LPSTR wsrcf = NULL, wsrcd = NULL, wdestf = NULL, wdestd = NULL, wtmpf = NULL, wcurd = NULL;
DWORD ret;
diff --git a/include/winver.h b/include/winver.h
index c38ad38..f7e887b 100644
--- a/include/winver.h
+++ b/include/winver.h
@@ -150,17 +150,17 @@ typedef struct tagVS_FIXEDFILEINFO {
/* function prototypes */
-DWORD WINAPI VerFindFileA(UINT,LPSTR,LPSTR,LPSTR,LPSTR,UINT*,LPSTR,UINT*);
-DWORD WINAPI VerFindFileW(UINT,LPWSTR,LPWSTR,LPWSTR,LPWSTR,UINT*,LPWSTR,UINT*);
+DWORD WINAPI VerFindFileA(DWORD,LPCSTR,LPCSTR,LPCSTR,LPSTR,PUINT,LPSTR,PUINT);
+DWORD WINAPI VerFindFileW(DWORD,LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,PUINT,LPWSTR,PUINT);
#define VerFindFile WINELIB_NAME_AW(VerFindFile)
-DWORD WINAPI VerInstallFileA(UINT,LPSTR,LPSTR,LPSTR,LPSTR,LPSTR,LPSTR,UINT*);
-DWORD WINAPI VerInstallFileW(UINT,LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR,UINT*);
+DWORD WINAPI VerInstallFileA(DWORD,LPCSTR,LPCSTR,LPCSTR,LPCSTR,LPCSTR,LPSTR,PUINT);
+DWORD WINAPI VerInstallFileW(DWORD,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,PUINT);
#define VerInstallFile WINELIB_NAME_AW(VerInstallFile)
-DWORD WINAPI VerLanguageNameA(UINT,LPSTR,UINT);
-DWORD WINAPI VerLanguageNameW(UINT,LPWSTR,UINT);
+DWORD WINAPI VerLanguageNameA(DWORD,LPSTR,DWORD);
+DWORD WINAPI VerLanguageNameW(DWORD,LPWSTR,DWORD);
#define VerLanguageName WINELIB_NAME_AW(VerLanguageName)
-BOOL WINAPI VerQueryValueA(LPCVOID,LPCSTR,LPVOID*,UINT*);
-BOOL WINAPI VerQueryValueW(LPCVOID,LPCWSTR,LPVOID*,UINT*);
+BOOL WINAPI VerQueryValueA(LPCVOID,LPCSTR,LPVOID*,PUINT);
+BOOL WINAPI VerQueryValueW(LPCVOID,LPCWSTR,LPVOID*,PUINT);
#define VerQueryValue WINELIB_NAME_AW(VerQueryValue)
DWORD WINAPI GetFileVersionInfoSizeA(LPCSTR,LPDWORD);
DWORD WINAPI GetFileVersionInfoSizeW(LPCWSTR,LPDWORD);
diff --git a/tools/winapi/win32.api b/tools/winapi/win32.api
index 0a25f1f..f2a6ef0 100644
--- a/tools/winapi/win32.api
+++ b/tools/winapi/win32.api
@@ -5342,14 +5342,14 @@ TASKENUMPROC
BOOL
DWORD
-UINT
%ptr
+LPCVOID
LPDWORD
LPVOID
LPVOID *
-UINT *
+PUINT
%str
More information about the wine-cvs
mailing list