36 #include "wine/unicode.h" 40 #define NUM_STREAMS_COLS 2 102 IStream_AddRef( *stm );
146 IStream_Release(
new );
149 if (old) IStream_Release( old );
221 hr = IStorage_DestroyElement( db->
storage, encname );
252 TRACE(
"(%p, %p, %p)\n",
view, rows, cols);
265 TRACE(
"(%p, %d, %p, %p, %p, %p)\n",
view,
n,
name,
type, temporary, table_name);
283 if (temporary) *temporary =
FALSE;
315 TRACE(
"%p %d %p\n",
view, eModifyMode, rec);
343 FIXME(
"%p %d %p - mode not implemented\n",
view, eModifyMode, rec );
474 hr = IStorage_EnumElements( db->
storage, 0,
NULL, 0, &stgenum );
481 hr = IEnumSTATSTG_Next( stgenum, 1, &
stat, &
count );
486 if (
stat.type != STGTY_STREAM || *
stat.pwcsName == 0x4840)
503 ERR(
"unable to open stream %08x\n",
hr);
514 IEnumSTATSTG_Release( stgenum );
535 IStream_AddRef( *
ret );
550 IStream_Release( *
ret );
554 IStream_AddRef( *
ret );
589 hr = IStream_Stat(
src, &
stat, STATFLAG_NONAME );
592 hr = IStream_SetSize(
dst,
stat.cbSize );
605 WARN(
"failed to read stream: %08x\n",
hr);
615 WARN(
"failed to write stream: %08x\n",
hr);
619 if (!
stat.cbSize.QuadPart)
break;
646 ERR(
"failed to write stream %s (hr = %08x)\n",
debugstr_w(encname),
hr);
648 IStream_Release(
stream );
652 IStream_Release(
stream );
655 ERR(
"failed to commit stream %s (hr = %08x)\n",
debugstr_w(encname),
hr);
662 ERR(
"failed to create stream %s (hr = %08x)\n",
debugstr_w(encname),
hr);
const WCHAR * msi_string_lookup(const string_table *st, UINT id, int *len) DECLSPEC_HIDDEN
#define ERROR_INVALID_PARAMETER
struct tagMSISTREAMSVIEW MSISTREAMSVIEW
UINT STREAMS_CreateView(MSIDATABASE *db, MSIVIEW **view)
VOID WINAPI CoTaskMemFree(LPVOID ptr)
#define ERROR_NO_MORE_ITEMS
#define STGM_SHARE_EXCLUSIVE
static HRESULT write_stream(IStream *dst, IStream *src)
static const MSIVIEWOPS streams_ops
static MSISTREAM * find_stream(MSIDATABASE *db, const WCHAR *name)
GLdouble GLdouble GLdouble r
static UINT STREAMS_modify(struct tagMSIVIEW *view, MSIMODIFY eModifyMode, MSIRECORD *rec, UINT row)
GLuint GLuint GLsizei count
static const WCHAR szData[]
UINT MSI_RecordGetIStream(MSIRECORD *, UINT, IStream **) DECLSPEC_HIDDEN
BOOL msi_add_string(string_table *st, const WCHAR *data, int len, enum StringPersistence persistence) DECLSPEC_HIDDEN
UINT num_streams_allocated
static UINT STREAMS_find_matching_rows(struct tagMSIVIEW *view, UINT col, UINT val, UINT *row, MSIITERHANDLE *handle)
static HRESULT open_stream(MSIDATABASE *db, const WCHAR *name, IStream **stream)
static void * msi_alloc_zero(size_t len) __WINE_ALLOC_SIZE(1)
static UINT STREAMS_set_row(struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, UINT mask)
GLenum GLuint GLenum GLsizei const GLchar * buf
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
#define ERROR_FUNCTION_FAILED
static UINT streams_find_row(MSISTREAMSVIEW *sv, MSIRECORD *rec, UINT *row)
WINE_DEFAULT_DEBUG_CHANNEL(msidb)
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
static UINT STREAMS_execute(struct tagMSIVIEW *view, MSIRECORD *record)
static UINT STREAMS_get_dimensions(struct tagMSIVIEW *view, UINT *rows, UINT *cols)
#define MAX_STREAM_NAME_LEN
#define STG_E_FILEALREADYEXISTS
UINT msi_string2id(const string_table *st, const WCHAR *data, int len, UINT *id) DECLSPEC_HIDDEN
LPWSTR encode_streamname(BOOL bTable, LPCWSTR in) DECLSPEC_HIDDEN
int JSAMPARRAY int int num_rows
static UINT STREAMS_get_column_info(struct tagMSIVIEW *view, UINT n, LPCWSTR *name, UINT *type, BOOL *temporary, LPCWSTR *table_name)
UINT msi_commit_streams(MSIDATABASE *db)
#define ERROR_INVALID_DATA
static UINT streams_modify_assign(struct tagMSIVIEW *view, MSIRECORD *rec)
static UINT STREAMS_fetch_int(struct tagMSIVIEW *view, UINT row, UINT col, UINT *val)
_CRTIMP int __cdecl stat(const char *_Filename, struct stat *_Stat)
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
BOOL decode_streamname(LPCWSTR in, LPWSTR out) DECLSPEC_HIDDEN
static UINT STREAMS_fetch_stream(struct tagMSIVIEW *view, UINT row, UINT col, IStream **stm)
enum tagMSIMODIFY MSIMODIFY
static const WCHAR szStreams[]
static UINT append_stream(MSIDATABASE *db, const WCHAR *name, IStream *stream)
UINT msi_view_get_row(MSIDATABASE *, MSIVIEW *, UINT, MSIRECORD **) DECLSPEC_HIDDEN
static UINT STREAMS_insert_row(struct tagMSIVIEW *view, MSIRECORD *rec, UINT row, BOOL temporary)
UINT msi_get_stream(MSIDATABASE *db, const WCHAR *name, IStream **ret)
static UINT streams_modify_update(struct tagMSIVIEW *view, MSIRECORD *rec)
static BOOL msi_free(void *mem)
static const WCHAR szName[]
#define ERROR_CALL_NOT_IMPLEMENTED
static UINT STREAMS_delete_row(struct tagMSIVIEW *view, UINT row)
GLuint GLenum GLenum transform
static UINT STREAMS_get_row(struct tagMSIVIEW *view, UINT row, MSIRECORD **rec)
static void * msi_realloc_zero(void *mem, size_t len) __WINE_ALLOC_SIZE(2)
GLuint GLuint GLsizei GLenum type
static BOOL streams_resize_table(MSIDATABASE *db, UINT size)
static UINT STREAMS_delete(struct tagMSIVIEW *view)
static UINT load_streams(MSIDATABASE *db)
static UINT STREAMS_close(struct tagMSIVIEW *view)
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
GLuint const GLchar * name