EN
Este contenido no se encuentra disponible en su idioma, pero aquí tiene la versión en inglés.

MsiViewFetch function

The MsiViewFetch function fetches the next sequential record from the view. This function returns a handle that should be closed using MsiCloseHandle.

Syntax


UINT MsiViewFetch(
  _In_   MSIHANDLE hView,
  _Out_  MSIHANDLE *phRecord
);

Parameters

hView [in]

Handle to the view to fetch from.

phRecord [out]

Pointer to the handle for the fetched record.

Return value

ERROR_FUNCTION_FAILED

An error occurred during fetching.

ERROR_INVALID_HANDLE

An invalid or inactive handle was supplied.

ERROR_INVALID_HANDLE_STATE

The handle was in an invalid state.

ERROR_NO_MORE_ITEMS

No records remain, and a null handle is returned.

ERROR_SUCCESS

The function succeeded, and a handle to the record is returned.

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

Remarks

If the MsiViewFetch function returns ERROR_FUNCTION_FAILED, it is possible that the MsiViewExecute function was not called first. If more rows are available in the result set, MsiViewFetch returns phRecord as a handle to a record containing the requested column data, or phRecord is 0. For maximum performance, the same record should be used for all retrievals, or the record should be released by going out of scope.

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

Version

Windows Installer 5.0 on Windows Server 2012, Windows 8, 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 or Windows XP

Header

Msiquery.h

Library

Msi.lib

DLL

Msi.dll

See also

General Database Access Functions
Working with Queries

 

 

Adiciones de comunidad

AGREGAR
Mostrar:
© 2014 Microsoft