msvfw32: Replace const pointer parameter with correct pointer to const.
[wine/wine-kai.git] / dlls / msi / alter.c
blob58a6099cd0240f5593144c28ce5c013bec599d7e
1 /*
2 * Implementation of the Microsoft Installer (msi.dll)
4 * Copyright 2006 Mike McCormack
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include <stdarg.h>
23 #include "windef.h"
24 #include "winbase.h"
25 #include "winerror.h"
26 #include "wine/debug.h"
27 #include "msi.h"
28 #include "msiquery.h"
29 #include "objbase.h"
30 #include "objidl.h"
31 #include "msipriv.h"
33 #include "query.h"
35 WINE_DEFAULT_DEBUG_CHANNEL(msidb);
37 typedef struct tagMSIALTERVIEW
39 MSIVIEW view;
40 MSIDATABASE *db;
41 } MSIALTERVIEW;
43 static UINT ALTER_fetch_int( struct tagMSIVIEW *view, UINT row, UINT col, UINT *val )
45 MSIALTERVIEW *av = (MSIALTERVIEW*)view;
47 TRACE("%p %d %d %p\n", av, row, col, val );
49 return ERROR_FUNCTION_FAILED;
52 static UINT ALTER_fetch_stream( struct tagMSIVIEW *view, UINT row, UINT col, IStream **stm)
54 MSIALTERVIEW *av = (MSIALTERVIEW*)view;
56 TRACE("%p %d %d %p\n", av, row, col, stm );
58 return ERROR_FUNCTION_FAILED;
61 static UINT ALTER_execute( struct tagMSIVIEW *view, MSIRECORD *record )
63 MSIALTERVIEW *av = (MSIALTERVIEW*)view;
65 FIXME("%p %p\n", av, record);
67 return ERROR_SUCCESS;
70 static UINT ALTER_close( struct tagMSIVIEW *view )
72 MSIALTERVIEW *av = (MSIALTERVIEW*)view;
74 TRACE("%p\n", av );
76 return ERROR_SUCCESS;
79 static UINT ALTER_get_dimensions( struct tagMSIVIEW *view, UINT *rows, UINT *cols )
81 MSIALTERVIEW *av = (MSIALTERVIEW*)view;
83 TRACE("%p %p %p\n", av, rows, cols );
85 return ERROR_FUNCTION_FAILED;
88 static UINT ALTER_get_column_info( struct tagMSIVIEW *view,
89 UINT n, LPWSTR *name, UINT *type )
91 MSIALTERVIEW *av = (MSIALTERVIEW*)view;
93 TRACE("%p %d %p %p\n", av, n, name, type );
95 return ERROR_FUNCTION_FAILED;
98 static UINT ALTER_modify( struct tagMSIVIEW *view, MSIMODIFY eModifyMode,
99 MSIRECORD *rec )
101 MSIALTERVIEW *av = (MSIALTERVIEW*)view;
103 TRACE("%p %d %p\n", av, eModifyMode, rec );
105 return ERROR_FUNCTION_FAILED;
108 static UINT ALTER_delete( struct tagMSIVIEW *view )
110 MSIALTERVIEW *av = (MSIALTERVIEW*)view;
112 TRACE("%p\n", av );
113 msi_free( av );
115 return ERROR_SUCCESS;
118 static UINT ALTER_find_matching_rows( struct tagMSIVIEW *view, UINT col,
119 UINT val, UINT *row, MSIITERHANDLE *handle )
121 TRACE("%p, %d, %u, %p\n", view, col, val, *handle);
123 return ERROR_FUNCTION_FAILED;
127 static const MSIVIEWOPS alter_ops =
129 ALTER_fetch_int,
130 ALTER_fetch_stream,
131 NULL,
132 NULL,
133 ALTER_execute,
134 ALTER_close,
135 ALTER_get_dimensions,
136 ALTER_get_column_info,
137 ALTER_modify,
138 ALTER_delete,
139 ALTER_find_matching_rows
142 UINT ALTER_CreateView( MSIDATABASE *db, MSIVIEW **view, LPCWSTR name, int hold )
144 MSIALTERVIEW *av;
146 TRACE("%p\n", view );
148 av = msi_alloc_zero( sizeof *av );
149 if( !av )
150 return ERROR_FUNCTION_FAILED;
152 /* fill the structure */
153 av->view.ops = &alter_ops;
154 av->db = db;
156 *view = &av->view;
158 return ERROR_SUCCESS;