📄 version_ros.diff
字号:
Index: info.c
===================================================================
--- info.c (revision 23123)
+++ info.c (working copy)
@@ -30,6 +30,7 @@
#include "winbase.h"
#include "winver.h"
#include "winternl.h"
+#include "winuser.h"
#include "wine/winuser16.h"
#include "wine/unicode.h"
#include "winerror.h"
@@ -304,6 +305,7 @@
return len;
}
+#ifndef __REACTOS__
/***********************************************************************
* VERSION_GetFileVersionInfo_16 [internal]
*
@@ -437,6 +440,7 @@
return len;
}
+#endif /* ! __REACTOS__ */
/***********************************************************************
* GetFileVersionInfoSizeW [VERSION.@]
@@ -470,6 +473,10 @@
if (!len)
{
+#ifdef __REACTOS__
+ SetLastError(ERROR_FILE_NOT_FOUND);
+ return 0;
+#else /* __REACTOS__ */
LPSTR filenameA;
len = WideCharToMultiByte( CP_ACP, 0, filename, -1, NULL, 0, NULL, NULL );
@@ -501,6 +508,7 @@
* doesn't seem to be a problem (len is bigger than info->wLength).
*/
len = (len - sizeof(VS_FIXEDFILEINFO)) * 4;
+#endif /* ! __REACTOS__ */
}
else
{
@@ -565,6 +573,10 @@
if (!len)
{
+#ifdef __REACTOS__
+ SetLastError(ERROR_RESOURCE_DATA_NOT_FOUND);
+ return FALSE;
+#else /* __REACTOS__ */
LPSTR filenameA;
len = WideCharToMultiByte( CP_ACP, 0, filename, -1, NULL, 0, NULL, NULL );
@@ -580,6 +592,7 @@
return FALSE;
}
/* We have a 16bit resource. */
+#endif /* ! __REACTOS__ */
}
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 @@
#include "wine/debug.h"
+/* winnt.h */
+#define IMAGE_FILE_RESOURCE_DIRECTORY 2
+
WINE_DEFAULT_DEBUG_CHANNEL(ver);
@@ -169,6 +172,7 @@
return 0;
}
+#ifndef __REACTOS__
/***********************************************************************
* load_ne_resource [internal]
*/
@@ -267,6 +272,7 @@
HeapFree( GetProcessHeap(), 0, resTab );
return TRUE;
}
+#endif /* ! __REACTOS__ */
/***********************************************************************
* load_pe_resource [internal]
@@ -412,8 +417,13 @@
switch ( read_xx_header( lzfd ) )
{
case IMAGE_OS2_SIGNATURE:
+#ifdef __REACTOS__
+ ERR("OS2 Images not supported under ReactOS at this time.");
+ retv = 0;
+#else
retv = find_ne_resource( lzfd, lpszResType, lpszResId,
&reslen, lpdwFileOffset );
+#endif
break;
case IMAGE_NT_SIGNATURE:
@@ -451,8 +461,13 @@
switch ( read_xx_header( lzfd ) )
{
case IMAGE_OS2_SIGNATURE:
+#ifdef __REACTOS__
+ ERR("OS2 Images not supported under ReactOS at this time.");
+ retv = 0;
+#else
retv = find_ne_resource( lzfd, lpszResType, lpszResId,
&reslen, &dwFileOffset );
+#endif
break;
case IMAGE_NT_SIGNATURE:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -