Share via


Función MsiRecordSetInteger (msiquery.h)

La función MsiRecordSetInteger establece un campo de registro en un campo entero.

Sintaxis

UINT MsiRecordSetInteger(
  [in] MSIHANDLE hRecord,
  [in] UINT      iField,
  [in] int       iValue
);

Parámetros

[in] hRecord

Identificador del registro.

[in] iField

Especifica el campo del registro que se va a establecer.

[in] iValue

Especifica el valor al que se va a establecer el campo.

Valor devuelto

Esta función devuelve UINT.

Comentarios

En la función MsiRecordSetInteger , al intentar almacenar un valor en un campo inexistente se produce un error. Tenga en cuenta que el código siguiente devuelve ERROR_INVALID_PARAMETER.

MSIHANDLE hRecord;
UINT lReturn;  

//create an msirecord with no fields
hRecord = MsiCreateRecord(0); 

//attempting to set the first field's value gives you ERROR_INVALID_PARAMETER 
lReturn = MsiRecordSetInteger(hRecord, 1, 0);  

Para establecer un campo entero de registro en NULL_INTEGER, establezca iValueen MSI_NULL_INTEGER.

Requisitos

Requisito Value
Cliente mínimo compatible Windows Installer 5.0 en Windows Server 2012, Windows 8, Windows Server 2008 R2 o Windows 7. Windows Installer 4.0 o Windows Installer 4.5 en Windows Server 2008 o Windows Vista.
Plataforma de destino Windows
Encabezado msiquery.h
Library Msi.lib
Archivo DLL Msi.dll

Consulte también

Funciones de procesamiento de registros