ReactOS  0.4.15-dev-4616-g17e0e44
query.h File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "objidl.h"
#include "msi.h"
#include "msiquery.h"
#include "msipriv.h"
#include "wine/list.h"
Include dependency graph for query.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  sql_str
 
struct  complex_expr
 
union  ext_column
 
struct  expr
 
struct  SQL_input
 

Macros

#define OP_EQ   1
 
#define OP_AND   2
 
#define OP_OR   3
 
#define OP_GT   4
 
#define OP_LT   5
 
#define OP_LE   6
 
#define OP_GE   7
 
#define OP_NE   8
 
#define OP_ISNULL   9
 
#define OP_NOTNULL   10
 
#define EXPR_COMPLEX   1
 
#define EXPR_COLUMN   2
 
#define EXPR_COL_NUMBER   3
 
#define EXPR_IVAL   4
 
#define EXPR_SVAL   5
 
#define EXPR_UVAL   6
 
#define EXPR_STRCMP   7
 
#define EXPR_WILDCARD   9
 
#define EXPR_COL_NUMBER_STRING   10
 
#define EXPR_COL_NUMBER32   11
 
#define EXPR_UNARY   12
 

Functions

UINT MSI_ParseSQL (MSIDATABASE *db, LPCWSTR command, MSIVIEW **phview, struct list *mem) DECLSPEC_HIDDEN
 
UINT TABLE_CreateView (MSIDATABASE *db, LPCWSTR name, MSIVIEW **view) DECLSPEC_HIDDEN
 
UINT SELECT_CreateView (MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table, const column_info *columns) DECLSPEC_HIDDEN
 
UINT DISTINCT_CreateView (MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table) DECLSPEC_HIDDEN
 
UINT ORDER_CreateView (MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table, column_info *columns) DECLSPEC_HIDDEN
 
UINT WHERE_CreateView (MSIDATABASE *db, MSIVIEW **view, LPWSTR tables, struct expr *cond) DECLSPEC_HIDDEN
 
UINT CREATE_CreateView (MSIDATABASE *db, MSIVIEW **view, LPCWSTR table, column_info *col_info, BOOL hold) DECLSPEC_HIDDEN
 
UINT INSERT_CreateView (MSIDATABASE *db, MSIVIEW **view, LPCWSTR table, column_info *columns, column_info *values, BOOL temp) DECLSPEC_HIDDEN
 
UINT UPDATE_CreateView (MSIDATABASE *db, MSIVIEW **view, LPWSTR table, column_info *list, struct expr *expr) DECLSPEC_HIDDEN
 
UINT DELETE_CreateView (MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table) DECLSPEC_HIDDEN
 
UINT ALTER_CreateView (MSIDATABASE *db, MSIVIEW **view, LPCWSTR name, column_info *colinfo, int hold) DECLSPEC_HIDDEN
 
UINT STREAMS_CreateView (MSIDATABASE *db, MSIVIEW **view) DECLSPEC_HIDDEN
 
UINT STORAGES_CreateView (MSIDATABASE *db, MSIVIEW **view) DECLSPEC_HIDDEN
 
UINT DROP_CreateView (MSIDATABASE *db, MSIVIEW **view, LPCWSTR name) DECLSPEC_HIDDEN
 
int sqliteGetToken (const WCHAR *z, int *tokenType, int *skip) DECLSPEC_HIDDEN
 
MSIRECORDmsi_query_merge_record (UINT fields, const column_info *vl, MSIRECORD *rec) DECLSPEC_HIDDEN
 
UINT msi_create_table (MSIDATABASE *db, LPCWSTR name, column_info *col_info, MSICONDITION persistent, BOOL hold) DECLSPEC_HIDDEN
 
UINT msi_select_update (MSIVIEW *view, MSIRECORD *rec, UINT row) DECLSPEC_HIDDEN
 
UINT msi_view_refresh_row (MSIDATABASE *db, MSIVIEW *view, UINT row, MSIRECORD *rec) DECLSPEC_HIDDEN
 

Macro Definition Documentation

◆ EXPR_COL_NUMBER

#define EXPR_COL_NUMBER   3

Definition at line 49 of file query.h.

◆ EXPR_COL_NUMBER32

#define EXPR_COL_NUMBER32   11

Definition at line 56 of file query.h.

◆ EXPR_COL_NUMBER_STRING

#define EXPR_COL_NUMBER_STRING   10

Definition at line 55 of file query.h.

◆ EXPR_COLUMN

#define EXPR_COLUMN   2

Definition at line 48 of file query.h.

◆ EXPR_COMPLEX

#define EXPR_COMPLEX   1

Definition at line 47 of file query.h.

◆ EXPR_IVAL

#define EXPR_IVAL   4

Definition at line 50 of file query.h.

◆ EXPR_STRCMP

#define EXPR_STRCMP   7

Definition at line 53 of file query.h.

◆ EXPR_SVAL

#define EXPR_SVAL   5

Definition at line 51 of file query.h.

◆ EXPR_UNARY

#define EXPR_UNARY   12

Definition at line 57 of file query.h.

◆ EXPR_UVAL

#define EXPR_UVAL   6

Definition at line 52 of file query.h.

◆ EXPR_WILDCARD

#define EXPR_WILDCARD   9

Definition at line 54 of file query.h.

◆ OP_AND

#define OP_AND   2

Definition at line 37 of file query.h.

◆ OP_EQ

#define OP_EQ   1

Definition at line 36 of file query.h.

◆ OP_GE

#define OP_GE   7

Definition at line 42 of file query.h.

◆ OP_GT

#define OP_GT   4

Definition at line 39 of file query.h.

◆ OP_ISNULL

#define OP_ISNULL   9

Definition at line 44 of file query.h.

◆ OP_LE

#define OP_LE   6

Definition at line 41 of file query.h.

◆ OP_LT

#define OP_LT   5

Definition at line 40 of file query.h.

◆ OP_NE

#define OP_NE   8

Definition at line 43 of file query.h.

◆ OP_NOTNULL

#define OP_NOTNULL   10

Definition at line 45 of file query.h.

◆ OP_OR

#define OP_OR   3

Definition at line 38 of file query.h.

Function Documentation

◆ ALTER_CreateView()

UINT ALTER_CreateView ( MSIDATABASE db,
MSIVIEW **  view,
LPCWSTR  name,
column_info colinfo,
int  hold 
)

Definition at line 160 of file alter.c.

