29 #include "wine/unicode.h" 38 #include "msiserver.h" 61 LPCWSTR col_name, haystack_table_name;
73 NULL, &haystack_table_name );
78 x |=
strcmpW( table_name, haystack_table_name );
182 for(
n = 0; (
max == 0) || (
n <
max);
n++ )
257 if ( !remote_database )
260 hr = IWineMsiRemoteDatabase_OpenView( remote_database, szQuery, phView );
261 IWineMsiRemoteDatabase_Release( remote_database );
293 ret =
view->ops->get_dimensions(
view, &row_count, &col_count);
300 if (
row >= row_count)
307 for (
i = 1;
i <= col_count;
i++)
312 ERR(
"Error getting column type for %d\n",
i);
324 IStream_Release(stm);
327 WARN(
"failed to get stream\n");
335 ERR(
"Error fetching data for %d\n",
i);
340 ERR(
"Invalid type!\n");
421 if( !
view->ops->close )
432 TRACE(
"%d\n", hView );
452 if( !
view->ops->execute )
456 return view->ops->execute(
view, rec );
465 TRACE(
"%d %d\n", hView, hRec);
496 static const WCHAR fmt[] = {
'%',
'd',0 };
541 if( !
view->ops->get_dimensions )
606 if ( !
query || !rec )
630 TRACE(
"%d %x %d\n", hView, eModifyMode, hRecord);
717 LPCWSTR szTransformFile,
int iErrorCond )
730 WARN(
"failed to open transform 0x%08x\n",
r);
734 r = IStorage_Stat( stg, &
stat, STATFLAG_NONAME );
747 IStorage_Release( stg );
753 LPCWSTR szTransformFile,
int iErrorCond)
764 if ( !remote_database )
767 IWineMsiRemoteDatabase_Release( remote_database );
768 WARN(
"MsiDatabaseApplyTransform not allowed during a custom action!\n");
779 LPCSTR szTransformFile,
int iErrorCond)
787 if( szTransformFile && !wstr )
798 LPCSTR szTransformFile,
int iReserved1,
int iReserved2 )
800 FIXME(
"%d %d %s %d %d\n", hdb, hdbref,
801 debugstr_a(szTransformFile), iReserved1, iReserved2);
806 LPCWSTR szTransformFile,
int iReserved1,
int iReserved2 )
808 FIXME(
"%d %d %s %d %d\n", hdb, hdbref,
809 debugstr_w(szTransformFile), iReserved1, iReserved2);
826 if ( !remote_database )
829 IWineMsiRemoteDatabase_Release( remote_database );
830 WARN(
"not allowed during a custom action!\n");
899 static const WCHAR sql[] = {
900 's',
'e',
'l',
'e',
'c',
't',
' ',
'*',
' ',
901 'f',
'r',
'o',
'm',
' ',
'`',
'_',
'C',
'o',
'l',
'u',
'm',
'n',
's',
'`',
' ',
902 'w',
'h',
'e',
'r',
'e',
' ',
903 '`',
'T',
'a',
'b',
'l',
'e',
'`',
' ',
'=',
' ',
'\'',
'%',
's',
'\'',0 };
921 TRACE(
"Found %d primary keys\n",
info.n );
953 if ( !remote_database )
956 hr = IWineMsiRemoteDatabase_GetPrimaryKeys( remote_database,
table, phRec );
957 IWineMsiRemoteDatabase_Release( remote_database );
1039 if ( !remote_database )
1042 hr = IWineMsiRemoteDatabase_IsTablePersistent( remote_database,
1044 IWineMsiRemoteDatabase_Release( remote_database );
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
void msiobj_addref(MSIOBJECTHDR *info)
UINT msi_table_apply_transform(MSIDATABASE *db, IStorage *stg) DECLSPEC_HIDDEN
const WCHAR * msi_string_lookup(const string_table *st, UINT id, int *len) DECLSPEC_HIDDEN
#define ERROR_INVALID_PARAMETER
#define MSIDBOPEN_READONLY
UINT WINAPI MsiViewExecute(MSIHANDLE hView, MSIHANDLE hRec)
#define LIST_FOR_EACH_SAFE(cursor, cursor2, list)
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
void msiobj_lock(MSIOBJECTHDR *info)
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
#define WideCharToMultiByte
#define ERROR_NO_MORE_ITEMS
UINT MSI_ViewGetColumnInfo(MSIQUERY *query, MSICOLINFO info, MSIRECORD **prec)
GLdouble GLdouble GLdouble r
UINT MSI_ViewExecute(MSIQUERY *query, MSIRECORD *rec)
static void MSI_CloseView(MSIOBJECTHDR *arg)
GLuint GLuint GLsizei count
UINT MSI_ViewModify(MSIQUERY *query, MSIMODIFY mode, MSIRECORD *rec)
#define ERROR_INVALID_HANDLE
UINT MSI_IterateRecords(MSIQUERY *view, LPDWORD count, record_func func, LPVOID param)
UINT WINAPI MsiDatabaseApplyTransformW(MSIHANDLE hdb, LPCWSTR szTransformFile, int iErrorCond)
#define ERROR_NOT_ENOUGH_MEMORY
void enum_stream_names(IStorage *stg) DECLSPEC_HIDDEN
#define MSITYPE_IS_BINARY(type)
GLenum GLsizei GLenum GLenum const GLvoid * table
GLint GLint GLint GLint GLint x
MSIDBERROR WINAPI MsiViewGetErrorW(MSIHANDLE handle, LPWSTR buffer, LPDWORD buflen)
UINT WINAPI MsiDatabaseOpenViewA(MSIHANDLE hdb, LPCSTR szQuery, MSIHANDLE *phView)
UINT msi_view_get_row(MSIDATABASE *db, MSIVIEW *view, UINT row, MSIRECORD **rec)
#define MSIHANDLETYPE_DATABASE
UINT WINAPI MsiDatabaseGetPrimaryKeysA(MSIHANDLE hdb, LPCSTR table, MSIHANDLE *phRec)
UINT WINAPI MsiDatabaseGenerateTransformW(MSIHANDLE hdb, MSIHANDLE hdbref, LPCWSTR szTransformFile, int iReserved1, int iReserved2)
MSIHANDLE WINAPI MsiGetLastErrorRecord(void)
MSIDBERROR WINAPI MsiViewGetErrorA(MSIHANDLE handle, LPSTR buffer, LPDWORD buflen)
UINT WINAPI MsiViewModify(MSIHANDLE hView, MSIMODIFY eModifyMode, MSIHANDLE hRecord)
MSICONDITION WINAPI MsiDatabaseIsTablePersistentA(MSIHANDLE hDatabase, LPCSTR szTableName)
void msiobj_unlock(MSIOBJECTHDR *info)
BOOL TABLE_Exists(MSIDATABASE *db, LPCWSTR name) DECLSPEC_HIDDEN
UINT WINAPI MsiViewClose(MSIHANDLE hView)
void * alloc_msiobject(UINT type, UINT size, msihandledestructor destroy)
UINT MSI_DatabaseGetPrimaryKeys(MSIDATABASE *db, LPCWSTR table, MSIRECORD **prec)
UINT MSI_RecordSetInteger(MSIRECORD *, UINT, int) DECLSPEC_HIDDEN
#define ERROR_FUNCTION_FAILED
#define HRESULT_FACILITY(hr)
UINT MSI_DatabaseOpenViewW(MSIDATABASE *db, LPCWSTR szQuery, MSIQUERY **pView)
#define MSIHANDLETYPE_RECORD
UINT WINAPI MsiDatabaseGenerateTransformA(MSIHANDLE hdb, MSIHANDLE hdbref, LPCSTR szTransformFile, int iReserved1, int iReserved2)
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
static const WCHAR szEmpty[]
static UINT msi_primary_key_iterator(MSIRECORD *rec, LPVOID param)
UINT WINAPI MsiDatabaseApplyTransformA(MSIHANDLE hdb, LPCSTR szTransformFile, int iErrorCond)
enum tagMSIDBERROR MSIDBERROR
MSICONDITION WINAPI MsiDatabaseIsTablePersistentW(MSIHANDLE hDatabase, LPCWSTR szTableName)
MSICONDITION MSI_DatabaseIsTablePersistent(MSIDATABASE *db, LPCWSTR table) DECLSPEC_HIDDEN
#define MSITYPE_LOCALIZABLE
UINT WINAPI MsiViewFetch(MSIHANDLE hView, MSIHANDLE *record)
HRESULT WINAPI StgOpenStorage(const OLECHAR *pwcsName, IStorage *pstgPriority, DWORD grfMode, SNB snbExclude, DWORD reserved, IStorage **ppstgOpen)
UINT WINAPI MsiDatabaseGetPrimaryKeysW(MSIHANDLE hdb, LPCWSTR table, MSIHANDLE *phRec)
UINT msi_commit_streams(MSIDATABASE *db) DECLSPEC_HIDDEN
int msiobj_release(MSIOBJECTHDR *info)
#define MSIHANDLETYPE_VIEW
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
UINT MSI_RecordSetIntPtr(MSIRECORD *, UINT, INT_PTR) DECLSPEC_HIDDEN
enum tagMSICOLINFO MSICOLINFO
UINT MSI_CommitTables(MSIDATABASE *db) DECLSPEC_HIDDEN
static UINT msi_set_record_type_string(MSIRECORD *rec, UINT field, UINT type, BOOL temporary)
UINT MSI_RecordSetIStream(MSIRECORD *, UINT, IStream *) DECLSPEC_HIDDEN
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
#define ERROR_INVALID_TABLE
_CRTIMP int __cdecl stat(const char *_Filename, struct stat *_Stat)
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
UINT VIEW_find_column(MSIVIEW *table, LPCWSTR name, LPCWSTR table_name, UINT *n)
INT_PTR MSI_RecordGetIntPtr(MSIRECORD *, UINT) DECLSPEC_HIDDEN
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
UINT MSI_ParseSQL(MSIDATABASE *db, LPCWSTR command, MSIVIEW **phview, struct list *mem) DECLSPEC_HIDDEN
UINT WINAPI MsiDatabaseCommit(MSIHANDLE hdb)
MSIHANDLE alloc_msihandle(MSIOBJECTHDR *obj)
WINE_DEFAULT_DEBUG_CHANNEL(msi)
enum tagMSIMODIFY MSIMODIFY
UINT msi_record_set_string(MSIRECORD *, UINT, const WCHAR *, int) DECLSPEC_HIDDEN
UINT(* record_func)(MSIRECORD *, LPVOID)
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
UINT WINAPI MsiViewGetColumnInfo(MSIHANDLE hView, MSICOLINFO info, MSIHANDLE *hRec)
static BOOL msi_free(void *mem)
UINT WINAPI MsiDatabaseOpenViewW(MSIHANDLE hdb, LPCWSTR szQuery, MSIHANDLE *phView)
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
UINT MSI_DatabaseApplyTransformW(MSIDATABASE *db, LPCWSTR szTransformFile, int iErrorCond)
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
MSIRECORD * MSI_QueryGetRecord(MSIDATABASE *db, LPCWSTR fmt,...)
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
static IOleDocumentView * view
#define ERROR_CALL_NOT_IMPLEMENTED
UINT MSI_ViewFetch(MSIQUERY *query, MSIRECORD **prec)
IUnknown * msi_get_remote(MSIHANDLE handle)
GLenum GLenum GLvoid GLvoid * column
GLuint GLuint GLsizei GLenum type
#define STGM_SHARE_DENY_WRITE
void * msihandle2msiinfo(MSIHANDLE handle, UINT type)
UINT MSI_OpenQuery(MSIDATABASE *db, MSIQUERY **view, LPCWSTR fmt,...)
static const WCHAR szType[]
static WCHAR * strdupAtoW(const char *str)
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
UINT MSI_ViewClose(MSIQUERY *query)