Commit 015dc79c authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

version: Fix some Ver*() prototypes (especially wrt constness).

Better match the PSDK types and fix the winapi_check warnings.
parent 6927c9ca
...@@ -2140,7 +2140,7 @@ BOOL WINAPI EnumSystemLocalesW( LOCALE_ENUMPROCW lpfnLocaleEnum, DWORD dwFlags ) ...@@ -2140,7 +2140,7 @@ BOOL WINAPI EnumSystemLocalesW( LOCALE_ENUMPROCW lpfnLocaleEnum, DWORD dwFlags )
* Failure: 0. Use GetLastError() to determine the cause. * 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 ); return GetLocaleInfoA( MAKELCID(wLang, SORT_DEFAULT), LOCALE_SENGLANGUAGE, szLang, nSize );
} }
...@@ -2151,7 +2151,7 @@ DWORD WINAPI VerLanguageNameA( UINT wLang, LPSTR szLang, UINT nSize ) ...@@ -2151,7 +2151,7 @@ DWORD WINAPI VerLanguageNameA( UINT wLang, LPSTR szLang, UINT nSize )
* *
* See VerLanguageNameA. * 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 ); return GetLocaleInfoW( MAKELCID(wLang, SORT_DEFAULT), LOCALE_SENGLANGUAGE, szLang, nSize );
} }
......
...@@ -762,7 +762,7 @@ static BOOL WINAPI VersionInfo32_QueryValue( const VS_VERSION_INFO_STRUCT32 *inf ...@@ -762,7 +762,7 @@ static BOOL WINAPI VersionInfo32_QueryValue( const VS_VERSION_INFO_STRUCT32 *inf
* VerQueryValueA [VERSION.@] * VerQueryValueA [VERSION.@]
*/ */
BOOL WINAPI VerQueryValueA( LPCVOID pBlock, LPCSTR lpSubBlock, BOOL WINAPI VerQueryValueA( LPCVOID pBlock, LPCSTR lpSubBlock,
LPVOID *lplpBuffer, UINT *puLen ) LPVOID *lplpBuffer, PUINT puLen )
{ {
static const char rootA[] = "\\"; static const char rootA[] = "\\";
static const char varfileinfoA[] = "\\VarFileInfo\\Translation"; static const char varfileinfoA[] = "\\VarFileInfo\\Translation";
...@@ -815,7 +815,7 @@ BOOL WINAPI VerQueryValueA( LPCVOID pBlock, LPCSTR lpSubBlock, ...@@ -815,7 +815,7 @@ BOOL WINAPI VerQueryValueA( LPCVOID pBlock, LPCSTR lpSubBlock,
* VerQueryValueW [VERSION.@] * VerQueryValueW [VERSION.@]
*/ */
BOOL WINAPI VerQueryValueW( LPCVOID pBlock, LPCWSTR lpSubBlock, BOOL WINAPI VerQueryValueW( LPCVOID pBlock, LPCWSTR lpSubBlock,
LPVOID *lplpBuffer, UINT *puLen ) LPVOID *lplpBuffer, PUINT puLen )
{ {
static const WCHAR rootW[] = { '\\', 0 }; static const WCHAR rootW[] = { '\\', 0 };
static const WCHAR varfileinfoW[] = { '\\','V','a','r','F','i','l','e','I','n','f','o', static const WCHAR varfileinfoW[] = { '\\','V','a','r','F','i','l','e','I','n','f','o',
......
...@@ -122,14 +122,14 @@ static int testFileExistenceW( const WCHAR *path, const WCHAR *file, BOOL excl ) ...@@ -122,14 +122,14 @@ static int testFileExistenceW( const WCHAR *path, const WCHAR *file, BOOL excl )
* Reimplementation of VerFindFile from original stub. * Reimplementation of VerFindFile from original stub.
*/ */
DWORD WINAPI VerFindFileA( DWORD WINAPI VerFindFileA(
UINT flags, DWORD flags,
LPSTR lpszFilename, LPCSTR lpszFilename,
LPSTR lpszWinDir, LPCSTR lpszWinDir,
LPSTR lpszAppDir, LPCSTR lpszAppDir,
LPSTR lpszCurDir, LPSTR lpszCurDir,
UINT *lpuCurDirLen, PUINT lpuCurDirLen,
LPSTR lpszDestDir, LPSTR lpszDestDir,
UINT *lpuDestDirLen ) PUINT lpuDestDirLen )
{ {
DWORD retval = 0; DWORD retval = 0;
const char *curDir; const char *curDir;
...@@ -220,9 +220,9 @@ DWORD WINAPI VerFindFileA( ...@@ -220,9 +220,9 @@ DWORD WINAPI VerFindFileA(
/***************************************************************************** /*****************************************************************************
* VerFindFileW [VERSION.@] * VerFindFileW [VERSION.@]
*/ */
DWORD WINAPI VerFindFileW( UINT flags,LPWSTR lpszFilename,LPWSTR lpszWinDir, DWORD WINAPI VerFindFileW( DWORD flags,LPCWSTR lpszFilename,LPCWSTR lpszWinDir,
LPWSTR lpszAppDir, LPWSTR lpszCurDir,UINT *lpuCurDirLen, LPCWSTR lpszAppDir, LPWSTR lpszCurDir,PUINT lpuCurDirLen,
LPWSTR lpszDestDir,UINT *lpuDestDirLen ) LPWSTR lpszDestDir,PUINT lpuDestDirLen )
{ {
static const WCHAR emptyW; static const WCHAR emptyW;
DWORD retval = 0; DWORD retval = 0;
...@@ -361,8 +361,8 @@ _error2vif(DWORD error) { ...@@ -361,8 +361,8 @@ _error2vif(DWORD error) {
* VerInstallFileA [VERSION.@] * VerInstallFileA [VERSION.@]
*/ */
DWORD WINAPI VerInstallFileA( DWORD WINAPI VerInstallFileA(
UINT flags,LPSTR srcfilename,LPSTR destfilename,LPSTR srcdir, DWORD flags,LPCSTR srcfilename,LPCSTR destfilename,LPCSTR srcdir,
LPSTR destdir,LPSTR curdir,LPSTR tmpfile,UINT *tmpfilelen ) LPCSTR destdir,LPCSTR curdir,LPSTR tmpfile,PUINT tmpfilelen )
{ {
LPCSTR pdest; LPCSTR pdest;
char destfn[260],tmpfn[260],srcfn[260]; char destfn[260],tmpfn[260],srcfn[260];
...@@ -529,8 +529,8 @@ DWORD WINAPI VerInstallFileA( ...@@ -529,8 +529,8 @@ DWORD WINAPI VerInstallFileA(
* VerInstallFileW [VERSION.@] * VerInstallFileW [VERSION.@]
*/ */
DWORD WINAPI VerInstallFileW( DWORD WINAPI VerInstallFileW(
UINT flags,LPWSTR srcfilename,LPWSTR destfilename,LPWSTR srcdir, DWORD flags,LPCWSTR srcfilename,LPCWSTR destfilename,LPCWSTR srcdir,
LPWSTR destdir,LPWSTR curdir,LPWSTR tmpfile,UINT *tmpfilelen ) LPCWSTR destdir,LPCWSTR curdir,LPWSTR tmpfile,PUINT tmpfilelen )
{ {
LPSTR wsrcf = NULL, wsrcd = NULL, wdestf = NULL, wdestd = NULL, wtmpf = NULL, wcurd = NULL; LPSTR wsrcf = NULL, wsrcd = NULL, wdestf = NULL, wdestd = NULL, wtmpf = NULL, wcurd = NULL;
DWORD ret; DWORD ret;
......
...@@ -150,17 +150,17 @@ typedef struct tagVS_FIXEDFILEINFO { ...@@ -150,17 +150,17 @@ typedef struct tagVS_FIXEDFILEINFO {
/* function prototypes */ /* function prototypes */
DWORD WINAPI VerFindFileA(UINT,LPSTR,LPSTR,LPSTR,LPSTR,UINT*,LPSTR,UINT*); DWORD WINAPI VerFindFileA(DWORD,LPCSTR,LPCSTR,LPCSTR,LPSTR,PUINT,LPSTR,PUINT);
DWORD WINAPI VerFindFileW(UINT,LPWSTR,LPWSTR,LPWSTR,LPWSTR,UINT*,LPWSTR,UINT*); DWORD WINAPI VerFindFileW(DWORD,LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,PUINT,LPWSTR,PUINT);
#define VerFindFile WINELIB_NAME_AW(VerFindFile) #define VerFindFile WINELIB_NAME_AW(VerFindFile)
DWORD WINAPI VerInstallFileA(UINT,LPSTR,LPSTR,LPSTR,LPSTR,LPSTR,LPSTR,UINT*); DWORD WINAPI VerInstallFileA(DWORD,LPCSTR,LPCSTR,LPCSTR,LPCSTR,LPCSTR,LPSTR,PUINT);
DWORD WINAPI VerInstallFileW(UINT,LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR,UINT*); DWORD WINAPI VerInstallFileW(DWORD,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,PUINT);
#define VerInstallFile WINELIB_NAME_AW(VerInstallFile) #define VerInstallFile WINELIB_NAME_AW(VerInstallFile)
DWORD WINAPI VerLanguageNameA(UINT,LPSTR,UINT); DWORD WINAPI VerLanguageNameA(DWORD,LPSTR,DWORD);
DWORD WINAPI VerLanguageNameW(UINT,LPWSTR,UINT); DWORD WINAPI VerLanguageNameW(DWORD,LPWSTR,DWORD);
#define VerLanguageName WINELIB_NAME_AW(VerLanguageName) #define VerLanguageName WINELIB_NAME_AW(VerLanguageName)
BOOL WINAPI VerQueryValueA(LPCVOID,LPCSTR,LPVOID*,UINT*); BOOL WINAPI VerQueryValueA(LPCVOID,LPCSTR,LPVOID*,PUINT);
BOOL WINAPI VerQueryValueW(LPCVOID,LPCWSTR,LPVOID*,UINT*); BOOL WINAPI VerQueryValueW(LPCVOID,LPCWSTR,LPVOID*,PUINT);
#define VerQueryValue WINELIB_NAME_AW(VerQueryValue) #define VerQueryValue WINELIB_NAME_AW(VerQueryValue)
DWORD WINAPI GetFileVersionInfoSizeA(LPCSTR,LPDWORD); DWORD WINAPI GetFileVersionInfoSizeA(LPCSTR,LPDWORD);
DWORD WINAPI GetFileVersionInfoSizeW(LPCWSTR,LPDWORD); DWORD WINAPI GetFileVersionInfoSizeW(LPCWSTR,LPDWORD);
......
...@@ -5342,14 +5342,14 @@ TASKENUMPROC ...@@ -5342,14 +5342,14 @@ TASKENUMPROC
BOOL BOOL
DWORD DWORD
UINT
%ptr %ptr
LPCVOID
LPDWORD LPDWORD
LPVOID LPVOID
LPVOID * LPVOID *
UINT * PUINT
%str %str
......
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