MsiEnableUIPreview Function

Windows Installer

MsiEnableUIPreview Function

The MsiEnableUIPreview function enables preview mode of the user interface to facilitate authoring of user-interface dialog boxes. This function returns a handle that should be closed using MsiCloseHandle.

Syntax

C++UINT MsiEnableUIPreview(
  __in   MSIHANDLE hDatabase,
  __out  MSIHANDLE *phPreview
);

Parameters

hDatabase [in]

Handle to the database.

phPreview [out]

Pointer to a returned handle for user-interface preview capability.

Return Value

ERROR_INVALID_HANDLE

An invalid or inactive handle was supplied.

ERROR_INVALID_PARAMETER

Bad parameter.

ERROR_OUTOFMEMORY

Out of memory.

ERROR_SUCCESS

The function succeeded.

Remarks

Note that it is recommended to use variables of type PMSIHANDLE because the installer closes PMSIHANDLE objects as they go out of scope, whereas you must close MSIHANDLE objects by calling MsiCloseHandle. For more information see Use PMSIHANDLE instead of HANDLE section in the Windows Installer Best Practices.

Requirements

VersionWindows 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
HeaderMsiquery.h
LibraryMsi.lib
DLLMsi.dll

See Also

User Interface Functions

Send comments about this topic to Microsoft

Build date: 8/13/2009

© 2009 Microsoft Corporation. All rights reserved.