Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft EdgeMore info about Internet Explorer and Microsoft Edge
Table of contentsExit editor mode

MsiRecordSetStreamA function (msiquery.h)

Feedback

In this article

TheMsiRecordSetStream function sets a record stream field from a file. Stream data cannot be inserted into temporary fields.

Syntax

UINT MsiRecordSetStreamA(  [in] MSIHANDLE hRecord,  [in] UINT      iField,  [in] LPCSTR    szFilePath);

Parameters

[in] hRecord

Handle to the record.

[in] iField

Specifies the field of the record to set.

[in] szFilePath

Specifies the path to the file containing the stream.

Return value

TheMsiRecordSetStream function returns the following values:

Remarks

The contents of the file specified in theMsiRecordSetStream function is read into a stream object. The stream persists if the record is inserted into the database and the database is committed.

To reset the stream to its beginning you must pass in a Null pointer forszFilePath. Do not pass a pointer to an empty string, "", to reset the stream.

See alsoOLE Limitations on Streams.

If the function fails, you can obtain extended error information by usingMsiGetLastErrorRecord.

Note

The msiquery.h header defines MsiRecordSetStream as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, seeConventions for Function Prototypes.

Requirements

RequirementValue
Minimum supported clientWindows 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
Target PlatformWindows
Headermsiquery.h
LibraryMsi.lib
DLLMsi.dll

See also

Record Processing Functions


Feedback

Was this page helpful?

YesNoNo

Need help with this topic?

Want to try using Ask Learn to clarify or guide you through this topic?

Suggest a fix?

  • Last updated on

In this article

Was this page helpful?

YesNo
NoNeed help with this topic?

Want to try using Ask Learn to clarify or guide you through this topic?

Suggest a fix?