#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "winerror.h"
#include "ole2.h"
#include "msi.h"
#include "msiquery.h"
#include "objbase.h"
#include "msipriv.h"
#include "query.h"
#include "wine/debug.h"
Go to the source code of this file.
|
| WINE_DEFAULT_DEBUG_CHANNEL (msidb) |
|
static BOOL | storages_set_table_size (struct storages_view *sv, UINT size) |
|
static UINT | STORAGES_fetch_int (struct tagMSIVIEW *view, UINT row, UINT col, UINT *val) |
|
static UINT | STORAGES_fetch_stream (struct tagMSIVIEW *view, UINT row, UINT col, IStream **stm) |
|
static UINT | STORAGES_set_string (struct tagMSIVIEW *view, UINT row, UINT col, const WCHAR *val, int len) |
|
static HRESULT | stream_to_storage (IStream *stm, IStorage **stg) |
|
static UINT | STORAGES_set_stream (MSIVIEW *view, UINT row, UINT col, IStream *stream) |
|
static UINT | STORAGES_set_row (struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, UINT mask) |
|
static UINT | STORAGES_insert_row (struct tagMSIVIEW *view, MSIRECORD *rec, UINT row, BOOL temporary) |
|
static UINT | STORAGES_delete_row (struct tagMSIVIEW *view, UINT row) |
|
static UINT | STORAGES_execute (struct tagMSIVIEW *view, MSIRECORD *record) |
|
static UINT | STORAGES_close (struct tagMSIVIEW *view) |
|
static UINT | STORAGES_get_dimensions (struct tagMSIVIEW *view, UINT *rows, UINT *cols) |
|
static UINT | STORAGES_get_column_info (struct tagMSIVIEW *view, UINT n, LPCWSTR *name, UINT *type, BOOL *temporary, LPCWSTR *table_name) |
|
static UINT | storages_find_row (struct storages_view *sv, MSIRECORD *rec, UINT *row) |
|
static UINT | storages_modify_update (struct tagMSIVIEW *view, MSIRECORD *rec) |
|
static UINT | storages_modify_assign (struct tagMSIVIEW *view, MSIRECORD *rec) |
|
static UINT | STORAGES_modify (struct tagMSIVIEW *view, MSIMODIFY eModifyMode, MSIRECORD *rec, UINT row) |
|
static UINT | STORAGES_delete (struct tagMSIVIEW *view) |
|
static INT | add_storages_to_table (struct storages_view *sv) |
|
UINT | STORAGES_CreateView (MSIDATABASE *db, MSIVIEW **view) |
|
◆ COBJMACROS
◆ MAX_STORAGES_NAME_LEN
#define MAX_STORAGES_NAME_LEN 62 |
◆ NUM_STORAGES_COLS
◆ add_storages_to_table()
Definition at line 464 of file storages.c.
465{
471
474 return -1;
475
479 return -1;
480
482 {
484 hr = IEnumSTATSTG_Next(stgenum, 1, &
stat, &
size);
486 break;
487
488 if (
stat.type != STGTY_STORAGE)
489 {
491 continue;
492 }
493
495
497 {
499 break;
500 }
501
504
509 }
510
511 IEnumSTATSTG_Release(stgenum);
513}
GLuint GLuint GLsizei count
VOID WINAPI CoTaskMemFree(LPVOID ptr)
BOOL msi_add_string(string_table *st, const WCHAR *data, int len, BOOL persistent)
#define STGM_SHARE_EXCLUSIVE
static BOOL storages_set_table_size(struct storages_view *sv, UINT size)
struct storage * storages
Referenced by STORAGES_CreateView().
◆ STORAGES_close()
◆ STORAGES_CreateView()
Definition at line 515 of file storages.c.
516{
519
521
522 sv =
calloc(1,
sizeof(*sv));
523 if (!sv)
525
528
530 if (rows < 0)
531 {
534 }
536
538
540}
static INT add_storages_to_table(struct storages_view *sv)
static const MSIVIEWOPS storages_ops
#define ERROR_FUNCTION_FAILED
Referenced by TABLE_CreateView().
◆ STORAGES_delete()
Definition at line 421 of file storages.c.
422{
425
427
429 {
431 IStorage_Release(sv->
storages[
i].storage);
432 }
433
437
439}
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
◆ STORAGES_delete_row()
Definition at line 277 of file storages.c.
278{
281}
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
◆ STORAGES_execute()
◆ STORAGES_fetch_int()
Definition at line 72 of file storages.c.
73{
75
77
78 if (col != 1)
80
83
85
87}
#define ERROR_INVALID_PARAMETER
#define ERROR_NO_MORE_ITEMS
Referenced by storages_find_row().
◆ STORAGES_fetch_stream()
Definition at line 89 of file storages.c.
90{
92
94
97
99}
#define ERROR_INVALID_DATA
◆ storages_find_row()
Definition at line 333 of file storages.c.
334{
337
342
344 {
346
348 {
351 }
352 }
353
355}
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble r
UINT msi_string2id(const string_table *st, const WCHAR *data, int len, UINT *id)
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT)
static UINT STORAGES_fetch_int(struct tagMSIVIEW *view, UINT row, UINT col, UINT *val)
Referenced by storages_modify_assign(), and storages_modify_update().
◆ STORAGES_get_column_info()
Definition at line 307 of file storages.c.
309{
310 TRACE(
"(%p, %d, %p, %p, %p, %p)\n",
view,
n,
name,
type, temporary,
311 table_name);
312
315
317 {
318 case 1:
321 break;
322
323 case 2:
326 break;
327 }
328 if (table_name) *table_name =
L"_Storages";
329 if (temporary) *temporary =
FALSE;
331}
GLuint GLuint GLsizei GLenum type
#define NUM_STORAGES_COLS
#define MAX_STORAGES_NAME_LEN
◆ STORAGES_get_dimensions()
Definition at line 295 of file storages.c.
296{
298
299 TRACE(
"(%p, %p, %p)\n",
view, rows, cols);
300
303
305}
◆ STORAGES_insert_row()
◆ STORAGES_modify()
Definition at line 381 of file storages.c.
382{
384
385 TRACE(
"%p %d %p\n",
view, eModifyMode, rec);
386
387 switch (eModifyMode)
388 {
391 break;
392
395 break;
396
399 break;
400
410 FIXME(
"%p %d %p - mode not implemented\n",
view, eModifyMode, rec );
412 break;
413
414 default:
416 }
417
419}
#define ERROR_CALL_NOT_IMPLEMENTED
@ MSIMODIFY_INSERT_TEMPORARY
@ MSIMODIFY_VALIDATE_DELETE
@ MSIMODIFY_VALIDATE_FIELD
static UINT storages_modify_update(struct tagMSIVIEW *view, MSIRECORD *rec)
static UINT STORAGES_insert_row(struct tagMSIVIEW *view, MSIRECORD *rec, UINT row, BOOL temporary)
static UINT storages_modify_assign(struct tagMSIVIEW *view, MSIRECORD *rec)
◆ storages_modify_assign()
Definition at line 369 of file storages.c.
370{
373
377
379}
static UINT storages_find_row(struct storages_view *sv, MSIRECORD *rec, UINT *row)
Referenced by STORAGES_modify().
◆ storages_modify_update()
◆ STORAGES_set_row()
Definition at line 196 of file storages.c.
197{
204
206
209
213
216 {
217 IStream_Release(stm);
219 }
220
223 {
225 goto done;
226 }
227
230 0, 0, &substg);
232 {
234 goto done;
235 }
236
237 hr = IStorage_CopyTo(stg, 0,
NULL,
NULL, substg);
239 {
241 goto done;
242 }
243
246 IStorage_AddRef(stg);
248 if (prev) IStorage_Release(prev);
249
250done:
252
253 if (substg) IStorage_Release(substg);
254 IStorage_Release(stg);
255 IStream_Release(stm);
256
258}
UINT MSI_RecordGetIStream(MSIRECORD *, UINT, IStream **)
_Check_return_ _CRTIMP wchar_t *__cdecl wcsdup(_In_z_ const wchar_t *_Str)
static HRESULT stream_to_storage(IStream *stm, IStorage **stg)
Referenced by STORAGES_insert_row(), and storages_modify_update().
◆ STORAGES_set_stream()
Definition at line 156 of file storages.c.
157{
163
165
168
170
173 0, 0, &substg);
175 {
176 IStorage_Release(stg);
178 }
179
180 hr = IStorage_CopyTo(stg, 0,
NULL,
NULL, substg);
182 {
183 IStorage_Release(substg);
184 IStorage_Release(stg);
186 }
187 IStorage_Release(substg);
188
191 if (prev) IStorage_Release(prev);
192
194}
const WCHAR * msi_string_lookup(const string_table *st, UINT id, int *len)
◆ STORAGES_set_string()
Definition at line 101 of file storages.c.
102{
103 ERR(
"Cannot modify primary key.\n");
105}
◆ storages_set_table_size()
◆ stream_to_storage()
Definition at line 107 of file storages.c.
108{
115
116 hr = IStream_Stat(stm, &
stat, STATFLAG_NONAME);
119
120 if (
stat.cbSize.QuadPart >> 32)
121 {
122 ERR(
"Storage is too large\n");
124 }
125
130
133 goto done;
134
137 goto done;
138
142 goto done;
143
148 goto done;
149
150done:
152 if (lockbytes) ILockBytes_Release(lockbytes);
154}
HRESULT WINAPI StgOpenStorageOnILockBytes(ILockBytes *plkbyt, IStorage *pstgPriority, DWORD grfMode, SNB snbExclude, DWORD reserved, IStorage **ppstgOpen)
HRESULT WINAPI CreateILockBytesOnHGlobal(HGLOBAL global, BOOL delete_on_release, ILockBytes **ret)
#define STGM_SHARE_DENY_NONE
Referenced by STORAGES_set_row(), and STORAGES_set_stream().
◆ WINE_DEFAULT_DEBUG_CHANNEL()
WINE_DEFAULT_DEBUG_CHANNEL |
( |
msidb |
| ) |
|
◆ STORAGE
◆ storages_ops
Initial value:=
{
}
static UINT STORAGES_fetch_stream(struct tagMSIVIEW *view, UINT row, UINT col, IStream **stm)
static UINT STORAGES_execute(struct tagMSIVIEW *view, MSIRECORD *record)
static UINT STORAGES_get_column_info(struct tagMSIVIEW *view, UINT n, LPCWSTR *name, UINT *type, BOOL *temporary, LPCWSTR *table_name)
static UINT STORAGES_delete_row(struct tagMSIVIEW *view, UINT row)
static UINT STORAGES_modify(struct tagMSIVIEW *view, MSIMODIFY eModifyMode, MSIRECORD *rec, UINT row)
static UINT STORAGES_close(struct tagMSIVIEW *view)
static UINT STORAGES_delete(struct tagMSIVIEW *view)
static UINT STORAGES_set_stream(MSIVIEW *view, UINT row, UINT col, IStream *stream)
static UINT STORAGES_set_string(struct tagMSIVIEW *view, UINT row, UINT col, const WCHAR *val, int len)
static UINT STORAGES_get_dimensions(struct tagMSIVIEW *view, UINT *rows, UINT *cols)
Definition at line 441 of file storages.c.
Referenced by STORAGES_CreateView().