161 {
162  MSIALTERVIEW *av;
163  UINT r;
164 
165  TRACE("%p %p %s %d\n", view, colinfo, debugstr_w(name), hold );
166 
167  av = msi_alloc_zero( sizeof *av );
168  if( !av )
169  return ERROR_FUNCTION_FAILED;
170 
171  r = TABLE_CreateView( db, name, &av->table );
172  if (r != ERROR_SUCCESS)
173  {
174  msi_free( av );
175  return r;
176  }
177 
178  if (colinfo)
179  colinfo->table = name;
180 
181  /* fill the structure */
182  av->view.ops = &alter_ops;
183  av->db = db;
184  av->hold = hold;
185  av->colinfo = colinfo;
186 
187  *view = &av->view;
188 
189  return ERROR_SUCCESS;
190 }
#define ERROR_SUCCESS
Definition: deptool.c:10
UINT TABLE_CreateView(MSIDATABASE *db, LPCWSTR name, MSIVIEW **view) DECLSPEC_HIDDEN
Definition: table.c:2189
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
MSIDATABASE * db
Definition: alter.c:40
static void msi_free(void *mem)
Definition: msipriv.h:1159
static void * msi_alloc_zero(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1148
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
const MSIVIEWOPS * ops
Definition: msipriv.h:355
column_info * colinfo
Definition: alter.c:42
MSIVIEW * table
Definition: alter.c:41
static const MSIVIEWOPS alter_ops
Definition: alter.c:137
unsigned int UINT
Definition: ndis.h:50
LPCWSTR table
Definition: msipriv.h:222
Definition: name.c:38
MSIVIEW view
Definition: alter.c:39
GLuint const GLchar * name
Definition: glext.h:6031

◆ CREATE_CreateView()

UINT CREATE_CreateView ( MSIDATABASE db,
MSIVIEW **  view,
LPCWSTR  table,
column_info col_info,
BOOL  hold 
)

Definition at line 160 of file create.c.

162 {
163  MSICREATEVIEW *cv = NULL;
164  UINT r;
165  column_info *col;
166  BOOL temp = TRUE;
167  BOOL tempprim = FALSE;
168 
169  TRACE("%p\n", cv );
170 
171  r = check_columns( col_info );
172  if( r != ERROR_SUCCESS )
173  return r;
174 
175  cv = msi_alloc_zero( sizeof *cv );
176  if( !cv )
177  return ERROR_FUNCTION_FAILED;
178 
179  for( col = col_info; col; col = col->next )
180  {
181  if (!col->table)
182  col->table = table;
183 
184  if( !(col->type & MSITYPE_TEMPORARY) )
185  temp = FALSE;
186  else if ( col->type & MSITYPE_KEY )
187  tempprim = TRUE;
188  }
189 
190  if ( !temp && tempprim )
191  {
192  msi_free( cv );
193  return ERROR_FUNCTION_FAILED;
194  }
195 
196  /* fill the structure */
197  cv->view.ops = &create_ops;
198  msiobj_addref( &db->hdr );
199  cv->db = db;
200  cv->name = table;
201  cv->col_info = col_info;
202  cv->bIsTemp = temp;
203  cv->hold = hold;
204  *view = (MSIVIEW*) cv;
205 
206  return ERROR_SUCCESS;
207 }
void msiobj_addref(MSIOBJECTHDR *info)
Definition: handle.c:217
static const MSIVIEWOPS create_ops
Definition: create.c:124
#define ERROR_SUCCESS
Definition: deptool.c:10
#define TRUE
Definition: types.h:120
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
struct _column_info * next
Definition: msipriv.h:226
static void msi_free(void *mem)
Definition: msipriv.h:1159
MSIVIEW view
Definition: create.c:43
static void * msi_alloc_zero(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1148
BOOL bIsTemp
Definition: create.c:46
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
LPCWSTR name
Definition: create.c:45
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
#define TRACE(s)
Definition: solgame.cpp:4
const MSIVIEWOPS * ops
Definition: msipriv.h:355
#define MSITYPE_KEY
Definition: msipriv.h:52
#define MSITYPE_TEMPORARY
Definition: msipriv.h:53
static calc_node_t temp
Definition: rpn_ieee.c:38
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
LPCWSTR table
Definition: msipriv.h:222
MSIDATABASE * db
Definition: create.c:44
static UINT check_columns(const column_info *col_info)
Definition: create.c:147
column_info * col_info
Definition: create.c:48
MSIOBJECTHDR hdr
Definition: msipriv.h:108

◆ DELETE_CreateView()

UINT DELETE_CreateView ( MSIDATABASE db,
MSIVIEW **  view,
MSIVIEW table 
)

Definition at line 190 of file delete.c.

191 {
192  MSIDELETEVIEW *dv = NULL;
193 
194  TRACE("%p\n", dv );
195 
196  dv = msi_alloc_zero( sizeof *dv );
197  if( !dv )
198  return ERROR_FUNCTION_FAILED;
199 
200  /* fill the structure */
201  dv->view.ops = &delete_ops;
202  dv->db = db;
203  dv->table = table;
204 
205  *view = &dv->view;
206 
207  return ERROR_SUCCESS;
208 }
#define ERROR_SUCCESS
Definition: deptool.c:10
MSIVIEW view
Definition: delete.c:53
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
static void * msi_alloc_zero(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1148
MSIVIEW * table
Definition: delete.c:55
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
MSIDATABASE * db
Definition: delete.c:54
#define TRACE(s)
Definition: solgame.cpp:4
const MSIVIEWOPS * ops
Definition: msipriv.h:355
static const MSIVIEWOPS delete_ops
Definition: delete.c:167
#define NULL
Definition: types.h:112

◆ DISTINCT_CreateView()

UINT DISTINCT_CreateView ( MSIDATABASE db,
MSIVIEW **  view,
MSIVIEW table 
)

Definition at line 273 of file distinct.c.

274 {
275  MSIDISTINCTVIEW *dv = NULL;
276  UINT count = 0, r;
277 
278  TRACE("%p\n", dv );
279 
280  r = table->ops->get_dimensions( table, NULL, &count );
281  if( r != ERROR_SUCCESS )
282  {
283  ERR("can't get table dimensions\n");
284  return r;
285  }
286 
287  dv = msi_alloc_zero( sizeof *dv );
288  if( !dv )
289  return ERROR_FUNCTION_FAILED;
290 
291  /* fill the structure */
292  dv->view.ops = &distinct_ops;
293  msiobj_addref( &db->hdr );
294  dv->db = db;
295  dv->table = table;
296  dv->translation = NULL;
297  dv->row_count = 0;
298  *view = (MSIVIEW*) dv;
299 
300  return ERROR_SUCCESS;
301 }
void msiobj_addref(MSIOBJECTHDR *info)
Definition: handle.c:217
static const MSIVIEWOPS distinct_ops
Definition: distinct.c:250
#define ERROR_SUCCESS
Definition: deptool.c:10
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
static void * msi_alloc_zero(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1148
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
MSIVIEW * table
Definition: distinct.c:51
#define TRACE(s)
Definition: solgame.cpp:4
const MSIVIEWOPS * ops
Definition: msipriv.h:355
#define ERR(fmt,...)
Definition: debug.h:110
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
MSIDATABASE * db
Definition: distinct.c:50
MSIOBJECTHDR hdr
Definition: msipriv.h:108
UINT * translation
Definition: distinct.c:53

◆ DROP_CreateView()

UINT DROP_CreateView ( MSIDATABASE db,
MSIVIEW **  view,
LPCWSTR  name 
)

Definition at line 118 of file drop.c.

119 {
120  MSIDROPVIEW *dv;
121  UINT r;
122 
123  TRACE("%p %s\n", view, debugstr_w(name));
124 
125  dv = msi_alloc_zero(sizeof *dv);
126  if(!dv)
127  return ERROR_FUNCTION_FAILED;
128 
129  r = TABLE_CreateView(db, name, &dv->table);
130  if (r != ERROR_SUCCESS)
131  {
132  msi_free( dv );
133  return r;
134  }
135 
136  dv->view.ops = &drop_ops;
137  dv->db = db;
138 
139  *view = (MSIVIEW *)dv;
140 
141  return ERROR_SUCCESS;
142 }
#define ERROR_SUCCESS
Definition: deptool.c:10
UINT TABLE_CreateView(MSIDATABASE *db, LPCWSTR name, MSIVIEW **view) DECLSPEC_HIDDEN
Definition: table.c:2189
MSIVIEW view
Definition: drop.c:39
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
static const MSIVIEWOPS drop_ops
Definition: drop.c:95
static void msi_free(void *mem)
Definition: msipriv.h:1159
static void * msi_alloc_zero(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1148
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
const MSIVIEWOPS * ops
Definition: msipriv.h:355
MSIVIEW * table
Definition: drop.c:41
unsigned int UINT
Definition: ndis.h:50
Definition: name.c:38
MSIDATABASE * db
Definition: drop.c:40

◆ INSERT_CreateView()

UINT INSERT_CreateView ( MSIDATABASE db,
MSIVIEW **  view,
LPCWSTR  table,
column_info columns,
column_info values,
BOOL  temp 
)

Definition at line 351 of file insert.c.

353 {
354  MSIINSERTVIEW *iv = NULL;
355  UINT r;
356  MSIVIEW *tv = NULL, *sv = NULL;
357 
358  TRACE("%p\n", iv );
359 
360  /* there should be one value for each column */
361  if ( count_column_info( columns ) != count_column_info(values) )
362  return ERROR_BAD_QUERY_SYNTAX;
363 
364  r = TABLE_CreateView( db, table, &tv );
365  if( r != ERROR_SUCCESS )
366  return r;
367 
368  r = SELECT_CreateView( db, &sv, tv, columns );
369  if( r != ERROR_SUCCESS )
370  {
371  if( tv )
372  tv->ops->delete( tv );
373  return r;
374  }
375 
376  iv = msi_alloc_zero( sizeof *iv );
377  if( !iv )
378  return ERROR_FUNCTION_FAILED;
379 
380  /* fill the structure */
381  iv->view.ops = &insert_ops;
382  msiobj_addref( &db->hdr );
383  iv->table = tv;
384  iv->db = db;
385  iv->vals = values;
386  iv->bIsTemp = temp;
387  iv->sv = sv;
388  *view = (MSIVIEW*) iv;
389 
390  return ERROR_SUCCESS;
391 }
void msiobj_addref(MSIOBJECTHDR *info)
Definition: handle.c:217
#define ERROR_SUCCESS
Definition: deptool.c:10
UINT TABLE_CreateView(MSIDATABASE *db, LPCWSTR name, MSIVIEW **view) DECLSPEC_HIDDEN
Definition: table.c:2189
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLboolean GLenum GLenum GLvoid * values
Definition: glext.h:5666
static void * msi_alloc_zero(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1148
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
MSIVIEW * sv
Definition: insert.c:47
static const MSIVIEWOPS insert_ops
Definition: insert.c:320
UINT SELECT_CreateView(MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table, const column_info *columns) DECLSPEC_HIDDEN
Definition: select.c:423
#define TRACE(s)
Definition: solgame.cpp:4
const MSIVIEWOPS * ops
Definition: msipriv.h:355
MSIVIEW view
Definition: insert.c:43
BOOL bIsTemp
Definition: insert.c:46
static UINT count_column_info(const column_info *ci)
Definition: insert.c:343
UINT(* delete)(struct tagMSIVIEW *)
Definition: msipriv.h:324
static calc_node_t temp
Definition: rpn_ieee.c:38
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
MSIVIEW * table
Definition: insert.c:44
column_info * vals
Definition: insert.c:48
MSIOBJECTHDR hdr
Definition: msipriv.h:108
MSIDATABASE * db
Definition: insert.c:45
#define ERROR_BAD_QUERY_SYNTAX
Definition: winerror.h:973

◆ msi_create_table()

UINT msi_create_table ( MSIDATABASE db,
LPCWSTR  name,
column_info col_info,
MSICONDITION  persistent,
BOOL  hold 
)

Definition at line 705 of file table.c.

707 {
708  UINT r, nField;
709  MSIVIEW *tv = NULL;
710  MSIRECORD *rec = NULL;
711  column_info *col;
712  MSITABLE *table;
713  UINT i;
714 
715  /* only add tables that don't exist already */
716  if( TABLE_Exists(db, name ) )
717  {
718  WARN("table %s exists\n", debugstr_w(name));
719  return ERROR_BAD_QUERY_SYNTAX;
720  }
721 
722  table = msi_alloc( sizeof (MSITABLE) + lstrlenW(name)*sizeof (WCHAR) );
723  if( !table )
724  return ERROR_FUNCTION_FAILED;
725 
726  table->ref_count = 0;
727  table->row_count = 0;
728  table->data = NULL;
729  table->data_persistent = NULL;
730  table->colinfo = NULL;
731  table->col_count = 0;
732  table->persistent = persistent;
733  lstrcpyW( table->name, name );
734 
735  if( hold )
736  table->ref_count++;
737 
738  for( col = col_info; col; col = col->next )
739  table->col_count++;
740 
741  table->colinfo = msi_alloc( table->col_count * sizeof(MSICOLUMNINFO) );
742  if (!table->colinfo)
743  {
744  free_table( table );
745  return ERROR_FUNCTION_FAILED;
746  }
747 
748  for( i = 0, col = col_info; col; i++, col = col->next )
749  {
750  UINT table_id = msi_add_string( db->strings, col->table, -1, persistent );
751  UINT col_id = msi_add_string( db->strings, col->column, -1, persistent );
752 
753  table->colinfo[ i ].tablename = msi_string_lookup( db->strings, table_id, NULL );
754  table->colinfo[ i ].number = i + 1;
755  table->colinfo[ i ].colname = msi_string_lookup( db->strings, col_id, NULL );
756  table->colinfo[ i ].type = col->type;
757  table->colinfo[ i ].offset = 0;
758  table->colinfo[ i ].hash_table = NULL;
759  }
760  table_calc_column_offsets( db, table->colinfo, table->col_count);
761 
762  r = TABLE_CreateView( db, L"_Tables", &tv );
763  TRACE("CreateView returned %x\n", r);
764  if( r )
765  {
766  free_table( table );
767  return r;
768  }
769 
770  r = tv->ops->execute( tv, 0 );
771  TRACE("tv execute returned %x\n", r);
772  if( r )
773  goto err;
774 
775  rec = MSI_CreateRecord( 1 );
776  if( !rec )
777  goto err;
778 
779  r = MSI_RecordSetStringW( rec, 1, name );
780  if( r )
781  goto err;
782 
783  r = tv->ops->insert_row( tv, rec, -1, persistent == MSICONDITION_FALSE );
784  TRACE("insert_row returned %x\n", r);
785  if( r )
786  goto err;
787 
788  tv->ops->delete( tv );
789  tv = NULL;
790 
791  msiobj_release( &rec->hdr );
792  rec = NULL;
793 
794  if( persistent != MSICONDITION_FALSE )
795  {
796  /* add each column to the _Columns table */
797  r = TABLE_CreateView( db, L"_Columns", &tv );
798  if( r )
799  goto err;
800 
801  r = tv->ops->execute( tv, 0 );
802  TRACE("tv execute returned %x\n", r);
803  if( r )
804  goto err;
805 
806  rec = MSI_CreateRecord( 4 );
807  if( !rec )
808  goto err;
809 
810  r = MSI_RecordSetStringW( rec, 1, name );
811  if( r )
812  goto err;
813 
814  /*
815  * need to set the table, column number, col name and type
816  * for each column we enter in the table
817  */
818  nField = 1;
819  for( col = col_info; col; col = col->next )
820  {
821  r = MSI_RecordSetInteger( rec, 2, nField );
822  if( r )
823  goto err;
824 
825  r = MSI_RecordSetStringW( rec, 3, col->column );
826  if( r )
827  goto err;
828 
829  r = MSI_RecordSetInteger( rec, 4, col->type );
830  if( r )
831  goto err;
832 
833  r = tv->ops->insert_row( tv, rec, -1, FALSE );
834  if( r )
835  goto err;
836 
837  nField++;
838  }
839  if( !col )
840  r = ERROR_SUCCESS;
841  }
842 
843 err:
844  if (rec)
845  msiobj_release( &rec->hdr );
846  /* FIXME: remove values from the string table on error */
847  if( tv )
848  tv->ops->delete( tv );
849 
850  if (r == ERROR_SUCCESS)
851  list_add_head( &db->tables, &table->entry );
852  else
853  free_table( table );
854 
855  return r;
856 }
const WCHAR * msi_string_lookup(const string_table *st, UINT id, int *len) DECLSPEC_HIDDEN
Definition: string.c:343
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:597
#define ERROR_SUCCESS
Definition: deptool.c:10
const WCHAR * name
MSIOBJECTHDR hdr
Definition: msipriv.h:151
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define WARN(fmt,...)
Definition: debug.h:112
__WINE_SERVER_LIST_INLINE void list_add_head(struct list *list, struct list *elem)
Definition: list.h:96
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
struct _column_info * next
Definition: msipriv.h:226
UINT(* execute)(struct tagMSIVIEW *view, MSIRECORD *record)
Definition: msipriv.h:293
#define lstrlenW
Definition: compat.h:609
#define L(x)
Definition: ntvdm.h:50
UINT MSI_RecordSetInteger(MSIRECORD *, UINT, int) DECLSPEC_HIDDEN
Definition: record.c:280
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
#define FALSE
Definition: types.h:117
string_table * strings
Definition: msipriv.h:110
#define debugstr_w
Definition: kernel32.h:32
struct list entry
struct list tables
Definition: msipriv.h:118
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
const MSIVIEWOPS * ops
Definition: msipriv.h:355
UINT TABLE_CreateView(MSIDATABASE *db, LPCWSTR name, MSIVIEW **view)
Definition: table.c:2189
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
static void table_calc_column_offsets(MSIDATABASE *db, MSICOLUMNINFO *colinfo, DWORD count)
Definition: table.c:492
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:76
#define err(...)
static void free_table(MSITABLE *table)
Definition: table.c:362
UINT(* delete)(struct tagMSIVIEW *)
Definition: msipriv.h:324
#define lstrcpyW
Definition: compat.h:608
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
BYTE * data
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
Definition: name.c:38
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1142
BOOL msi_add_string(string_table *st, const WCHAR *data, int len, BOOL persistent) DECLSPEC_HIDDEN
Definition: string.c:303
#define ERROR_BAD_QUERY_SYNTAX
Definition: winerror.h:973
BOOL TABLE_Exists(MSIDATABASE *db, LPCWSTR name)
Definition: table.c:960
UINT(* insert_row)(struct tagMSIVIEW *view, MSIRECORD *record, UINT row, BOOL temporary)
Definition: msipriv.h:283

Referenced by CREATE_execute().

◆ MSI_ParseSQL()

UINT MSI_ParseSQL ( MSIDATABASE db,
LPCWSTR  command,
MSIVIEW **  phview,
struct list mem 
)

Referenced by MSI_DatabaseOpenViewW().

◆ msi_query_merge_record()

MSIRECORD* msi_query_merge_record ( UINT  fields,
const column_info vl,
MSIRECORD rec 
)

Definition at line 66 of file insert.c.

67 {
68  MSIRECORD *merged;
69  DWORD wildcard_count = 1, i;
70 
71  merged = MSI_CreateRecord( fields );
72  for( i=1; i <= fields; i++ )
73  {
74  if( !vl )
75  {
76  TRACE("Not enough elements in the list to insert\n");
77  goto err;
78  }
79  switch( vl->val->type )
80  {
81  case EXPR_SVAL:
82  TRACE( "field %lu -> %s\n", i, debugstr_w(vl->val->u.sval) );
83  MSI_RecordSetStringW( merged, i, vl->val->u.sval );
84  break;
85  case EXPR_IVAL:
86  MSI_RecordSetInteger( merged, i, vl->val->u.ival );
87  break;
88  case EXPR_WILDCARD:
89  if( !rec )
90  goto err;
91  MSI_RecordCopyField( rec, wildcard_count, merged, i );
92  wildcard_count++;
93  break;
94  default:
95  ERR("Unknown expression type %d\n", vl->val->type);
96  }
97  vl = vl->next;
98  }
99 
100  return merged;
101 err:
102  msiobj_release( &merged->hdr );
103  return NULL;
104 }
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:597
UINT MSI_RecordCopyField(MSIRECORD *, UINT, MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:166
MSIOBJECTHDR hdr
Definition: msipriv.h:151
struct _column_info * next
Definition: msipriv.h:226
UINT MSI_RecordSetInteger(MSIRECORD *, UINT, int) DECLSPEC_HIDDEN
Definition: record.c:280
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long DWORD
Definition: ntddk_ex.h:95
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
#define EXPR_WILDCARD
Definition: query.h:54
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:76
#define err(...)
#define ERR(fmt,...)
Definition: debug.h:110
struct expr * val
Definition: msipriv.h:225
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define NULL
Definition: types.h:112

Referenced by INSERT_execute(), and UPDATE_execute().

◆ msi_select_update()

UINT msi_select_update ( MSIVIEW view,
MSIRECORD rec,
UINT  row 
)

Definition at line 249 of file select.c.

250 {
252  UINT r, i, col, type, val;
253  IStream *stream;
254  LPCWSTR str;
255 
256  for (i = 0; i < sv->num_cols; i++)
257  {
258  col = sv->cols[i];
259 
261  if (r != ERROR_SUCCESS)
262  {
263  ERR("Failed to get column information: %d\n", r);
264  return r;
265  }
266 
267  if (MSITYPE_IS_BINARY(type))
268  {
269  if (MSI_RecordGetIStream(rec, i + 1, &stream))
270  return ERROR_FUNCTION_FAILED;
271  r = sv->table->ops->set_stream(sv->table, row, col, stream);
272  }
273  else if (type & MSITYPE_STRING)
274  {
275  int len;
276  str = msi_record_get_string(rec, i + 1, &len);
277  r = sv->table->ops->set_string(sv->table, row, col, str, len);
278  }
279  else
280  {
281  val = MSI_RecordGetInteger(rec, i + 1);
282  r = sv->table->ops->set_int(sv->table, row, col, val);
283  }
284 
285  if (r != ERROR_SUCCESS)
286  {
287  ERR("Failed to modify record: %d\n", r);
288  return r;
289  }
290  }
291 
292  return ERROR_SUCCESS;
293 }
UINT(* set_stream)(struct tagMSIVIEW *view, UINT row, UINT col, IStream *stream)
Definition: msipriv.h:271
#define ERROR_SUCCESS
Definition: deptool.c:10
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
UINT MSI_RecordGetIStream(MSIRECORD *, UINT, IStream **) DECLSPEC_HIDDEN
Definition: record.c:852
#define MSITYPE_IS_BINARY(type)
Definition: msipriv.h:62
#define MSITYPE_STRING
Definition: msipriv.h:50
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
UINT cols[1]
Definition: select.c:48
UINT(* set_string)(struct tagMSIVIEW *view, UINT row, UINT col, const WCHAR *val, int len)
Definition: msipriv.h:264
const WCHAR * str
GLuint GLfloat * val
Definition: glext.h:7180
UINT num_cols
Definition: select.c:46
const MSIVIEWOPS * ops
Definition: msipriv.h:355
Definition: parse.h:22
GLuint GLuint stream
Definition: glext.h:7522
static UINT SELECT_get_column_info(struct tagMSIVIEW *view, UINT n, LPCWSTR *name, UINT *type, BOOL *temporary, LPCWSTR *table_name)
Definition: select.c:223
GLenum GLsizei len
Definition: glext.h:6722
MSIVIEW * table
Definition: select.c:45
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:213
const WCHAR * msi_record_get_string(const MSIRECORD *, UINT, int *) DECLSPEC_HIDDEN
Definition: record.c:420
#define ERR(fmt,...)
Definition: debug.h:110
UINT(* set_int)(struct tagMSIVIEW *view, UINT row, UINT col, int val)
Definition: msipriv.h:257
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78

Referenced by SELECT_modify(), and UPDATE_execute().

◆ msi_view_refresh_row()

UINT msi_view_refresh_row ( MSIDATABASE db,
MSIVIEW view,
UINT  row,
MSIRECORD rec 
)

Definition at line 287 of file msiquery.c.

288 {
289  UINT row_count = 0, col_count = 0, i, ival, ret, type;
290 
291  TRACE("%p %p %d %p\n", db, view, row, rec);
292 
293  ret = view->ops->get_dimensions(view, &row_count, &col_count);
294  if (ret)
295  return ret;
296 
297  if (!col_count)
299 
300  for (i = 1; i <= col_count; i++)
301  {
302  ret = view->ops->get_column_info(view, i, NULL, &type, NULL, NULL);
303  if (ret)
304  {
305  ERR("Error getting column type for %d\n", i);
306  continue;
307  }
308 
309  if (MSITYPE_IS_BINARY(type))
310  {
311  IStream *stm = NULL;
312 
313  ret = view->ops->fetch_stream(view, row, i, &stm);
314  if ((ret == ERROR_SUCCESS) && stm)
315  {
316  MSI_RecordSetIStream(rec, i, stm);
317  IStream_Release(stm);
318  }
319  else
320  WARN("failed to get stream\n");
321 
322  continue;
323  }
324 
325  ret = view->ops->fetch_int(view, row, i, &ival);
326  if (ret)
327  {
328  ERR("Error fetching data for %d\n", i);
329  continue;
330  }
331 
332  if (! (type & MSITYPE_VALID))
333  ERR("Invalid type!\n");
334 
335  if (type & MSITYPE_STRING)
336  {
337  int len;
338  const WCHAR *sval = msi_string_lookup(db->strings, ival, &len);
339  msi_record_set_string(rec, i, sval, len);
340  }
341  else
342  {
343  if ((type & MSI_DATASIZEMASK) == 2)
344  MSI_RecordSetInteger(rec, i, ival ? ival - (1<<15) : MSI_NULL_INTEGER);
345  else
346  MSI_RecordSetInteger(rec, i, ival - (1u<<31));
347  }
348  }
349 
350  return ERROR_SUCCESS;
351 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
const WCHAR * msi_string_lookup(const string_table *st, UINT id, int *len) DECLSPEC_HIDDEN
Definition: string.c:343
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define ERROR_SUCCESS
Definition: deptool.c:10
#define WARN(fmt,...)
Definition: debug.h:112
#define MSITYPE_IS_BINARY(type)
Definition: msipriv.h:62
#define MSI_NULL_INTEGER
Definition: msiquery.h:32
#define MSITYPE_STRING
Definition: msipriv.h:50
UINT MSI_RecordSetInteger(MSIRECORD *, UINT, int) DECLSPEC_HIDDEN
Definition: record.c:280
string_table * strings
Definition: msipriv.h:110
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
int ret
GLenum GLsizei len
Definition: glext.h:6722
UINT MSI_RecordSetIStream(MSIRECORD *, UINT, IStream *) DECLSPEC_HIDDEN
Definition: record.c:836
#define ERR(fmt,...)
Definition: debug.h:110
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int UINT
Definition: ndis.h:50
UINT msi_record_set_string(MSIRECORD *, UINT, const WCHAR *, int) DECLSPEC_HIDDEN
Definition: record.c:573
#define NULL
Definition: types.h:112
#define MSITYPE_VALID
Definition: msipriv.h:48
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define MSI_DATASIZEMASK
Definition: msipriv.h:47
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78

Referenced by msi_view_get_row(), and SELECT_modify().

◆ ORDER_CreateView()

UINT ORDER_CreateView ( MSIDATABASE db,
MSIVIEW **  view,
MSIVIEW table,
column_info columns 
)

◆ SELECT_CreateView()

UINT SELECT_CreateView ( MSIDATABASE db,
MSIVIEW **  view,
MSIVIEW table,
const column_info columns 
)

Definition at line 423 of file select.c.

425 {
426  MSISELECTVIEW *sv = NULL;
427  UINT count = 0, r = ERROR_SUCCESS;
428 
429  TRACE("%p\n", sv );
430 
431  count = select_count_columns( columns );
432 
434  if( !sv )
435  return ERROR_FUNCTION_FAILED;
436 
437  /* fill the structure */
438  sv->view.ops = &select_ops;
439  sv->db = db;
440  sv->table = table;
441  sv->num_cols = 0;
442  sv->max_cols = count;
443 
444  while( columns )
445  {
446  r = SELECT_AddColumn( sv, columns->column, columns->table );
447  if( r )
448  break;
449  columns = columns->next;
450  }
451 
452  if( r == ERROR_SUCCESS )
453  *view = &sv->view;
454  else
455  msi_free( sv );
456 
457  return r;
458 }
UINT max_cols
Definition: select.c:47
#define ERROR_SUCCESS
Definition: deptool.c:10
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
struct _column_info * next
Definition: msipriv.h:226
static void msi_free(void *mem)
Definition: msipriv.h:1159
static void * msi_alloc_zero(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1148
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
static const MSIVIEWOPS select_ops
Definition: select.c:352
LPCWSTR column
Definition: msipriv.h:223
UINT num_cols
Definition: select.c:46
#define TRACE(s)
Definition: solgame.cpp:4
const MSIVIEWOPS * ops
Definition: msipriv.h:355
MSIVIEW view
Definition: select.c:43
MSIVIEW * table
Definition: select.c:45
static int select_count_columns(const column_info *col)
Definition: select.c:415
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
LPCWSTR table
Definition: msipriv.h:222
MSIDATABASE * db
Definition: select.c:44
static UINT SELECT_AddColumn(MSISELECTVIEW *sv, LPCWSTR name, LPCWSTR table_name)
Definition: select.c:375

Referenced by INSERT_CreateView(), and UPDATE_CreateView().

◆ sqliteGetToken()

int sqliteGetToken ( const WCHAR z,
int tokenType,
int skip 
)

Definition at line 172 of file tokenize.c.

172  {
173  int i;
174 
175  *skip = 0;
176  switch( *z ){
177  case ' ': case '\t': case '\n': case '\f':
178  for(i=1; isSpace(z[i]); i++){}
179  *tokenType = TK_SPACE;
180  return i;
181  case '-':
182  if( z[1]==0 ) return -1;
183  *tokenType = TK_MINUS;
184  return 1;
185  case '(':
186  *tokenType = TK_LP;
187  return 1;
188  case ')':
189  *tokenType = TK_RP;
190  return 1;
191  case '*':
192  *tokenType = TK_STAR;
193  return 1;
194  case '=':
195  *tokenType = TK_EQ;
196  return 1;
197  case '<':
198  if( z[1]=='=' ){
199  *tokenType = TK_LE;
200  return 2;
201  }else if( z[1]=='>' ){
202  *tokenType = TK_NE;
203  return 2;
204  }else{
205  *tokenType = TK_LT;
206  return 1;
207  }
208  case '>':
209  if( z[1]=='=' ){
210  *tokenType = TK_GE;
211  return 2;
212  }else{
213  *tokenType = TK_GT;
214  return 1;
215  }
216  case '!':
217  if( z[1]!='=' ){
218  *tokenType = TK_ILLEGAL;
219  return 2;
220  }else{
221  *tokenType = TK_NE;
222  return 2;
223  }
224  case '?':
225  *tokenType = TK_WILDCARD;
226  return 1;
227  case ',':
228  *tokenType = TK_COMMA;
229  return 1;
230  case '`': case '\'': {
231  int delim = z[0];
232  for(i=1; z[i]; i++){
233  if( z[i]==delim )
234  break;
235  }
236  if( z[i] ) i++;
237  if( delim == '`' )
238  *tokenType = TK_ID;
239  else
240  *tokenType = TK_STRING;
241  return i;
242  }
243  case '.':
244  if( !isDigit(z[1]) ){
245  *tokenType = TK_DOT;
246  return 1;
247  }
248  /* Fall through */
249  case '0': case '1': case '2': case '3': case '4':
250  case '5': case '6': case '7': case '8': case '9':
251  *tokenType = TK_INTEGER;
252  for(i=1; isDigit(z[i]); i++){}
253  return i;
254  case '[':
255  for(i=1; z[i] && z[i-1]!=']'; i++){}
256  *tokenType = TK_ID;
257  return i;
258  default:
259  if( !isIdChar[*z] ){
260  break;
261  }
262  for(i=1; isIdChar[z[i]]; i++){}
263  *tokenType = sqliteKeywordCode(z, i);
264  if( *tokenType == TK_ID && z[i] == '`' ) *skip = 1;
265  return i;
266  }
267  *tokenType = TK_ILLEGAL;
268  return 1;
269 }
static int isDigit(WCHAR c)
Definition: tokenize.c:154
static int sqliteKeywordCode(const WCHAR *z, int n)
Definition: tokenize.c:105
GLdouble GLdouble z
Definition: glext.h:5874
static int isSpace(WCHAR c)
Definition: tokenize.c:162
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define skip(...)
Definition: atltest.h:64
static const char isIdChar[]
Definition: tokenize.c:131

◆ STORAGES_CreateView()

UINT STORAGES_CreateView ( MSIDATABASE db,
MSIVIEW **  view 
)

Definition at line 515 of file storages.c.

516 {
517  MSISTORAGESVIEW *sv;
518  INT rows;
519 
520  TRACE("(%p, %p)\n", db, view);
521 
522  sv = msi_alloc_zero( sizeof(MSISTORAGESVIEW) );
523  if (!sv)
524  return ERROR_FUNCTION_FAILED;
525 
526  sv->view.ops = &storages_ops;
527  sv->db = db;
528 
529  rows = add_storages_to_table(sv);
530  if (rows < 0)
531  {
532  msi_free( sv );
533  return ERROR_FUNCTION_FAILED;
534  }
535  sv->num_rows = rows;
536 
537  *view = (MSIVIEW *)sv;
538 
539  return ERROR_SUCCESS;
540 }
#define ERROR_SUCCESS
Definition: deptool.c:10
static void msi_free(void *mem)
Definition: msipriv.h:1159
int32_t INT
Definition: typedefs.h:58
static void * msi_alloc_zero(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1148
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
#define TRACE(s)
Definition: solgame.cpp:4
const MSIVIEWOPS * ops
Definition: msipriv.h:355
static INT add_storages_to_table(MSISTORAGESVIEW *sv)
Definition: storages.c:464
MSIDATABASE * db
Definition: storages.c:52
static const MSIVIEWOPS storages_ops
Definition: storages.c:441

Referenced by TABLE_CreateView().

◆ STREAMS_CreateView()

UINT STREAMS_CreateView ( MSIDATABASE db,
MSIVIEW **  view 
)

Definition at line 539 of file streams.c.

540 {
541  MSISTREAMSVIEW *sv;
542  UINT r;
543 
544  TRACE("(%p, %p)\n", db, view);
545 
546  r = load_streams( db );
547  if (r != ERROR_SUCCESS)
548  return r;
549 
550  if (!(sv = msi_alloc_zero( sizeof(MSISTREAMSVIEW) )))
551  return ERROR_OUTOFMEMORY;
552 
553  sv->view.ops = &streams_ops;
555  sv->db = db;
556 
557  *view = (MSIVIEW *)sv;
558 
559  return ERROR_SUCCESS;
560 }
MSIDATABASE * db
Definition: streams.c:44
#define ERROR_SUCCESS
Definition: deptool.c:10
static const MSIVIEWOPS streams_ops
Definition: streams.c:373
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
static void * msi_alloc_zero(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1148
#define NUM_STREAMS_COLS
Definition: streams.c:39
#define TRACE(s)
Definition: solgame.cpp:4
const MSIVIEWOPS * ops
Definition: msipriv.h:355
unsigned int UINT
Definition: ndis.h:50
static UINT load_streams(MSIDATABASE *db)
Definition: streams.c:445
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13
MSIVIEW view
Definition: streams.c:43

Referenced by TABLE_CreateView().

◆ TABLE_CreateView()

UINT TABLE_CreateView ( MSIDATABASE db,
LPCWSTR  name,
MSIVIEW **  view 
)

Definition at line 2189 of file table.c.

2190 {
2191  MSITABLEVIEW *tv ;
2192  UINT r, sz;
2193 
2194  TRACE("%p %s %p\n", db, debugstr_w(name), view );
2195 
2196  if ( !wcscmp( name, L"_Streams" ) )
2197  return STREAMS_CreateView( db, view );
2198  else if ( !wcscmp( name, L"_Storages" ) )
2199  return STORAGES_CreateView( db, view );
2200 
2201  sz = FIELD_OFFSET( MSITABLEVIEW, name[lstrlenW( name ) + 1] );
2202  tv = msi_alloc_zero( sz );
2203  if( !tv )
2204  return ERROR_FUNCTION_FAILED;
2205 
2206  r = get_table( db, name, &tv->table );
2207  if( r != ERROR_SUCCESS )
2208  {
2209  msi_free( tv );
2210  WARN("table not found\n");
2211  return r;
2212  }
2213 
2214  TRACE("table %p found with %d columns\n", tv->table, tv->table->col_count);
2215 
2216  /* fill the structure */
2217  tv->view.ops = &table_ops;
2218  tv->db = db;
2219  tv->columns = tv->table->colinfo;
2220  tv->num_cols = tv->table->col_count;
2222 
2223  TRACE("%s one row is %d bytes\n", debugstr_w(name), tv->row_size );
2224 
2225  *view = (MSIVIEW*) tv;
2226  lstrcpyW( tv->name, name );
2227 
2228  return ERROR_SUCCESS;
2229 }
MSICOLUMNINFO * colinfo
Definition: table.c:66
#define ERROR_SUCCESS
Definition: deptool.c:10
static UINT msi_table_get_row_size(MSIDATABASE *db, const MSICOLUMNINFO *cols, UINT count, UINT bytes_per_strref)
Definition: table.c:374
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define WARN(fmt,...)
Definition: debug.h:112
#define LONG_STR_BYTES
Definition: msipriv.h:57
MSIDATABASE * db
Definition: table.c:997
MSITABLE * table
Definition: table.c:998
UINT col_count
Definition: table.c:67
static void msi_free(void *mem)
Definition: msipriv.h:1159
#define lstrlenW
Definition: compat.h:609
static void * msi_alloc_zero(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1148
#define L(x)
Definition: ntvdm.h:50
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
UINT STORAGES_CreateView(MSIDATABASE *db, MSIVIEW **view) DECLSPEC_HIDDEN
Definition: storages.c:515
#define debugstr_w
Definition: kernel32.h:32
static const MSIVIEWOPS table_ops
Definition: table.c:2166
MSIVIEW view
Definition: table.c:996
MSICOLUMNINFO * columns
Definition: table.c:999
#define TRACE(s)
Definition: solgame.cpp:4
WCHAR name[1]
Definition: table.c:1002
const MSIVIEWOPS * ops
Definition: msipriv.h:355
static UINT get_table(MSIDATABASE *db, LPCWSTR name, MSITABLE **table_ret)
Definition: table.c:573
UINT row_size
Definition: table.c:1001
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define lstrcpyW
Definition: compat.h:608
UINT STREAMS_CreateView(MSIDATABASE *db, MSIVIEW **view) DECLSPEC_HIDDEN
Definition: streams.c:539
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
unsigned int UINT
Definition: ndis.h:50
Definition: name.c:38
UINT num_cols
Definition: table.c:1000

Referenced by ALTER_CreateView(), DROP_CreateView(), INSERT_CreateView(), merge_table(), msi_create_table(), msi_table_apply_transform(), msi_table_load_transform(), TABLE_add_column(), TABLE_drop(), TABLE_remove_column(), TransformView_Create(), UPDATE_CreateView(), and WHERE_CreateView().

◆ UPDATE_CreateView()

UINT UPDATE_CreateView ( MSIDATABASE db,
MSIVIEW **  view,
LPWSTR  table,
column_info list,
struct expr expr 
)

Definition at line 220 of file update.c.

222 {
223  MSIUPDATEVIEW *uv = NULL;
224  UINT r;
225  MSIVIEW *sv = NULL, *wv = NULL;
226 
227  TRACE("%p\n", uv );
228 
229  if (expr)
230  r = WHERE_CreateView( db, &wv, table, expr );
231  else
232  r = TABLE_CreateView( db, table, &wv );
233 
234  if( r != ERROR_SUCCESS )
235  return r;
236 
237  /* then select the columns we want */
238  r = SELECT_CreateView( db, &sv, wv, columns );
239  if( r != ERROR_SUCCESS )
240  {
241  wv->ops->delete( wv );
242  return r;
243  }
244 
245  uv = msi_alloc_zero( sizeof *uv );
246  if( !uv )
247  {
248  wv->ops->delete( wv );
249  return ERROR_FUNCTION_FAILED;
250  }
251 
252  /* fill the structure */
253  uv->view.ops = &update_ops;
254  msiobj_addref( &db->hdr );
255  uv->db = db;
256  uv->vals = columns;
257  uv->wv = sv;
258  *view = (MSIVIEW*) uv;
259 
260  return ERROR_SUCCESS;
261 }
void msiobj_addref(MSIOBJECTHDR *info)
Definition: handle.c:217
#define ERROR_SUCCESS
Definition: deptool.c:10
UINT TABLE_CreateView(MSIDATABASE *db, LPCWSTR name, MSIVIEW **view) DECLSPEC_HIDDEN
Definition: table.c:2189
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
Definition: query.h:86
static void * msi_alloc_zero(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1148
MSIVIEW * wv
Definition: update.c:45
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
column_info * vals
Definition: update.c:46
UINT SELECT_CreateView(MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table, const column_info *columns) DECLSPEC_HIDDEN
Definition: select.c:423
MSIVIEW view
Definition: update.c:43
#define TRACE(s)
Definition: solgame.cpp:4
const MSIVIEWOPS * ops
Definition: msipriv.h:355
MSIDATABASE * db
Definition: update.c:44
UINT WHERE_CreateView(MSIDATABASE *db, MSIVIEW **view, LPWSTR tables, struct expr *cond) DECLSPEC_HIDDEN
Definition: where.c:1227
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
MSIOBJECTHDR hdr
Definition: msipriv.h:108
static const MSIVIEWOPS update_ops
Definition: update.c:198

◆ WHERE_CreateView()

UINT WHERE_CreateView ( MSIDATABASE db,
MSIVIEW **  view,
LPWSTR  tables,
struct expr cond 
)

Definition at line 1227 of file where.c.

1229 {
1230  MSIWHEREVIEW *wv = NULL;
1231  UINT r, valid = 0;
1232  WCHAR *ptr;
1233 
1234  TRACE("(%s)\n", debugstr_w(tables) );
1235 
1236  wv = msi_alloc_zero( sizeof *wv );
1237  if( !wv )
1238  return ERROR_FUNCTION_FAILED;
1239 
1240  /* fill the structure */
1241  wv->view.ops = &where_ops;
1242  msiobj_addref( &db->hdr );
1243  wv->db = db;
1244  wv->cond = cond;
1245 
1246  while (*tables)
1247  {
1248  JOINTABLE *table;
1249 
1250  if ((ptr = wcschr(tables, ' ')))
1251  *ptr = '\0';
1252 
1253  table = msi_alloc(sizeof(JOINTABLE));
1254  if (!table)
1255  {
1256  r = ERROR_OUTOFMEMORY;
1257  goto end;
1258  }
1259 
1260  r = TABLE_CreateView(db, tables, &table->view);
1261  if (r != ERROR_SUCCESS)
1262  {
1263  WARN("can't create table: %s\n", debugstr_w(tables));
1264  msi_free(table);
1266  goto end;
1267  }
1268 
1269  r = table->view->ops->get_dimensions(table->view, NULL,
1270  &table->col_count);
1271  if (r != ERROR_SUCCESS)
1272  {
1273  ERR("can't get table dimensions\n");
1274  table->view->ops->delete(table->view);
1275  msi_free(table);
1276  goto end;
1277  }
1278 
1279  wv->col_count += table->col_count;
1280  table->table_index = wv->table_count++;
1281 
1282  table->next = wv->tables;
1283  wv->tables = table;
1284 
1285  if (!ptr)
1286  break;
1287 
1288  tables = ptr + 1;
1289  }
1290 
1291  if( cond )
1292  {
1293  r = WHERE_VerifyCondition( wv, cond, &valid );
1294  if( r != ERROR_SUCCESS )
1295  goto end;
1296  if( !valid ) {
1298  goto end;
1299  }
1300  }
1301 
1302  *view = (MSIVIEW*) wv;
1303 
1304  return ERROR_SUCCESS;
1305 end:
1306  WHERE_delete(&wv->view);
1307 
1308  return r;
1309 }
void msiobj_addref(MSIOBJECTHDR *info)
Definition: handle.c:217
static const MSIVIEWOPS where_ops
Definition: where.c:1115
#define ERROR_SUCCESS
Definition: deptool.c:10
UINT TABLE_CreateView(MSIDATABASE *db, LPCWSTR name, MSIVIEW **view) DECLSPEC_HIDDEN
Definition: table.c:2189
JOINTABLE * tables
Definition: where.c:67
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define WARN(fmt,...)
Definition: debug.h:112
struct nls_table * tables
Definition: nls_base.c:22
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
static void msi_free(void *mem)
Definition: msipriv.h:1159
static UINT WHERE_VerifyCondition(MSIWHEREVIEW *wv, struct expr *cond, UINT *valid)
Definition: where.c:1138
static void * msi_alloc_zero(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1148
struct expr * cond
Definition: where.c:73
UINT col_count
Definition: where.c:69
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
#define debugstr_w
Definition: kernel32.h:32
static PVOID ptr
Definition: dispmode.c:27
UINT table_count
Definition: where.c:70
static UINT WHERE_delete(struct tagMSIVIEW *view)
Definition: where.c:1035
#define TRACE(s)
Definition: solgame.cpp:4
MSIDATABASE * db
Definition: where.c:66
_CONST_RETURN wchar_t *__cdecl wcschr(_In_z_ const wchar_t *_Str, wchar_t _Ch)
__wchar_t WCHAR
Definition: xmlstorage.h:180
const MSIVIEWOPS * ops
Definition: msipriv.h:355
GLuint GLuint end
Definition: gl.h:1545
BOOLEAN valid
#define ERR(fmt,...)
Definition: debug.h:110
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1142
MSIVIEW view
Definition: where.c:65
MSIOBJECTHDR hdr
Definition: msipriv.h:108
#define ERROR_BAD_QUERY_SYNTAX
Definition: winerror.h:973
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13

Referenced by UPDATE_CreateView().