MsiViewGetColumnInfo Function

Windows Installer

MsiViewGetColumnInfo Function

The MsiViewGetColumnInfo function returns a record containing column names or definitions. This function returns a handle that should be closed using MsiCloseHandle.

Syntax

C++UINT MsiViewGetColumnInfo(
  __in   MSIHANDLE hView,
  __in   MSICOLINFO eColumnInfo,
  __out  MSIHANDLE *phRecord
);

Parameters

hView [in]

Handle to the view from which to obtain column information.

eColumnInfo [in]

Specifies a flag indicating what type of information is needed. This parameter must be one of the following values.

Value Meaning
MSICOLINFO_NAMES

Column names are returned.

MSICOLINFO_TYPES

Definitions are returned.

 

phRecord [out]

Pointer to a handle to receive the column information data record.

Return Value

ERROR_INVALID_HANDLE

An invalid or inactive handle was supplied.

ERROR_INVALID_HANDLE_STATE

The view is not in an active state.

ERROR_INVALID_PARAMETER

An invalid MSICOLINFO column information enumeration value was passed to the function.

ERROR_SUCCESS

The function succeeded, and a handle to a record was returned.

Note that in low memory situations, this function can raise a STATUS_NO_MEMORY exception.

Remarks

The column description returned by MsiViewGetColumnInfo is in the format described in the section: Column Definition Format. Each column is described by a string in the corresponding record field. The definition string consists of a single letter representing the data type followed by the width of the column (in characters when applicable, bytes otherwise). A width of zero designates an unbounded width (for example, long text fields and streams). An uppercase letter indicates that null values are allowed in the column.

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

Send comments about this topic to Microsoft

Build date: 8/13/2009

© 2009 Microsoft Corporation. All rights reserved.