From 6bd893a960eb30d7f3e74b2d23d0e5dd5d5e7f0e Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Sun, 4 Jan 2009 14:14:15 +0100 Subject: [PATCH] msi: Change MSIHANDLE to ULONG for Win64 compatibility. Also fix the compiler warnings produced by this change. --- dlls/msi/database.c | 14 +++++++------- dlls/msi/format.c | 4 ++-- dlls/msi/handle.c | 8 ++++---- dlls/msi/install.c | 16 ++++++++-------- dlls/msi/msi.c | 10 +++++----- dlls/msi/msiquery.c | 32 ++++++++++++++++---------------- dlls/msi/package.c | 4 ++-- dlls/msi/preview.c | 10 +++++----- dlls/msi/record.c | 26 +++++++++++++------------- dlls/msi/suminfo.c | 20 ++++++++++---------- dlls/msi/tests/db.c | 6 +++--- dlls/msi/tests/format.c | 4 ++-- dlls/msi/tests/package.c | 12 ++++++------ include/msi.h | 2 +- 14 files changed, 84 insertions(+), 84 deletions(-) diff --git a/dlls/msi/database.c b/dlls/msi/database.c index 46670062019..5345b1d8514 100644 --- a/dlls/msi/database.c +++ b/dlls/msi/database.c @@ -692,7 +692,7 @@ UINT WINAPI MsiDatabaseImportW(MSIHANDLE handle, LPCWSTR szFolder, LPCWSTR szFil MSIDATABASE *db; UINT r; - TRACE("%lx %s %s\n",handle,debugstr_w(szFolder), debugstr_w(szFilename)); + TRACE("%x %s %s\n",handle,debugstr_w(szFolder), debugstr_w(szFilename)); db = msihandle2msiinfo( handle, MSIHANDLETYPE_DATABASE ); if( !db ) @@ -720,7 +720,7 @@ UINT WINAPI MsiDatabaseImportA( MSIHANDLE handle, LPWSTR path = NULL, file = NULL; UINT r = ERROR_OUTOFMEMORY; - TRACE("%lx %s %s\n", handle, debugstr_a(szFolder), debugstr_a(szFilename)); + TRACE("%x %s %s\n", handle, debugstr_a(szFolder), debugstr_a(szFilename)); if( szFolder ) { @@ -912,7 +912,7 @@ UINT WINAPI MsiDatabaseExportW( MSIHANDLE handle, LPCWSTR szTable, MSIDATABASE *db; UINT r; - TRACE("%lx %s %s %s\n", handle, debugstr_w(szTable), + TRACE("%x %s %s %s\n", handle, debugstr_w(szTable), debugstr_w(szFolder), debugstr_w(szFilename)); db = msihandle2msiinfo( handle, MSIHANDLETYPE_DATABASE ); @@ -941,7 +941,7 @@ UINT WINAPI MsiDatabaseExportA( MSIHANDLE handle, LPCSTR szTable, LPWSTR path = NULL, file = NULL, table = NULL; UINT r = ERROR_OUTOFMEMORY; - TRACE("%lx %s %s %s\n", handle, debugstr_a(szTable), + TRACE("%x %s %s %s\n", handle, debugstr_a(szTable), debugstr_a(szFolder), debugstr_a(szFilename)); if( szTable ) @@ -981,7 +981,7 @@ UINT WINAPI MsiDatabaseMergeA(MSIHANDLE hDatabase, MSIHANDLE hDatabaseMerge, UINT r; LPWSTR table; - TRACE("(%ld, %ld, %s)\n", hDatabase, hDatabaseMerge, + TRACE("(%d, %d, %s)\n", hDatabase, hDatabaseMerge, debugstr_a(szTableName)); table = strdupAtoW(szTableName); @@ -1426,7 +1426,7 @@ UINT WINAPI MsiDatabaseMergeW(MSIHANDLE hDatabase, MSIHANDLE hDatabaseMerge, BOOL conflicts; UINT r; - TRACE("(%ld, %ld, %s)\n", hDatabase, hDatabaseMerge, + TRACE("(%d, %d, %s)\n", hDatabase, hDatabaseMerge, debugstr_w(szTableName)); if (szTableName && !*szTableName) @@ -1488,7 +1488,7 @@ MSIDBSTATE WINAPI MsiGetDatabaseState( MSIHANDLE handle ) MSIDBSTATE ret = MSIDBSTATE_READ; MSIDATABASE *db; - TRACE("%ld\n", handle); + TRACE("%d\n", handle); db = msihandle2msiinfo( handle, MSIHANDLETYPE_DATABASE ); if( !db ) diff --git a/dlls/msi/format.c b/dlls/msi/format.c index 454142ad7ce..de531bf1e13 100644 --- a/dlls/msi/format.c +++ b/dlls/msi/format.c @@ -913,7 +913,7 @@ UINT WINAPI MsiFormatRecordW( MSIHANDLE hInstall, MSIHANDLE hRecord, MSIPACKAGE *package; MSIRECORD *record; - TRACE("%ld %ld %p %p\n", hInstall, hRecord, szResult, sz); + TRACE("%d %d %p %p\n", hInstall, hRecord, szResult, sz); package = msihandle2msiinfo( hInstall, MSIHANDLETYPE_PACKAGE ); if (!package) @@ -978,7 +978,7 @@ UINT WINAPI MsiFormatRecordA( MSIHANDLE hInstall, MSIHANDLE hRecord, DWORD len, save; LPWSTR value; - TRACE("%ld %ld %p %p\n", hInstall, hRecord, szResult, sz); + TRACE("%d %d %p %p\n", hInstall, hRecord, szResult, sz); if (!hRecord) return ERROR_INVALID_HANDLE; diff --git a/dlls/msi/handle.c b/dlls/msi/handle.c index ae42d84729b..91629ef16d5 100644 --- a/dlls/msi/handle.c +++ b/dlls/msi/handle.c @@ -123,7 +123,7 @@ MSIHANDLE alloc_msihandle( MSIOBJECTHDR *obj ) LeaveCriticalSection( &MSI_handle_cs ); - TRACE("%p -> %ld\n", obj, ret ); + TRACE("%p -> %d\n", obj, ret ); return ret; } @@ -147,7 +147,7 @@ MSIHANDLE alloc_msi_remote_handle( IUnknown *unk ) LeaveCriticalSection( &MSI_handle_cs ); - TRACE("%p -> %ld\n", unk, ret); + TRACE("%p -> %d\n", unk, ret); return ret; } @@ -270,7 +270,7 @@ UINT WINAPI MsiCloseHandle(MSIHANDLE handle) MSIOBJECTHDR *info = NULL; UINT ret = ERROR_INVALID_HANDLE; - TRACE("%lx\n",handle); + TRACE("%x\n",handle); if (!handle) return ERROR_SUCCESS; @@ -304,7 +304,7 @@ UINT WINAPI MsiCloseHandle(MSIHANDLE handle) ret = ERROR_SUCCESS; - TRACE("handle %lx destroyed\n", handle+1); + TRACE("handle %x destroyed\n", handle+1); out: LeaveCriticalSection( &MSI_handle_cs ); if( info ) diff --git a/dlls/msi/install.c b/dlls/msi/install.c index bcb68c38865..606caba1345 100644 --- a/dlls/msi/install.c +++ b/dlls/msi/install.c @@ -707,7 +707,7 @@ BOOL WINAPI MsiGetMode(MSIHANDLE hInstall, MSIRUNMODE iRunMode) break; default: - FIXME("%ld %d\n", hInstall, iRunMode); + FIXME("%d %d\n", hInstall, iRunMode); r = TRUE; } @@ -727,7 +727,7 @@ BOOL WINAPI MsiSetMode(MSIHANDLE hInstall, MSIRUNMODE iRunMode, BOOL fState) case MSIRUNMODE_RESERVED15: return FALSE; default: - FIXME("%ld %d %d\n", hInstall, iRunMode, fState); + FIXME("%d %d %d\n", hInstall, iRunMode, fState); } return TRUE; } @@ -886,7 +886,7 @@ UINT WINAPI MsiGetFeatureStateW(MSIHANDLE hInstall, LPCWSTR szFeature, MSIPACKAGE* package; UINT ret; - TRACE("%ld %s %p %p\n", hInstall, debugstr_w(szFeature), piInstalled, piAction); + TRACE("%d %s %p %p\n", hInstall, debugstr_w(szFeature), piInstalled, piAction); package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE); if (!package) @@ -934,7 +934,7 @@ UINT WINAPI MsiGetFeatureStateW(MSIHANDLE hInstall, LPCWSTR szFeature, UINT WINAPI MsiGetFeatureCostA(MSIHANDLE hInstall, LPCSTR szFeature, MSICOSTTREE iCostTree, INSTALLSTATE iState, LPINT piCost) { - FIXME("(%ld %s %i %i %p): stub\n", hInstall, debugstr_a(szFeature), + FIXME("(%d %s %i %i %p): stub\n", hInstall, debugstr_a(szFeature), iCostTree, iState, piCost); if (piCost) *piCost = 0; return ERROR_SUCCESS; @@ -946,7 +946,7 @@ UINT WINAPI MsiGetFeatureCostA(MSIHANDLE hInstall, LPCSTR szFeature, UINT WINAPI MsiGetFeatureCostW(MSIHANDLE hInstall, LPCWSTR szFeature, MSICOSTTREE iCostTree, INSTALLSTATE iState, LPINT piCost) { - FIXME("(%ld %s %i %i %p): stub\n", hInstall, debugstr_w(szFeature), + FIXME("(%d %s %i %i %p): stub\n", hInstall, debugstr_w(szFeature), iCostTree, iState, piCost); if (piCost) *piCost = 0; return ERROR_SUCCESS; @@ -1082,7 +1082,7 @@ UINT WINAPI MsiGetComponentStateW(MSIHANDLE hInstall, LPCWSTR szComponent, MSIPACKAGE* package; UINT ret; - TRACE("%ld %s %p %p\n", hInstall, debugstr_w(szComponent), + TRACE("%d %s %p %p\n", hInstall, debugstr_w(szComponent), piInstalled, piAction); package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE); @@ -1191,7 +1191,7 @@ UINT WINAPI MsiSetInstallLevel(MSIHANDLE hInstall, int iInstallLevel) MSIPACKAGE* package; UINT r; - TRACE("%ld %i\n", hInstall, iInstallLevel); + TRACE("%d %i\n", hInstall, iInstallLevel); package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE); if (!package) @@ -1232,7 +1232,7 @@ UINT WINAPI MsiGetFeatureValidStatesW(MSIHANDLE hInstall, LPCWSTR szFeature, LPDWORD pInstallState) { if(pInstallState) *pInstallState = 1<str.w, pchValueBuf ); if (!name) diff --git a/dlls/msi/preview.c b/dlls/msi/preview.c index 565fb3605b3..801684d0e6c 100644 --- a/dlls/msi/preview.c +++ b/dlls/msi/preview.c @@ -68,7 +68,7 @@ UINT WINAPI MsiEnableUIPreview( MSIHANDLE hdb, MSIHANDLE* phPreview ) MSIPREVIEW *preview; UINT r = ERROR_FUNCTION_FAILED; - TRACE("%ld %p\n", hdb, phPreview); + TRACE("%d %p\n", hdb, phPreview); db = msihandle2msiinfo( hdb, MSIHANDLETYPE_DATABASE ); if( !db ) @@ -137,7 +137,7 @@ UINT WINAPI MsiPreviewDialogW( MSIHANDLE hPreview, LPCWSTR szDialogName ) MSIPREVIEW *preview; UINT r; - TRACE("%ld %s\n", hPreview, debugstr_w(szDialogName)); + TRACE("%d %s\n", hPreview, debugstr_w(szDialogName)); preview = msihandle2msiinfo( hPreview, MSIHANDLETYPE_PREVIEW ); if( !preview ) @@ -155,7 +155,7 @@ UINT WINAPI MsiPreviewDialogA( MSIHANDLE hPreview, LPCSTR szDialogName ) UINT r; LPWSTR strW = NULL; - TRACE("%ld %s\n", hPreview, debugstr_a(szDialogName)); + TRACE("%d %s\n", hPreview, debugstr_a(szDialogName)); if( szDialogName ) { @@ -171,7 +171,7 @@ UINT WINAPI MsiPreviewDialogA( MSIHANDLE hPreview, LPCSTR szDialogName ) UINT WINAPI MsiPreviewBillboardW( MSIHANDLE hPreview, LPCWSTR szControlName, LPCWSTR szBillboard) { - FIXME("%ld %s %s\n", hPreview, debugstr_w(szControlName), + FIXME("%d %s %s\n", hPreview, debugstr_w(szControlName), debugstr_w(szBillboard)); return ERROR_CALL_NOT_IMPLEMENTED; } @@ -179,7 +179,7 @@ UINT WINAPI MsiPreviewBillboardW( MSIHANDLE hPreview, LPCWSTR szControlName, UINT WINAPI MsiPreviewBillboardA( MSIHANDLE hPreview, LPCSTR szControlName, LPCSTR szBillboard) { - FIXME("%ld %s %s\n", hPreview, debugstr_a(szControlName), + FIXME("%d %s %s\n", hPreview, debugstr_a(szControlName), debugstr_a(szBillboard)); return ERROR_CALL_NOT_IMPLEMENTED; } diff --git a/dlls/msi/record.c b/dlls/msi/record.c index b02fcd10b9a..665bae76cc8 100644 --- a/dlls/msi/record.c +++ b/dlls/msi/record.c @@ -116,7 +116,7 @@ UINT WINAPI MsiRecordGetFieldCount( MSIHANDLE handle ) MSIRECORD *rec; UINT ret; - TRACE("%ld\n", handle ); + TRACE("%d\n", handle ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -229,7 +229,7 @@ int WINAPI MsiRecordGetInteger( MSIHANDLE handle, UINT iField) MSIRECORD *rec; UINT ret; - TRACE("%ld %d\n", handle, iField ); + TRACE("%d %d\n", handle, iField ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -248,7 +248,7 @@ UINT WINAPI MsiRecordClearData( MSIHANDLE handle ) MSIRECORD *rec; UINT i; - TRACE("%ld\n", handle ); + TRACE("%d\n", handle ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -286,7 +286,7 @@ UINT WINAPI MsiRecordSetInteger( MSIHANDLE handle, UINT iField, int iVal ) MSIRECORD *rec; UINT ret; - TRACE("%ld %u %d\n", handle, iField, iVal); + TRACE("%d %u %d\n", handle, iField, iVal); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -316,7 +316,7 @@ BOOL WINAPI MsiRecordIsNull( MSIHANDLE handle, UINT iField ) MSIRECORD *rec; UINT ret; - TRACE("%ld %d\n", handle, iField ); + TRACE("%d %d\n", handle, iField ); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -388,7 +388,7 @@ UINT WINAPI MsiRecordGetStringA(MSIHANDLE handle, UINT iField, MSIRECORD *rec; UINT ret; - TRACE("%ld %d %p %p\n", handle, iField, szValue, pcchValue); + TRACE("%d %d %p %p\n", handle, iField, szValue, pcchValue); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -464,7 +464,7 @@ UINT WINAPI MsiRecordGetStringW(MSIHANDLE handle, UINT iField, MSIRECORD *rec; UINT ret; - TRACE("%ld %d %p %p\n", handle, iField, szValue, pcchValue); + TRACE("%d %d %p %p\n", handle, iField, szValue, pcchValue); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -514,7 +514,7 @@ UINT WINAPI MsiRecordDataSize(MSIHANDLE handle, UINT iField) MSIRECORD *rec; UINT ret; - TRACE("%ld %d\n", handle, iField); + TRACE("%d %d\n", handle, iField); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -556,7 +556,7 @@ UINT WINAPI MsiRecordSetStringA( MSIHANDLE handle, UINT iField, LPCSTR szValue ) MSIRECORD *rec; UINT ret; - TRACE("%ld %d %s\n", handle, iField, debugstr_a(szValue)); + TRACE("%d %d %s\n", handle, iField, debugstr_a(szValue)); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -599,7 +599,7 @@ UINT WINAPI MsiRecordSetStringW( MSIHANDLE handle, UINT iField, LPCWSTR szValue MSIRECORD *rec; UINT ret; - TRACE("%ld %d %s\n", handle, iField, debugstr_w(szValue)); + TRACE("%d %d %s\n", handle, iField, debugstr_w(szValue)); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -719,7 +719,7 @@ UINT WINAPI MsiRecordSetStreamA(MSIHANDLE hRecord, UINT iField, LPCSTR szFilenam LPWSTR wstr = NULL; UINT ret; - TRACE("%ld %d %s\n", hRecord, iField, debugstr_a(szFilename)); + TRACE("%d %d %s\n", hRecord, iField, debugstr_a(szFilename)); if( szFilename ) { @@ -738,7 +738,7 @@ UINT WINAPI MsiRecordSetStreamW(MSIHANDLE handle, UINT iField, LPCWSTR szFilenam MSIRECORD *rec; UINT ret; - TRACE("%ld %d %s\n", handle, iField, debugstr_w(szFilename)); + TRACE("%d %d %s\n", handle, iField, debugstr_w(szFilename)); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) @@ -808,7 +808,7 @@ UINT WINAPI MsiRecordReadStream(MSIHANDLE handle, UINT iField, char *buf, LPDWOR MSIRECORD *rec; UINT ret; - TRACE("%ld %d %p %p\n", handle, iField, buf, sz); + TRACE("%d %d %p %p\n", handle, iField, buf, sz); rec = msihandle2msiinfo( handle, MSIHANDLETYPE_RECORD ); if( !rec ) diff --git a/dlls/msi/suminfo.c b/dlls/msi/suminfo.c index 148ba8ae807..ca6b6d1cd7c 100644 --- a/dlls/msi/suminfo.c +++ b/dlls/msi/suminfo.c @@ -466,7 +466,7 @@ UINT WINAPI MsiGetSummaryInformationW( MSIHANDLE hDatabase, MSIDATABASE *db; UINT ret = ERROR_FUNCTION_FAILED; - TRACE("%ld %s %d %p\n", hDatabase, debugstr_w(szDatabase), + TRACE("%d %s %d %p\n", hDatabase, debugstr_w(szDatabase), uiUpdateCount, pHandle); if( !pHandle ) @@ -529,7 +529,7 @@ UINT WINAPI MsiGetSummaryInformationA(MSIHANDLE hDatabase, LPWSTR szwDatabase = NULL; UINT ret; - TRACE("%ld %s %d %p\n", hDatabase, debugstr_a(szDatabase), + TRACE("%d %s %d %p\n", hDatabase, debugstr_a(szDatabase), uiUpdateCount, pHandle); if( szDatabase ) @@ -550,7 +550,7 @@ UINT WINAPI MsiSummaryInfoGetPropertyCount(MSIHANDLE hSummaryInfo, PUINT pCount) { MSISUMMARYINFO *si; - TRACE("%ld %p\n", hSummaryInfo, pCount); + TRACE("%d %p\n", hSummaryInfo, pCount); si = msihandle2msiinfo( hSummaryInfo, MSIHANDLETYPE_SUMMARYINFO ); if( !si ) @@ -570,7 +570,7 @@ static UINT get_prop( MSIHANDLE handle, UINT uiProperty, UINT *puiDataType, PROPVARIANT *prop; UINT ret = ERROR_SUCCESS; - TRACE("%ld %d %p %p %p %p %p\n", handle, uiProperty, puiDataType, + TRACE("%d %d %p %p %p %p %p\n", handle, uiProperty, puiDataType, piValue, pftValue, str, pcchValueBuf); if ( uiProperty >= MSI_MAX_PROPS ) @@ -668,7 +668,7 @@ UINT WINAPI MsiSummaryInfoGetPropertyA( { awstring str; - TRACE("%ld %d %p %p %p %p %p\n", handle, uiProperty, puiDataType, + TRACE("%d %d %p %p %p %p %p\n", handle, uiProperty, puiDataType, piValue, pftValue, szValueBuf, pcchValueBuf ); str.unicode = FALSE; @@ -684,7 +684,7 @@ UINT WINAPI MsiSummaryInfoGetPropertyW( { awstring str; - TRACE("%ld %d %p %p %p %p %p\n", handle, uiProperty, puiDataType, + TRACE("%d %d %p %p %p %p %p\n", handle, uiProperty, puiDataType, piValue, pftValue, szValueBuf, pcchValueBuf ); str.unicode = TRUE; @@ -701,7 +701,7 @@ static UINT set_prop( MSIHANDLE handle, UINT uiProperty, UINT uiDataType, PROPVARIANT *prop; UINT type, len, ret = ERROR_SUCCESS; - TRACE("%ld %u %u %i %p %p\n", handle, uiProperty, uiDataType, + TRACE("%d %u %u %i %p %p\n", handle, uiProperty, uiDataType, iValue, pftValue, str ); type = get_type( uiProperty ); @@ -773,7 +773,7 @@ UINT WINAPI MsiSummaryInfoSetPropertyW( MSIHANDLE handle, UINT uiProperty, { awcstring str; - TRACE("%ld %u %u %i %p %s\n", handle, uiProperty, uiDataType, + TRACE("%d %u %u %i %p %s\n", handle, uiProperty, uiDataType, iValue, pftValue, debugstr_w(szValue) ); str.unicode = TRUE; @@ -786,7 +786,7 @@ UINT WINAPI MsiSummaryInfoSetPropertyA( MSIHANDLE handle, UINT uiProperty, { awcstring str; - TRACE("%ld %u %u %i %p %s\n", handle, uiProperty, uiDataType, + TRACE("%d %u %u %i %p %s\n", handle, uiProperty, uiDataType, iValue, pftValue, debugstr_a(szValue) ); str.unicode = FALSE; @@ -802,7 +802,7 @@ UINT WINAPI MsiSummaryInfoPersist( MSIHANDLE handle ) HRESULT r; UINT ret = ERROR_FUNCTION_FAILED; - TRACE("%ld\n", handle ); + TRACE("%d\n", handle ); si = msihandle2msiinfo( handle, MSIHANDLETYPE_SUMMARYINFO ); if( !si ) diff --git a/dlls/msi/tests/db.c b/dlls/msi/tests/db.c index 475b10b970a..4037ac6e697 100644 --- a/dlls/msi/tests/db.c +++ b/dlls/msi/tests/db.c @@ -2347,7 +2347,7 @@ static MSIHANDLE package_from_db(MSIHANDLE hdb) CHAR szPackage[10]; MSIHANDLE hPackage; - sprintf(szPackage,"#%li",hdb); + sprintf(szPackage,"#%i",hdb); res = MsiOpenPackage(szPackage,&hPackage); if (res != ERROR_SUCCESS) return 0; @@ -6175,7 +6175,7 @@ static void test_dbtopackage(void) r = add_custom_action_entry(hdb, "'SetProp', 51, 'MYPROP', 'grape'"); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - sprintf(package, "#%li", hdb); + sprintf(package, "#%i", hdb); r = MsiOpenPackage(package, &hpkg); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); @@ -6234,7 +6234,7 @@ static void test_dbtopackage(void) r = add_custom_action_entry(hdb, "'SetProp', 51, 'MYPROP', 'grape'"); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - sprintf(package, "#%li", hdb); + sprintf(package, "#%i", hdb); r = MsiOpenPackage(package, &hpkg); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); diff --git a/dlls/msi/tests/format.c b/dlls/msi/tests/format.c index c4be4294650..316eed6b711 100644 --- a/dlls/msi/tests/format.c +++ b/dlls/msi/tests/format.c @@ -228,7 +228,7 @@ static MSIHANDLE package_from_db(MSIHANDLE hdb) CHAR szPackage[10]; MSIHANDLE hPackage; - sprintf(szPackage,"#%li",hdb); + sprintf(szPackage,"#%i",hdb); res = MsiOpenPackage(szPackage,&hPackage); ok( res == ERROR_SUCCESS , "Failed to open package\n" ); @@ -303,7 +303,7 @@ static MSIHANDLE helper_createpackage( const char *szName ) res = MsiCloseHandle( suminfo); ok( res == ERROR_SUCCESS , "Failed to close suminfo\n" ); - sprintf(szPackage,"#%li",hdb); + sprintf(szPackage,"#%i",hdb); res = MsiOpenPackage(szPackage,&hPackage); ok( res == ERROR_SUCCESS , "Failed to open package\n" ); diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index 5ad1d385bd8..871d673ab3a 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -665,7 +665,7 @@ static MSIHANDLE package_from_db(MSIHANDLE hdb) CHAR szPackage[10]; MSIHANDLE hPackage; - sprintf(szPackage,"#%li",hdb); + sprintf(szPackage,"#%i",hdb); res = MsiOpenPackage(szPackage,&hPackage); if (res != ERROR_SUCCESS) return 0; @@ -2116,7 +2116,7 @@ static void test_msipackage(void) ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); /* database exists, but is emtpy */ - sprintf(name, "#%ld", hdb); + sprintf(name, "#%d", hdb); r = MsiOpenPackage(name, &hpack); ok(r == ERROR_INSTALL_PACKAGE_INVALID, "Expected ERROR_INSTALL_PACKAGE_INVALID, got %d\n", r); @@ -2134,7 +2134,7 @@ static void test_msipackage(void) ok(r == ERROR_SUCCESS, "failed to create InstallExecuteSequence table\n"); /* a few key tables exist */ - sprintf(name, "#%ld", hdb); + sprintf(name, "#%d", hdb); r = MsiOpenPackage(name, &hpack); ok(r == ERROR_INSTALL_PACKAGE_INVALID, "Expected ERROR_INSTALL_PACKAGE_INVALID, got %d\n", r); @@ -2146,7 +2146,7 @@ static void test_msipackage(void) r = MsiOpenDatabase(msifile, MSIDBOPEN_CREATE, &hdb); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - sprintf(name, "#%ld", hdb); + sprintf(name, "#%d", hdb); /* The following summary information props must exist: * - PID_REVNUMBER @@ -8888,7 +8888,7 @@ static void test_sourcedir(void) r = add_directory_entry(hdb, "'TARGETDIR', '', 'SourceDir'"); ok(r == S_OK, "failed\n"); - sprintf(package, "#%li", hdb); + sprintf(package, "#%i", hdb); r = MsiOpenPackage(package, &hpkg); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); @@ -8997,7 +8997,7 @@ static void test_sourcedir(void) MsiCloseHandle(hpkg); /* reset the package state */ - sprintf(package, "#%li", hdb); + sprintf(package, "#%i", hdb); r = MsiOpenPackage(package, &hpkg); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); diff --git a/include/msi.h b/include/msi.h index 5564fcd1502..a6a5f3d552c 100644 --- a/include/msi.h +++ b/include/msi.h @@ -27,7 +27,7 @@ extern "C" { #include #endif -typedef unsigned long MSIHANDLE; +typedef ULONG MSIHANDLE; typedef enum tagINSTALLSTATE {