MsiViewFetch

[This is preliminary documentation and subject to change.]

The MsiViewFetch function fetches the next sequential record from the view.

UINT MsiViewFetch(
  MSIHANDLE hView,      // view handle
  MSIHANDLE *phRecord   // handle for fetched record
);
 

Parameters

hView
Handle to the view to fetch from.
phRecord
Pointer to the handle for the fetched record.

Return Values

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.

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.

QuickInfo

  Windows NT: Requires version 4.0 or later. Available as a redistributable for Windows NT 4.0.
  Windows: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Header: Declared in msiquery.h.
  Import Library: Use msi.lib.

See Also

Database Access Reference, General Database Access Functions