mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 17:05:45 +00:00
Update files from WineHq.
svn path=/trunk/; revision=12117
This commit is contained in:
parent
eb3db535d2
commit
0056248f6d
8 changed files with 33 additions and 12 deletions
|
@ -28,6 +28,7 @@ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/stand
|
|||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
#define COBJMACROS
|
||||
|
||||
|
@ -2263,7 +2264,7 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
|
|||
version = HeapAlloc(GetProcessHeap(),0,versize);
|
||||
GetFileVersionInfoW(file->TargetPath, 0, versize, version);
|
||||
|
||||
VerQueryValueW(version, (LPWSTR) name, (LPVOID*)&lpVer, &sz);
|
||||
VerQueryValueW(version, name, (LPVOID*)&lpVer, &sz);
|
||||
|
||||
sprintfW(filever,name_fmt,
|
||||
HIWORD(lpVer->dwFileVersionMS),
|
||||
|
|
|
@ -702,7 +702,8 @@ UINT WINAPI MsiGetProductInfoA(LPCSTR szProduct, LPCSTR szAttribute, LPSTR szBuf
|
|||
goto end;
|
||||
MultiByteToWideChar( CP_ACP, 0, szAttribute, -1, szwAttribute, len );
|
||||
} else {
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
hr = ERROR_INVALID_PARAMETER;
|
||||
goto end;
|
||||
}
|
||||
|
||||
if( szBuffer )
|
||||
|
@ -1266,7 +1267,10 @@ INSTALLSTATE WINAPI MsiGetComponentPathA(LPCSTR szProduct, LPCSTR szComponent,
|
|||
len = MultiByteToWideChar( CP_ACP, 0, szComponent, -1, NULL, 0 );
|
||||
szwComponent= HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
|
||||
if( !szwComponent)
|
||||
{
|
||||
HeapFree( GetProcessHeap(), 0, szwProduct);
|
||||
return ERROR_OUTOFMEMORY;
|
||||
}
|
||||
MultiByteToWideChar( CP_ACP, 0, szComponent, -1, szwComponent, len );
|
||||
}
|
||||
|
||||
|
@ -1319,7 +1323,10 @@ INSTALLSTATE WINAPI MsiQueryFeatureStateA(LPCSTR szProduct, LPCSTR szFeature)
|
|||
len = MultiByteToWideChar( CP_ACP, 0, szFeature, -1, NULL, 0 );
|
||||
szwFeature= HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
|
||||
if( !szwFeature)
|
||||
{
|
||||
HeapFree( GetProcessHeap(), 0, szwProduct);
|
||||
return ERROR_OUTOFMEMORY;
|
||||
}
|
||||
MultiByteToWideChar( CP_ACP, 0, szFeature, -1, szwFeature, len );
|
||||
}
|
||||
|
||||
|
@ -1356,13 +1363,19 @@ UINT WINAPI MsiGetFileVersionA(LPCSTR szFilePath, LPSTR lpVersionBuf, DWORD* pcc
|
|||
if(lpVersionBuf && pcchVersionBuf && *pcchVersionBuf) {
|
||||
lpwVersionBuff = HeapAlloc(GetProcessHeap(), 0, *pcchVersionBuf * sizeof(WCHAR));
|
||||
if( !lpwVersionBuff)
|
||||
return ERROR_OUTOFMEMORY;
|
||||
{
|
||||
ret = ERROR_OUTOFMEMORY;
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if(lpLangBuf && pcchLangBuf && *pcchLangBuf) {
|
||||
lpwLangBuff = HeapAlloc(GetProcessHeap(), 0, *pcchVersionBuf * sizeof(WCHAR));
|
||||
if( !lpwLangBuff)
|
||||
return ERROR_OUTOFMEMORY;
|
||||
{
|
||||
ret = ERROR_OUTOFMEMORY;
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
ret = MsiGetFileVersionW(szwFilePath, lpwVersionBuff, pcchVersionBuf, lpwLangBuff, pcchLangBuf);
|
||||
|
@ -1372,6 +1385,7 @@ UINT WINAPI MsiGetFileVersionA(LPCSTR szFilePath, LPSTR lpVersionBuf, DWORD* pcc
|
|||
if(lpwLangBuff)
|
||||
WideCharToMultiByte(CP_ACP, 0, lpwLangBuff, -1, lpLangBuf, *pcchLangBuf, NULL, NULL);
|
||||
|
||||
end:
|
||||
if(szwFilePath) HeapFree(GetProcessHeap(), 0, szwFilePath);
|
||||
if(lpwVersionBuff) HeapFree(GetProcessHeap(), 0, lpwVersionBuff);
|
||||
if(lpwLangBuff) HeapFree(GetProcessHeap(), 0, lpwLangBuff);
|
||||
|
@ -1395,7 +1409,7 @@ UINT WINAPI MsiGetFileVersionW(LPCWSTR szFilePath, LPWSTR lpVersionBuf, DWORD* p
|
|||
lpVersionBuf, pcchVersionBuf?*pcchVersionBuf:0,
|
||||
lpLangBuf, pcchLangBuf?*pcchLangBuf:0);
|
||||
|
||||
dwVerLen = GetFileVersionInfoSizeW( (LPWSTR) szFilePath, NULL);
|
||||
dwVerLen = GetFileVersionInfoSizeW(szFilePath, NULL);
|
||||
if(!dwVerLen)
|
||||
return GetLastError();
|
||||
|
||||
|
@ -1405,12 +1419,12 @@ UINT WINAPI MsiGetFileVersionW(LPCWSTR szFilePath, LPWSTR lpVersionBuf, DWORD* p
|
|||
goto end;
|
||||
}
|
||||
|
||||
if(!GetFileVersionInfoW((LPWSTR) szFilePath, 0, dwVerLen, lpVer)) {
|
||||
if(!GetFileVersionInfoW(szFilePath, 0, dwVerLen, lpVer)) {
|
||||
ret = GetLastError();
|
||||
goto end;
|
||||
}
|
||||
if(lpVersionBuf && pcchVersionBuf && *pcchVersionBuf) {
|
||||
if(VerQueryValueW(lpVer, (LPWSTR) szVersionResource, (LPVOID*)&ffi, &puLen) && puLen > 0) {
|
||||
if(VerQueryValueW(lpVer, szVersionResource, (LPVOID*)&ffi, &puLen) && puLen > 0) {
|
||||
wsprintfW(tmp, szVersionFormat, HIWORD(ffi->dwFileVersionMS), LOWORD(ffi->dwFileVersionMS), HIWORD(ffi->dwFileVersionLS), LOWORD(ffi->dwFileVersionLS));
|
||||
lstrcpynW(lpVersionBuf, tmp, *pcchVersionBuf);
|
||||
*pcchVersionBuf = strlenW(lpVersionBuf);
|
||||
|
|
|
@ -121,6 +121,7 @@ UINT WINAPI MsiDatabaseOpenViewA(MSIHANDLE hdb,
|
|||
|
||||
r = MsiDatabaseOpenViewW( hdb, szwQuery, phView);
|
||||
|
||||
HeapFree( GetProcessHeap(), 0, szwQuery );
|
||||
return r;
|
||||
}
|
||||
|
||||
|
|
|
@ -534,7 +534,10 @@ UINT MSI_RecordReadStream(MSIRECORD *rec, unsigned int iField, char *buf, DWORD
|
|||
count = 0;
|
||||
r = IStream_Read( stm, buf, *sz, &count );
|
||||
if( FAILED( r ) )
|
||||
{
|
||||
*sz = 0;
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
}
|
||||
|
||||
*sz = count;
|
||||
|
||||
|
|
|
@ -221,7 +221,7 @@ static struct expr * EXPR_complex( struct expr *l, UINT op, struct expr *r );
|
|||
static struct expr * EXPR_column( LPWSTR );
|
||||
static struct expr * EXPR_ival( struct sql_str *);
|
||||
static struct expr * EXPR_sval( struct sql_str *);
|
||||
static struct expr * EXPR_wildcard();
|
||||
static struct expr * EXPR_wildcard(void);
|
||||
|
||||
|
||||
#line 73 "./sql.y"
|
||||
|
|
|
@ -64,7 +64,7 @@ static struct expr * EXPR_complex( struct expr *l, UINT op, struct expr *r );
|
|||
static struct expr * EXPR_column( LPWSTR );
|
||||
static struct expr * EXPR_ival( struct sql_str *);
|
||||
static struct expr * EXPR_sval( struct sql_str *);
|
||||
static struct expr * EXPR_wildcard();
|
||||
static struct expr * EXPR_wildcard(void);
|
||||
|
||||
%}
|
||||
|
||||
|
|
|
@ -118,7 +118,6 @@ UINT WINAPI MsiGetSummaryInformationW(MSIHANDLE hDatabase,
|
|||
ERR("storage = %p propertysetstorage = %p\n", db->storage, psstg);
|
||||
|
||||
grfMode = STGM_READ | STGM_SHARE_EXCLUSIVE;
|
||||
|
||||
r = IPropertySetStorage_Open( psstg, &FMTID_SummaryInformation, grfMode, &ps );
|
||||
if( FAILED( r ) )
|
||||
{
|
||||
|
|
|
@ -466,8 +466,8 @@ UINT read_table_from_storage( MSIDATABASE *db, LPCWSTR name, MSITABLE **ptable)
|
|||
t->data[i][ofs] = rawdata[ofs*t->row_count + i ];
|
||||
break;
|
||||
case 4:
|
||||
t->data[i][ofs] = rawdata[ofs*t->row_count + i ];
|
||||
t->data[i][ofs+1] = rawdata[ofs*t->row_count + i + 1];
|
||||
t->data[i][ofs] = rawdata[ofs*t->row_count + i*2 ];
|
||||
t->data[i][ofs+1] = rawdata[ofs*t->row_count + i*2 + 1];
|
||||
break;
|
||||
default:
|
||||
ERR("oops - unknown column width %d\n", n);
|
||||
|
@ -1203,7 +1203,10 @@ UINT TABLE_insert_row( struct tagMSIVIEW *view, UINT *num )
|
|||
else
|
||||
p = HeapAlloc( GetProcessHeap(), 0, sz );
|
||||
if( !p )
|
||||
{
|
||||
HeapFree( GetProcessHeap(), 0, row );
|
||||
return ERROR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
tv->table->data = p;
|
||||
tv->table->data[tv->table->row_count] = row;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue