#include "stdinc.h" #include "macros.h" #include #include #include "common.h" static PWSTR s_InsertTableSQLTemporary[] = { INSERT_DIRECTORY L"TEMPORARY", INSERT_CREATEFOLDER L"TEMPORARY", INSERT_REGISTRY L"TEMPORARY", INSERT_DUPLICATEFILE L"TEMPORARY", INSERT_COMPONENT L"TEMPORARY" }; HRESULT ExecuteInsertTableSQL(DWORD dwFlags, const MSIHANDLE & hdb, DWORD tableIndex, UINT cRecords, ...) { PMSIHANDLE hView = NULL; PMSIHANDLE hRecord = NULL; PCWSTR pwszRecord = NULL; va_list ap; HRESULT hr = S_OK; PWSTR pwszSQL = NULL; PARAMETER_CHECK_NTC(dwFlags == TEMPORARY_DB_OPT); pwszSQL = s_InsertTableSQLTemporary[tableIndex]; hRecord = ::MsiCreateRecord(cRecords); if (hRecord == NULL) SETFAIL_AND_EXIT; // // get parameters // va_start(ap, cRecords); for (DWORD i=0; i