Author: winesync Date: Thu Nov 29 14:26:23 2007 New Revision: 30890
URL: http://svn.reactos.org/svn/reactos?rev=30890&view=rev Log: Autosyncing with Wine HEAD
Modified: trunk/reactos/dll/win32/version/info.c trunk/reactos/dll/win32/version/install.c trunk/reactos/dll/win32/version/resource.c trunk/reactos/dll/win32/version/version.rbuild trunk/reactos/dll/win32/version/version_ros.diff
Modified: trunk/reactos/dll/win32/version/info.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/version/info.c?re... ============================================================================== --- trunk/reactos/dll/win32/version/info.c (original) +++ trunk/reactos/dll/win32/version/info.c Thu Nov 29 14:26:23 2007 @@ -247,11 +247,9 @@
TRACE("%s\n", debugstr_w(filename));
- hModule = GetModuleHandleW(filename); - if(!hModule) + if (!GetModuleHandleExW(0, filename, &hModule)) hModule = LoadLibraryExW(filename, 0, LOAD_LIBRARY_AS_DATAFILE); - else - hModule = LoadLibraryExW(filename, 0, 0); + if(!hModule) { WARN("Could not load %s\n", debugstr_w(filename)); @@ -594,12 +592,12 @@ /* We have a 16bit resource. */ #endif /* ! __REACTOS__ */ } - else + else { static const char signature[] = "FE2X"; DWORD bufsize = vvis->wLength + strlen(signature); DWORD convbuf; - + /* We have a 32bit resource. * * XP/W2K/W2K3 uses a buffer which is 2 times the actual needed space + 4 bytes "FE2X" @@ -775,7 +773,7 @@ * 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"; @@ -784,7 +782,7 @@ TRACE("(%p,%s,%p,%p)\n", pBlock, debugstr_a(lpSubBlock), lplpBuffer, puLen );
- if (!pBlock) + if (!pBlock) return FALSE;
if ( !VersionInfoIs16( info ) ) @@ -828,7 +826,7 @@ * 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',
Modified: trunk/reactos/dll/win32/version/install.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/version/install.c... ============================================================================== --- trunk/reactos/dll/win32/version/install.c (original) +++ trunk/reactos/dll/win32/version/install.c Thu Nov 29 14:26:23 2007 @@ -123,13 +123,13 @@ */ DWORD WINAPI VerFindFileA( DWORD flags, - LPSTR lpszFilename, - LPSTR lpszWinDir, - LPSTR lpszAppDir, + 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 @@ /***************************************************************************** * VerFindFileW [VERSION.@] */ -DWORD WINAPI VerFindFileW( DWORD 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 @@ * VerInstallFileA [VERSION.@] */ DWORD WINAPI VerInstallFileA( - DWORD 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 @@ * VerInstallFileW [VERSION.@] */ DWORD WINAPI VerInstallFileW( - DWORD 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;
Modified: trunk/reactos/dll/win32/version/resource.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/version/resource.... ============================================================================== --- trunk/reactos/dll/win32/version/resource.c (original) +++ trunk/reactos/dll/win32/version/resource.c Thu Nov 29 14:26:23 2007 @@ -39,7 +39,6 @@
#include "wine/unicode.h" #include "wine/winbase16.h" -#include "wine/winuser16.h"
#include "wine/debug.h"
@@ -295,7 +294,7 @@ pehdoffset = LZSeek( lzfd, 0, SEEK_CUR ); if ( sizeof(pehd) != LZRead( lzfd, (LPSTR)&pehd, sizeof(pehd) ) ) return 0;
- resDataDir = pehd.OptionalHeader.DataDirectory+IMAGE_FILE_RESOURCE_DIRECTORY; + resDataDir = pehd.OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_RESOURCE; if ( !resDataDir->Size ) { TRACE("No resources in PE dll\n" );
Modified: trunk/reactos/dll/win32/version/version.rbuild URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/version/version.r... ============================================================================== --- trunk/reactos/dll/win32/version/version.rbuild (original) +++ trunk/reactos/dll/win32/version/version.rbuild Thu Nov 29 14:26:23 2007 @@ -1,13 +1,12 @@ +<?xml version="1.0"?> +<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <module name="version" type="win32dll" entrypoint="0" baseaddress="${BASEADDRESS_VERSION}" installbase="system32" installname="version.dll" allowwarnings="true"> <importlibrary definition="version.spec.def" /> <include base="version">.</include> <include base="ReactOS">include/reactos/wine</include> - <define name="__REACTOS__" /> <define name="__WINESRC__" /> - <define name="__USE_W32API" /> - <define name="_WIN32_IE">0x600</define> - <define name="_WIN32_WINNT">0x501</define> - <define name="WINVER">0x501</define> + <define name="WINVER">0x600</define> + <define name="_WIN32_WINNT">0x600</define> <library>wine</library> <library>lz32</library> <library>kernel32</library>
Modified: trunk/reactos/dll/win32/version/version_ros.diff URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/version/version_r... ============================================================================== --- trunk/reactos/dll/win32/version/version_ros.diff (original) +++ trunk/reactos/dll/win32/version/version_ros.diff Thu Nov 29 14:26:23 2007 @@ -10,7 +10,7 @@ #include "wine/winuser16.h" #include "wine/unicode.h" #include "winerror.h" -@@ -304,6 +305,7 @@ +@@ -302,6 +303,7 @@ return len; }
@@ -18,7 +18,7 @@ /*********************************************************************** * VERSION_GetFileVersionInfo_16 [internal] * -@@ -437,6 +440,7 @@ +@@ -435,6 +438,7 @@
return len; } @@ -26,7 +26,7 @@
/*********************************************************************** * GetFileVersionInfoSizeW [VERSION.@] -@@ -470,6 +473,10 @@ +@@ -468,6 +471,10 @@
if (!len) { @@ -37,7 +37,7 @@ LPSTR filenameA;
len = WideCharToMultiByte( CP_ACP, 0, filename, -1, NULL, 0, NULL, NULL ); -@@ -501,6 +508,7 @@ +@@ -499,6 +506,7 @@ * doesn't seem to be a problem (len is bigger than info->wLength). */ len = (len - sizeof(VS_FIXEDFILEINFO)) * 4; @@ -45,7 +45,7 @@ } else { -@@ -565,6 +573,10 @@ +@@ -563,6 +571,10 @@
if (!len) { @@ -56,7 +56,7 @@ LPSTR filenameA;
len = WideCharToMultiByte( CP_ACP, 0, filename, -1, NULL, 0, NULL, NULL ); -@@ -580,6 +592,7 @@ +@@ -578,6 +590,7 @@ return FALSE; } /* We have a 16bit resource. */ @@ -64,71 +64,11 @@ } else { -@@ -784,6 +784,9 @@ - TRACE("(%p,%s,%p,%p)\n", - pBlock, debugstr_a(lpSubBlock), lplpBuffer, puLen ); - -+ if (!pBlock) -+ return FALSE; -+ - if ( !VersionInfoIs16( info ) ) - { - BOOL ret; -@@ -836,6 +839,9 @@ - TRACE("(%p,%s,%p,%p)\n", - pBlock, debugstr_w(lpSubBlock), lplpBuffer, puLen ); - -+ if (!pBlock) -+ return FALSE; -+ - if ( VersionInfoIs16( info ) ) - { - BOOL ret; -Index: install.c -=================================================================== ---- install.c (revision 23123) -+++ install.c (working copy) -@@ -122,7 +122,7 @@ - * Reimplementation of VerFindFile from original stub. - */ - DWORD WINAPI VerFindFileA( -- UINT flags, -+ DWORD flags, - LPSTR lpszFilename, - LPSTR lpszWinDir, - LPSTR lpszAppDir, -@@ -220,7 +220,7 @@ - /***************************************************************************** - * VerFindFileW [VERSION.@] - */ --DWORD WINAPI VerFindFileW( UINT flags,LPWSTR lpszFilename,LPWSTR lpszWinDir, -+DWORD WINAPI VerFindFileW( DWORD flags,LPWSTR lpszFilename,LPWSTR lpszWinDir, - LPWSTR lpszAppDir, LPWSTR lpszCurDir,UINT *lpuCurDirLen, - LPWSTR lpszDestDir,UINT *lpuDestDirLen ) - { -@@ -361,7 +361,7 @@ - * VerInstallFileA [VERSION.@] - */ - DWORD WINAPI VerInstallFileA( -- UINT flags,LPSTR srcfilename,LPSTR destfilename,LPSTR srcdir, -+ DWORD flags,LPSTR srcfilename,LPSTR destfilename,LPSTR srcdir, - LPSTR destdir,LPSTR curdir,LPSTR tmpfile,UINT *tmpfilelen ) - { - LPCSTR pdest; -@@ -529,7 +529,7 @@ - * VerInstallFileW [VERSION.@] - */ - DWORD WINAPI VerInstallFileW( -- UINT flags,LPWSTR srcfilename,LPWSTR destfilename,LPWSTR srcdir, -+ DWORD flags,LPWSTR srcfilename,LPWSTR destfilename,LPWSTR srcdir, - LPWSTR destdir,LPWSTR curdir,LPWSTR tmpfile,UINT *tmpfilelen ) - { - LPSTR wsrcf = NULL, wsrcd = NULL, wdestf = NULL, wdestd = NULL, wtmpf = NULL, wcurd = NULL; Index: resource.c =================================================================== --- resource.c (revision 23123) +++ resource.c (working copy) -@@ -43,6 +43,9 @@ +@@ -42,6 +42,9 @@
#include "wine/debug.h"
@@ -138,7 +78,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ver);
-@@ -169,6 +172,7 @@ +@@ -168,6 +171,7 @@ return 0; }
@@ -146,7 +86,7 @@ /*********************************************************************** * load_ne_resource [internal] */ -@@ -267,6 +272,7 @@ +@@ -266,6 +271,7 @@ HeapFree( GetProcessHeap(), 0, resTab ); return TRUE; } @@ -154,7 +94,7 @@
/*********************************************************************** * load_pe_resource [internal] -@@ -412,8 +417,13 @@ +@@ -411,8 +416,13 @@ switch ( read_xx_header( lzfd ) ) { case IMAGE_OS2_SIGNATURE: @@ -168,7 +108,7 @@ break;
case IMAGE_NT_SIGNATURE: -@@ -451,8 +461,13 @@ +@@ -450,8 +460,13 @@ switch ( read_xx_header( lzfd ) ) { case IMAGE_OS2_SIGNATURE: