OpenVPN
Functions
msiex.h File Reference
#include <windows.h>
#include <msi.h>
#include "../tapctl/basic.h"
Include dependency graph for msiex.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

UINT msi_get_string (_In_ MSIHANDLE hInstall, _In_z_ LPCTSTR szName, _Out_ LPTSTR *pszValue)
 Gets MSI property value. More...
 
UINT msi_get_record_string (_In_ MSIHANDLE hRecord, _In_ unsigned int iField, _Out_ LPTSTR *pszValue)
 Gets MSI record string value. More...
 
UINT msi_format_record (_In_ MSIHANDLE hInstall, _In_ MSIHANDLE hRecord, _Out_ LPTSTR *pszValue)
 Formats MSI record. More...
 
UINT msi_format_field (_In_ MSIHANDLE hInstall, _In_ MSIHANDLE hRecord, _In_ unsigned int iField, _Out_ LPTSTR *pszValue)
 Formats MSI record field. More...
 

Function Documentation

◆ msi_format_field()

UINT msi_format_field ( _In_ MSIHANDLE  hInstall,
_In_ MSIHANDLE  hRecord,
_In_ unsigned int  iField,
_Out_ LPTSTR *  pszValue 
)

Formats MSI record field.

Parameters
hInstallHandle to the installation. This may be omitted, in which case only the record field parameters are processed and properties are not available for substitution.
hRecordHandle to the field record
iFieldField index
pszValuePointer to string to retrieve formatted value. The string must be released with free() after use.
Returns
ERROR_SUCCESS on success; Win32 error code otherwise

Definition at line 212 of file msiex.c.

References M_ERRNO, M_NONFATAL, msg, msi_format_record(), and msi_get_record_string().

Referenced by EvaluateTUNTAPAdapters().

◆ msi_format_record()

UINT msi_format_record ( _In_ MSIHANDLE  hInstall,
_In_ MSIHANDLE  hRecord,
_Out_ LPTSTR *  pszValue 
)

Formats MSI record.

Parameters
hInstallHandle to the installation. This may be omitted, in which case only the record field parameters are processed and properties are not available for substitution.
hRecordHandle to the record to format. The template string must be stored in record field 0 followed by referenced data parameters.
pszValuePointer to string to retrieve formatted value. The string must be released with free() after use.
Returns
ERROR_SUCCESS on success; Win32 error code otherwise

Definition at line 154 of file msiex.c.

References M_ERRNO, M_FATAL, M_NONFATAL, and msg.

Referenced by msi_format_field().

◆ msi_get_record_string()

UINT msi_get_record_string ( _In_ MSIHANDLE  hRecord,
_In_ unsigned int  iField,
_Out_ LPTSTR *  pszValue 
)

Gets MSI record string value.

Parameters
hRecordHandle to the record
iFieldField index
pszValuePointer to string to retrieve field value. The string must be released with free() after use.
Returns
ERROR_SUCCESS on success; Win32 error code otherwise

Definition at line 96 of file msiex.c.

References M_ERRNO, M_FATAL, M_NONFATAL, and msg.

Referenced by EvaluateTUNTAPAdapters(), and msi_format_field().

◆ msi_get_string()

UINT msi_get_string ( _In_ MSIHANDLE  hInstall,
_In_z_ LPCTSTR  szName,
_Out_ LPTSTR *  pszValue 
)

Gets MSI property value.

Parameters
hInstallHandle to the installation provided to the DLL custom action
szNameProperty name
pszValuePointer to string to retrieve property value. The string must be released with free() after use.
Returns
ERROR_SUCCESS on success; Win32 error code otherwise

Definition at line 38 of file msiex.c.

References M_ERRNO, M_FATAL, M_NONFATAL, and msg.

Referenced by ProcessDeferredAction().