The MsiDatabaseExport function exports a Microsoft Installer table from an open database to a Text Archive File.
Syntax
C++UINT MsiDatabaseExport(
__in MSIHANDLE hDatabase,
__in LPCTSTR szTableName,
__in LPCTSTR szFolderPath,
__in LPCTSTR szFileName
);
Parameters
- hDatabase [in]
-
The handle to a database from MsiOpenDatabase.
- szTableName [in]
-
The name of the table to export.
- szFolderPath [in]
-
The name of the folder that contains archive files.
- szFileName [in]
-
The name of the exported table archive file.
Return Value
The MsiDatabaseExport function returns one of the following values:
Return code | Description |
---|---|
|
An invalid path is passed to the function. |
|
The function fails. |
|
An invalid or inactive handle is supplied. |
|
An invalid parameter is passed to the function. |
|
The function succeeds. |
Remarks
If a table contains streams, MsiDatabaseExport exports each stream to a separate file.
For more information, see MsiDatabaseImport.
This function cannot be called from custom actions. A call to this function from a custom action causes the function to fail.
If the function fails, you can get extended error information by using MsiGetLastErrorRecord.
Requirements
Version | Windows Installer 5.0 on Windows Server 2008 R2 or Windows 7. Windows Installer 4.0 or Windows Installer 4.5 on Windows Server 2008 or Windows Vista. Windows Installer on Windows Server 2003, Windows XP, and Windows 2000 |
---|---|
Header | Msiquery.h |
Library | Msi.lib |
DLL | Msi.dll |
Unicode and ANSI names | MsiDatabaseExportW (Unicode) and MsiDatabaseExportA (ANSI) |
See Also
Send comments about this topic to Microsoft
Build date: 8/13/2009
© 2009 Microsoft Corporation. All rights reserved.