Platform SDK: Windows Installer |
The MsiRecordGetString function returns the string value of a record field.
UINT MsiRecordGetString( MSIHANDLE hRecord, // record handle unsigned int iField, // field requested LPTSTR szValueBuf, // buffer to hold string DWORD *pcchValueBuf // pointer to size of buffer );
If ERROR_MORE_DATA is returned, the parameter which is a pointer gives the size of the buffer required to hold the string. If ERROR_SUCCESS is returned, it gives the number of characters written to the string buffer. Therefore you can get the size of the buffer by passing in an empty string (for example "") for the parameter that specifies the buffer. Do not attempt to determine the size of the buffer by passing in a Null (value=0).
Windows NT/2000: Requires Windows NT 4.0 SP3 or later. Available as a redistributable.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in Msiquery.h.
Library: Use Msi.lib.
Unicode: Implemented as Unicode and ANSI versions on all platforms.