44#define MSIFIELD_NULL 0
46#define MSIFIELD_WSTR 3
47#define MSIFIELD_STREAM 4
60 IStream_Release(
field->
u.stream );
80 TRACE(
"%d\n", cParams);
97 TRACE(
"%d\n", cParams);
141 if( (*
p <
'0') || (*
p >
'9') )
173 if ( in_n > in_rec->
count || out_n > out_rec->
count )
175 else if ( in_rec != out_rec || in_n != out_n )
188 out->u.iVal =
in->u.iVal;
199 IStream_AddRef(
in->u.stream );
200 out->u.stream =
in->u.stream;
203 ERR(
"invalid field type %d\n",
in->type);
206 out->type =
in->type;
217 TRACE(
"%p %d\n", rec, iField );
219 if( iField > rec->
count )
282 TRACE(
"%p %u %d\n", rec, iField, iVal);
284 if( iField > rec->
count )
325 TRACE(
"%p %d\n", rec, iField );
327 r = ( iField > rec->
count ) ||
357 TRACE(
"%p %d %p %p\n", rec, iField, szValue, pcchValue);
359 if( iField > rec->
count )
361 if ( szValue && *pcchValue > 0 )
382 if( szValue && *pcchValue &&
len>*pcchValue )
383 szValue[*pcchValue-1] = 0;
388 if( szValue && *pcchValue > 0 )
396 if( szValue && *pcchValue <=
len )
408 TRACE(
"%lu, %d, %p, %p\n",
handle, iField, szValue, pcchValue );
443 TRACE(
"%p, %u, %p, %p\n", rec, iField, szValue, pcchValue );
445 if( iField > rec->
count )
447 if ( szValue && *pcchValue > 0 )
468 if( szValue && *pcchValue > 0 )
475 if( szValue && *pcchValue <=
len )
487 TRACE(
"%lu, %u, %p, %p\n",
handle, iField, szValue, pcchValue );
505 r = IStream_Stat( stm, &
stat, STATFLAG_NONAME );
508 return stat.cbSize.QuadPart;
513 TRACE(
"%p %d\n", rec, iField);
515 if( iField > rec->
count )
665 IStream_SetSize(*pstm, ulSize);
667 TRACE(
"read %s, %lu bytes into IStream %p\n",
debugstr_w(szFile), sz, *pstm );
673 if ( (iField == 0) || (iField > rec->
count) )
689 if( (iField == 0) || (iField > rec->
count) )
706 hr = IStream_Seek( stm, ofs, STREAM_SEEK_SET, &
cur );
767 TRACE(
"%p %d %p %p\n", rec, iField,
buf, sz);
772 if( iField > rec->
count)
796 IStream_Seek( stm, ofs, STREAM_SEEK_SET, &
cur );
797 IStream_Seek( stm, ofs, STREAM_SEEK_END, &
end );
799 IStream_Seek( stm, ofs, STREAM_SEEK_SET, &
cur );
800 *sz =
end.QuadPart -
cur.QuadPart;
807 r = IStream_Read( stm,
buf, *sz, &
count );
838 TRACE(
"%p %d %p\n", rec, iField, stm);
840 if( iField > rec->
count )
847 IStream_AddRef( stm );
854 TRACE(
"%p %d %p\n", rec, iField, pstm);
856 if( iField > rec->
count )
863 IStream_AddRef( *pstm );
882 r = IStream_Seek( stm,
pos, STREAM_SEEK_END, &
size );
887 r = IStream_Seek( stm,
pos, STREAM_SEEK_SET,
NULL );
894 IStream_Release(
out );
913 IStream_Release( stm );
962 switch (
a->fields[
field].type)
990 if (
a->count !=
b->count)
993 for (
i = 0;
i <=
a->count;
i++)
1021 ERR(
"failed to get string!\n");
1062 for (
i = 0;
i <=
in->count;
i++)
1064 switch (
in->fields[
i].type)
1080 ERR(
"invalid field type %d\n",
in->fields[
i].type);
1158 IStream_Release(rec->
fields[
i].u.stream);
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static WCHAR * strdupAtoW(const char *str)
#define ERROR_INVALID_PARAMETER
#define ReadFile(a, b, c, d, e)
#define INVALID_HANDLE_VALUE
#define ERROR_INVALID_HANDLE
#define WideCharToMultiByte
static const WCHAR valueW[]
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
void msiobj_lock(MSIOBJECTHDR *info)
void * alloc_msiobject(UINT type, UINT size, msihandledestructor destroy)
MSIHANDLE alloc_msihandle(MSIOBJECTHDR *obj)
int msiobj_release(MSIOBJECTHDR *info)
void * msihandle2msiinfo(MSIHANDLE handle, UINT type)
void msiobj_unlock(MSIOBJECTHDR *info)
UINT WINAPI MsiRecordClearData(MSIHANDLE handle)
UINT WINAPI MsiRecordSetStringW(MSIHANDLE handle, UINT iField, const WCHAR *szValue)
static UINT RECORD_StreamFromFile(LPCWSTR szFile, IStream **pstm)
UINT WINAPI MsiRecordDataSize(MSIHANDLE handle, UINT iField)
static UINT get_stream_size(IStream *stm)
UINT MSI_RecordSetStream(MSIRECORD *rec, UINT iField, IStream *stream)
static UINT MSI_RecordDataSize(MSIRECORD *rec, UINT iField)
UINT MSI_RecordGetIStream(MSIRECORD *rec, UINT iField, IStream **pstm)
WCHAR * msi_dup_record_field(MSIRECORD *rec, INT field)
UINT MSI_RecordStreamToFile(MSIRECORD *rec, UINT iField, LPCWSTR name)
UINT MSI_RecordSetStringW(MSIRECORD *rec, UINT iField, LPCWSTR szValue)
int WINAPI MsiRecordGetInteger(MSIHANDLE handle, UINT iField)
UINT MSI_RecordCopyField(MSIRECORD *in_rec, UINT in_n, MSIRECORD *out_rec, UINT out_n)
UINT WINAPI MsiRecordSetStreamW(MSIHANDLE handle, UINT iField, const WCHAR *szFilename)
UINT WINAPI MsiRecordGetStringA(MSIHANDLE handle, UINT iField, char *szValue, DWORD *pcchValue)
MSIHANDLE WINAPI MsiCreateRecord(UINT cParams)
MSIRECORD * MSI_CloneRecord(MSIRECORD *rec)
UINT copy_remote_record(const struct wire_record *in, MSIHANDLE out)
UINT MSI_RecordReadStream(MSIRECORD *rec, UINT iField, char *buf, LPDWORD sz)
UINT msi_record_set_string(MSIRECORD *rec, UINT field, const WCHAR *value, int len)
UINT WINAPI MsiRecordGetStringW(MSIHANDLE handle, UINT iField, WCHAR *szValue, DWORD *pcchValue)
BOOL MSI_RecordsAreFieldsEqual(MSIRECORD *a, MSIRECORD *b, UINT field)
UINT MSI_RecordSetInteger(MSIRECORD *rec, UINT iField, int iVal)
static UINT dump_stream_to_file(IStream *stm, const WCHAR *name)
BOOL WINAPI MsiRecordIsNull(MSIHANDLE handle, UINT iField)
MSIRECORD * MSI_CreateRecord(UINT cParams)
void MSI_CloseRecord(MSIOBJECTHDR *arg)
void dump_record(MSIRECORD *rec)
UINT MSI_RecordSetStreamFromFileW(MSIRECORD *rec, UINT iField, LPCWSTR szFilename)
UINT MSI_RecordGetStringA(MSIRECORD *rec, UINT iField, LPSTR szValue, LPDWORD pcchValue)
void free_remote_record(struct wire_record *rec)
BOOL MSI_RecordsAreEqual(MSIRECORD *a, MSIRECORD *b)
int MSI_RecordGetInteger(MSIRECORD *rec, UINT iField)
WCHAR * msi_strdupW(const WCHAR *value, int len)
UINT WINAPI MsiRecordSetInteger(MSIHANDLE handle, UINT iField, int iVal)
UINT MSI_RecordSetIStream(MSIRECORD *rec, UINT iField, IStream *stm)
struct wire_record * marshal_record(MSIHANDLE handle)
UINT WINAPI MsiRecordSetStreamA(MSIHANDLE hRecord, UINT iField, const char *szFilename)
const WCHAR * msi_record_get_string(const MSIRECORD *rec, UINT field, int *len)
UINT WINAPI MsiRecordSetStringA(MSIHANDLE handle, UINT iField, const char *szValue)
const WCHAR * MSI_RecordGetString(const MSIRECORD *rec, UINT iField)
UINT MSI_RecordGetStringW(MSIRECORD *rec, UINT iField, WCHAR *szValue, DWORD *pcchValue)
UINT WINAPI MsiRecordReadStream(MSIHANDLE handle, UINT iField, char *buf, DWORD *sz)
UINT WINAPI MsiRecordGetFieldCount(MSIHANDLE handle)
static BOOL string2intW(LPCWSTR str, int *out)
UINT unmarshal_record(const struct wire_record *in, MSIHANDLE *out)
static void MSI_FreeField(MSIFIELD *field)
BOOL MSI_RecordIsNull(MSIRECORD *rec, UINT iField)
UINT MSI_RecordGetFieldCount(const MSIRECORD *rec)
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
HRESULT WINAPI SHCreateStreamOnFileW(LPCWSTR lpszPath, DWORD dwMode, IStream **lppStream)
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLdouble GLdouble GLdouble r
GLboolean GLboolean GLboolean b
GLenum GLuint GLenum GLsizei const GLchar * buf
GLboolean GLboolean GLboolean GLboolean a
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
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
int WINAPI lstrlenA(LPCSTR lpString)
#define memcpy(s1, s2, n)
#define MSIHANDLETYPE_RECORD
#define STGM_SHARE_EXCLUSIVE
_Check_return_ _CRTIMP wchar_t *__cdecl wcsdup(_In_z_ const wchar_t *_Str)
#define midl_user_allocate
union tagMSIFIELD::@500 u
struct wire_field fields[]
#define FIELD_OFFSET(t, f)
DWORD WINAPI GetLastError(void)
#define INVALID_FILE_SIZE
#define ERROR_INVALID_DATATYPE
#define ERROR_FUNCTION_FAILED
#define ERROR_INVALID_FIELD
#define ERROR_INVALID_DATA
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
int WINAPIV wsprintfA(_Out_ LPSTR, _In_ _Printf_format_string_ LPCSTR,...)