summaryrefslogtreecommitdiffstats
path: root/libmsi/msi.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmsi/msi.c')
-rw-r--r--libmsi/msi.c217
1 files changed, 0 insertions, 217 deletions
diff --git a/libmsi/msi.c b/libmsi/msi.c
index 4ebf576..0a388b5 100644
--- a/libmsi/msi.c
+++ b/libmsi/msi.c
@@ -85,204 +85,6 @@ UINT msi_strcpy_to_awstring( LPCWSTR str, awstring *awbuf, DWORD *sz )
return r;
}
-UINT WINAPI MsiEnableLogA(DWORD dwLogMode, LPCSTR szLogFile, DWORD attributes)
-{
- LPWSTR szwLogFile = NULL;
- UINT r;
-
- TRACE("%08x %s %08x\n", dwLogMode, debugstr_a(szLogFile), attributes);
-
- if( szLogFile )
- {
- szwLogFile = strdupAtoW( szLogFile );
- if( !szwLogFile )
- return ERROR_OUTOFMEMORY;
- }
- r = MsiEnableLogW( dwLogMode, szwLogFile, attributes );
- msi_free( szwLogFile );
- return r;
-}
-
-UINT WINAPI MsiEnableLogW(DWORD dwLogMode, LPCWSTR szLogFile, DWORD attributes)
-{
- TRACE("%08x %s %08x\n", dwLogMode, debugstr_w(szLogFile), attributes);
-
- msi_free(gszLogFile);
- gszLogFile = NULL;
- if (szLogFile)
- {
- HANDLE file;
-
- if (!(attributes & INSTALLLOGATTRIBUTES_APPEND))
- DeleteFileW(szLogFile);
- file = CreateFileW(szLogFile, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_ALWAYS,
- FILE_ATTRIBUTE_NORMAL, NULL);
- if (file != INVALID_HANDLE_VALUE)
- {
- gszLogFile = strdupW(szLogFile);
- CloseHandle(file);
- }
- else
- ERR("Unable to enable log %s (%u)\n", debugstr_w(szLogFile), GetLastError());
- }
-
- return ERROR_SUCCESS;
-}
-
-UINT WINAPI MsiEnumComponentCostsA( MSIHANDLE handle, LPCSTR component, DWORD index,
- INSTALLSTATE state, LPSTR drive, DWORD *buflen,
- int *cost, int *temp )
-{
- UINT r;
- DWORD len;
- WCHAR *driveW, *componentW = NULL;
-
- TRACE("%d, %s, %u, %d, %p, %p, %p %p\n", handle, debugstr_a(component), index,
- state, drive, buflen, cost, temp);
-
- if (!drive || !buflen) return ERROR_INVALID_PARAMETER;
- if (component && !(componentW = strdupAtoW( component ))) return ERROR_OUTOFMEMORY;
-
- len = *buflen;
- if (!(driveW = msi_alloc( len * sizeof(WCHAR) )))
- {
- msi_free( componentW );
- return ERROR_OUTOFMEMORY;
- }
- r = MsiEnumComponentCostsW( handle, componentW, index, state, driveW, buflen, cost, temp );
- if (!r)
- {
- WideCharToMultiByte( CP_ACP, 0, driveW, -1, drive, len, NULL, NULL );
- }
- msi_free( componentW );
- msi_free( driveW );
- return r;
-}
-
-static UINT set_drive( WCHAR *buffer, WCHAR letter )
-{
- buffer[0] = letter;
- buffer[1] = ':';
- buffer[2] = 0;
- return 2;
-}
-
-UINT WINAPI MsiEnumComponentCostsW( MSIHANDLE handle, LPCWSTR component, DWORD index,
- INSTALLSTATE state, LPWSTR drive, DWORD *buflen,
- int *cost, int *temp )
-{
- UINT r = ERROR_NO_MORE_ITEMS;
- MSICOMPONENT *comp = NULL;
- MSIPACKAGE *package;
- MSIFILE *file;
- STATSTG stat = {0};
- WCHAR path[MAX_PATH];
-
- TRACE("%d, %s, %u, %d, %p, %p, %p %p\n", handle, debugstr_w(component), index,
- state, drive, buflen, cost, temp);
-
- if (!drive || !buflen || !cost || !temp) return ERROR_INVALID_PARAMETER;
- package = msihandle2msiinfo( handle, MSIHANDLETYPE_PACKAGE );
- if ( !package )
- return ERROR_INVALID_HANDLE;
-
- if (!msi_get_property_int( package->db, szCostingComplete, 0 ))
- {
- msiobj_release( &package->hdr );
- return ERROR_FUNCTION_NOT_CALLED;
- }
- if (component && component[0] && !(comp = msi_get_loaded_component( package, component )))
- {
- msiobj_release( &package->hdr );
- return ERROR_UNKNOWN_COMPONENT;
- }
- if (*buflen < 3)
- {
- *buflen = 2;
- msiobj_release( &package->hdr );
- return ERROR_MORE_DATA;
- }
- if (index)
- {
- msiobj_release( &package->hdr );
- return ERROR_NO_MORE_ITEMS;
- }
-
- drive[0] = 0;
- *cost = *temp = 0;
- GetWindowsDirectoryW( path, MAX_PATH );
- if (component && component[0])
- {
- if (comp->assembly && !comp->assembly->application) *temp = comp->Cost;
- if (!comp->Enabled || !comp->KeyPath)
- {
- *cost = 0;
- *buflen = set_drive( drive, path[0] );
- r = ERROR_SUCCESS;
- }
- else if ((file = msi_get_loaded_file( package, comp->KeyPath )))
- {
- *cost = max( 8, comp->Cost / 512 );
- *buflen = set_drive( drive, file->TargetPath[0] );
- r = ERROR_SUCCESS;
- }
- }
- else if (IStorage_Stat( package->db->storage, &stat, STATFLAG_NONAME ) == S_OK)
- {
- *temp = max( 8, stat.cbSize.QuadPart / 512 );
- *buflen = set_drive( drive, path[0] );
- r = ERROR_SUCCESS;
- }
- msiobj_release( &package->hdr );
- return r;
-}
-
-INSTALLUILEVEL WINAPI MsiSetInternalUI(INSTALLUILEVEL dwUILevel, HWND *phWnd)
-{
- INSTALLUILEVEL old = gUILevel;
- HWND oldwnd = gUIhwnd;
-
- TRACE("%08x %p\n", dwUILevel, phWnd);
-
- gUILevel = dwUILevel;
- if (phWnd)
- {
- gUIhwnd = *phWnd;
- *phWnd = oldwnd;
- }
- return old;
-}
-
-INSTALLUI_HANDLERA WINAPI MsiSetExternalUIA(INSTALLUI_HANDLERA puiHandler,
- DWORD dwMessageFilter, LPVOID pvContext)
-{
- INSTALLUI_HANDLERA prev = gUIHandlerA;
-
- TRACE("%p %08x %p\n", puiHandler, dwMessageFilter, pvContext);
-
- gUIHandlerA = puiHandler;
- gUIHandlerW = NULL;
- gUIFilter = dwMessageFilter;
- gUIContext = pvContext;
-
- return prev;
-}
-
-INSTALLUI_HANDLERW WINAPI MsiSetExternalUIW(INSTALLUI_HANDLERW puiHandler,
- DWORD dwMessageFilter, LPVOID pvContext)
-{
- INSTALLUI_HANDLERW prev = gUIHandlerW;
-
- TRACE("%p %08x %p\n", puiHandler, dwMessageFilter, pvContext);
-
- gUIHandlerA = NULL;
- gUIHandlerW = puiHandler;
- gUIFilter = dwMessageFilter;
- gUIContext = pvContext;
-
- return prev;
-}
-
/******************************************************************
* MsiGetProductPropertyA [MSI.@]
*/
@@ -586,25 +388,6 @@ UINT WINAPI MsiGetFileHashA( LPCSTR szFilePath, DWORD dwOptions,
}
/***********************************************************************
- * MsiSetExternalUIRecord [MSI.@]
- */
-UINT WINAPI MsiSetExternalUIRecord( INSTALLUI_HANDLER_RECORD handler,
- DWORD filter, LPVOID context,
- PINSTALLUI_HANDLER_RECORD prev )
-{
- TRACE("%p %08x %p %p\n", handler, filter, context, prev);
-
- if (prev)
- *prev = gUIHandlerRecord;
-
- gUIHandlerRecord = handler;
- gUIFilter = filter;
- gUIContext = context;
-
- return ERROR_SUCCESS;
-}
-
-/***********************************************************************
* MsiInstallMissingComponentA [MSI.@]
*/
UINT WINAPI MsiInstallMissingComponentA( LPCSTR product, LPCSTR component, INSTALLSTATE state )