mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
Autosyncing with Wine HEAD
svn path=/trunk/; revision=32903
This commit is contained in:
parent
5be6901e7d
commit
3365da5d85
4 changed files with 28 additions and 20 deletions
|
@ -253,6 +253,7 @@ static DWORD VERSION_GetFileVersionInfo_PE( LPCWSTR filename, DWORD datasize, LP
|
|||
if(!hModule)
|
||||
{
|
||||
WARN("Could not load %s\n", debugstr_w(filename));
|
||||
|
||||
return 0;
|
||||
}
|
||||
hRsrc = FindResourceW(hModule,
|
||||
|
@ -382,7 +383,10 @@ static DWORD VERSION_GetFileVersionInfo_16( LPCSTR filename, DWORD datasize, LPV
|
|||
if(hModule < 32)
|
||||
{
|
||||
WARN("Could not load %s\n", debugstr_a(filename));
|
||||
return 0;
|
||||
if (hModule == ERROR_BAD_FORMAT)
|
||||
return 0xFFFFFFFF;
|
||||
else
|
||||
return 0x0;
|
||||
}
|
||||
hRsrc = FindResource16(hModule,
|
||||
MAKEINTRESOURCEA(VS_VERSION_INFO),
|
||||
|
|
|
@ -367,7 +367,8 @@ DWORD WINAPI VerInstallFileA(
|
|||
LPCSTR pdest;
|
||||
char destfn[260],tmpfn[260],srcfn[260];
|
||||
HFILE hfsrc,hfdst;
|
||||
DWORD attr,ret,xret,tmplast;
|
||||
DWORD attr,xret,tmplast;
|
||||
LONG ret;
|
||||
LPBYTE buf1,buf2;
|
||||
OFSTRUCT ofs;
|
||||
|
||||
|
@ -419,30 +420,31 @@ DWORD WINAPI VerInstallFileA(
|
|||
}
|
||||
ret = LZCopy(hfsrc,hfdst);
|
||||
_lclose(hfdst);
|
||||
if (((LONG)ret) < 0) {
|
||||
if (ret < 0) {
|
||||
/* translate LZ errors into VIF_xxx */
|
||||
switch (ret) {
|
||||
case LZERROR_BADINHANDLE:
|
||||
case LZERROR_READ:
|
||||
case LZERROR_BADVALUE:
|
||||
case LZERROR_UNKNOWNALG:
|
||||
ret = VIF_CANNOTREADSRC;
|
||||
xret = VIF_CANNOTREADSRC;
|
||||
break;
|
||||
case LZERROR_BADOUTHANDLE:
|
||||
case LZERROR_WRITE:
|
||||
ret = VIF_OUTOFSPACE;
|
||||
xret = VIF_OUTOFSPACE;
|
||||
break;
|
||||
case LZERROR_GLOBALLOC:
|
||||
case LZERROR_GLOBLOCK:
|
||||
ret = VIF_OUTOFMEMORY;
|
||||
xret = VIF_OUTOFMEMORY;
|
||||
break;
|
||||
default: /* unknown error, should not happen */
|
||||
ret = 0;
|
||||
FIXME("Unknown LZCopy error %d, ignoring.\n", ret);
|
||||
xret = 0;
|
||||
break;
|
||||
}
|
||||
if (ret) {
|
||||
if (xret) {
|
||||
LZClose(hfsrc);
|
||||
return ret;
|
||||
return xret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +1,21 @@
|
|||
<?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">
|
||||
<group>
|
||||
<module name="version" type="win32dll" baseaddress="${BASEADDRESS_VERSION}" installbase="system32" installname="version.dll" allowwarnings="true" entrypoint="0">
|
||||
<importlibrary definition="version.spec.def" />
|
||||
<include base="version">.</include>
|
||||
<include base="ReactOS">include/reactos/wine</include>
|
||||
<define name="__WINESRC__" />
|
||||
<define name="WINVER">0x600</define>
|
||||
<define name="_WIN32_WINNT">0x600</define>
|
||||
<library>wine</library>
|
||||
<library>lz32</library>
|
||||
<library>kernel32</library>
|
||||
<library>ntdll</library>
|
||||
<file>info.c</file>
|
||||
<file>install.c</file>
|
||||
<file>resource.c</file>
|
||||
<file>version.rc</file>
|
||||
<file>version.spec</file>
|
||||
<library>wine</library>
|
||||
<library>lz32</library>
|
||||
<library>kernel32</library>
|
||||
<library>ntdll</library>
|
||||
</module>
|
||||
</group>
|
||||
|
|
|
@ -10,7 +10,7 @@ Index: info.c
|
|||
#include "wine/winuser16.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "winerror.h"
|
||||
@@ -302,6 +303,7 @@
|
||||
@@ -303,6 +304,7 @@
|
||||
return len;
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ Index: info.c
|
|||
/***********************************************************************
|
||||
* VERSION_GetFileVersionInfo_16 [internal]
|
||||
*
|
||||
@@ -435,6 +438,7 @@
|
||||
@@ -439,6 +442,7 @@
|
||||
|
||||
return len;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ Index: info.c
|
|||
|
||||
/***********************************************************************
|
||||
* GetFileVersionInfoSizeW [VERSION.@]
|
||||
@@ -468,6 +471,10 @@
|
||||
@@ -472,6 +475,10 @@
|
||||
|
||||
if (!len)
|
||||
{
|
||||
|
@ -37,7 +37,7 @@ Index: info.c
|
|||
LPSTR filenameA;
|
||||
|
||||
len = WideCharToMultiByte( CP_ACP, 0, filename, -1, NULL, 0, NULL, NULL );
|
||||
@@ -499,6 +506,7 @@
|
||||
@@ -503,6 +510,7 @@
|
||||
* doesn't seem to be a problem (len is bigger than info->wLength).
|
||||
*/
|
||||
len = (len - sizeof(VS_FIXEDFILEINFO)) * 4;
|
||||
|
@ -45,7 +45,7 @@ Index: info.c
|
|||
}
|
||||
else
|
||||
{
|
||||
@@ -563,6 +571,10 @@
|
||||
@@ -567,6 +575,10 @@
|
||||
|
||||
if (!len)
|
||||
{
|
||||
|
@ -56,7 +56,7 @@ Index: info.c
|
|||
LPSTR filenameA;
|
||||
|
||||
len = WideCharToMultiByte( CP_ACP, 0, filename, -1, NULL, 0, NULL, NULL );
|
||||
@@ -578,6 +590,7 @@
|
||||
@@ -582,6 +594,7 @@
|
||||
return FALSE;
|
||||
}
|
||||
/* We have a 16bit resource. */
|
||||
|
|
Loading…
Reference in a new issue