The MsiCreateRecord function creates a new record object with the specified number of fields. This function returns a handle that should be closed using MsiCloseHandle.
Syntax
C++MSIHANDLE MsiCreateRecord(
__in unsigned int cParams
);
Parameters
- cParams [in]
-
Specifies the number of fields the record will have. The maximum number of fields in a record is limited to 65535.
Return Value
If the function succeeds, the return value is handle to a new record object.
If the function fails, the return value is null.
Remarks
Field 0 of the record object created by the MsiCreateRecord function is used for format strings and operation codes and is not included in the count specified by cParams. All fields are initialized to null.
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 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 |
---|---|
Header | Msiquery.h |
Library | Msi.lib |
DLL | Msi.dll |
See Also
Send comments about this topic to Microsoft
Build date: 8/13/2009
© 2009 Microsoft Corporation. All rights reserved.