44 #define MSIFIELD_NULL 0 45 #define MSIFIELD_INT 1 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 WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
#define ERROR_INVALID_DATATYPE
#define ERROR_INVALID_PARAMETER
const WCHAR * msi_record_get_string(const MSIRECORD *rec, UINT field, int *len)
union tagMSIFIELD::@486 u
UINT MSI_RecordGetFieldCount(const MSIRECORD *rec)
MSIHANDLE WINAPI MsiCreateRecord(UINT cParams)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
void msiobj_lock(MSIOBJECTHDR *info)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
UINT WINAPI MsiRecordSetInteger(MSIHANDLE handle, UINT iField, int iVal)
UINT WINAPI MsiRecordGetStringA(MSIHANDLE handle, UINT iField, char *szValue, DWORD *pcchValue)
#define WideCharToMultiByte
#define STGM_SHARE_EXCLUSIVE
#define midl_user_allocate
int MSI_RecordGetInteger(MSIRECORD *rec, UINT iField)
static WCHAR * strdupW(const WCHAR *src)
GLdouble GLdouble GLdouble r
int WINAPI MsiRecordGetInteger(MSIHANDLE handle, UINT iField)
static UINT MSI_RecordDataSize(MSIRECORD *rec, UINT iField)
GLuint GLuint GLsizei count
#define ERROR_INVALID_HANDLE
BOOL WINAPI MsiRecordIsNull(MSIHANDLE handle, UINT iField)
UINT WINAPI MsiRecordSetStreamA(MSIHANDLE hRecord, UINT iField, const char *szFilename)
UINT WINAPI MsiRecordSetStringW(MSIHANDLE handle, UINT iField, const WCHAR *szValue)
#define INVALID_HANDLE_VALUE
DWORD WINAPI GetLastError(VOID)
GLint GLint GLint GLint GLint x
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
const WCHAR * MSI_RecordGetString(const MSIRECORD *rec, UINT iField)
static UINT msi_get_stream_size(IStream *stm)
WCHAR * msi_dup_record_field(MSIRECORD *rec, INT field)
static void msi_free(void *mem)
#define INVALID_FILE_SIZE
WCHAR * msi_strdupW(const WCHAR *value, int len)
#define ERROR_INVALID_FIELD
static UINT msi_dump_stream_to_file(IStream *stm, LPCWSTR name)
WINE_DEFAULT_DEBUG_CHANNEL(msidb)
UINT WINAPI MsiRecordGetStringW(MSIHANDLE handle, UINT iField, WCHAR *szValue, DWORD *pcchValue)
void MSI_CloseRecord(MSIOBJECTHDR *arg)
UINT MSI_RecordGetStringA(MSIRECORD *rec, UINT iField, LPSTR szValue, LPDWORD pcchValue)
void msiobj_unlock(MSIOBJECTHDR *info)
GLenum GLuint GLenum GLsizei const GLchar * buf
void * alloc_msiobject(UINT type, UINT size, msihandledestructor destroy)
UINT MSI_RecordCopyField(MSIRECORD *in_rec, UINT in_n, MSIRECORD *out_rec, UINT out_n)
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED LPLOOKUPSERVICE_COMPLETION_ROUTINE HANDLE * handle
#define ERROR_FUNCTION_FAILED
UINT WINAPI MsiRecordReadStream(MSIHANDLE handle, UINT iField, char *buf, DWORD *sz)
struct wire_record * marshal_record(MSIHANDLE handle)
UINT WINAPI MsiRecordClearData(MSIHANDLE handle)
UINT msi_record_set_string(MSIRECORD *rec, UINT field, const WCHAR *value, int len)
MSIRECORD * MSI_CreateRecord(UINT cParams)
#define MSIHANDLETYPE_RECORD
static const WCHAR valueW[]
UINT MSI_RecordSetInteger(MSIRECORD *rec, UINT iField, int iVal)
static UINT RECORD_StreamFromFile(LPCWSTR szFile, IStream **pstm)
GLboolean GLboolean GLboolean b
static void MSI_FreeField(MSIFIELD *field)
BOOL MSI_RecordsAreEqual(MSIRECORD *a, MSIRECORD *b)
UINT MSI_RecordStreamToFile(MSIRECORD *rec, UINT iField, LPCWSTR name)
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
UINT MSI_RecordSetStreamFromFileW(MSIRECORD *rec, UINT iField, LPCWSTR szFilename)
int msiobj_release(MSIOBJECTHDR *info)
void free_remote_record(struct wire_record *rec)
MSIRECORD * MSI_CloneRecord(MSIRECORD *rec)
void dump_record(MSIRECORD *rec)
UINT unmarshal_record(const struct wire_record *in, MSIHANDLE *out)
#define memcpy(s1, s2, n)
UINT MSI_RecordReadStream(MSIRECORD *rec, UINT iField, char *buf, LPDWORD sz)
struct wire_field fields[]
#define ERROR_INVALID_DATA
UINT MSI_RecordSetStringW(MSIRECORD *rec, UINT iField, LPCWSTR szValue)
UINT MSI_RecordGetIStream(MSIRECORD *rec, UINT iField, IStream **pstm)
_CRTIMP int __cdecl stat(const char *_Filename, struct stat *_Stat)
BOOL MSI_RecordIsNull(MSIRECORD *rec, UINT iField)
int WINAPI lstrlenA(LPCSTR lpString)
int WINAPIV wsprintfA(_Out_ LPSTR, _In_ _Printf_format_string_ LPCSTR,...)
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_RecordSetIStream(MSIRECORD *rec, UINT iField, IStream *stm)
UINT copy_remote_record(const struct wire_record *in, MSIHANDLE out)
#define FIELD_OFFSET(t, f)
MSIHANDLE alloc_msihandle(MSIOBJECTHDR *obj)
#define ReadFile(a, b, c, d, e)
UINT WINAPI MsiRecordSetStreamW(MSIHANDLE handle, UINT iField, const WCHAR *szFilename)
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
HRESULT WINAPI SHCreateStreamOnFileW(LPCWSTR lpszPath, DWORD dwMode, IStream **lppStream)
static BOOL string2intW(LPCWSTR str, int *out)
GLboolean GLboolean GLboolean GLboolean a
void * msihandle2msiinfo(MSIHANDLE handle, UINT type)
UINT WINAPI MsiRecordGetFieldCount(MSIHANDLE handle)
BOOL MSI_RecordsAreFieldsEqual(MSIRECORD *a, MSIRECORD *b, UINT field)
UINT WINAPI MsiRecordDataSize(MSIHANDLE handle, UINT iField)
static WCHAR * strdupAtoW(const char *str)
UINT WINAPI MsiRecordSetStringA(MSIHANDLE handle, UINT iField, const char *szValue)
UINT MSI_RecordSetStream(MSIRECORD *rec, UINT iField, IStream *stream)
_CRTIMP int __cdecl read(_In_ int _FileHandle, _Out_writes_bytes_(_MaxCharCount) void *_DstBuf, _In_ unsigned int _MaxCharCount)
UINT MSI_RecordGetStringW(MSIRECORD *rec, UINT iField, WCHAR *szValue, DWORD *pcchValue)