46#define NONAMELESSUNION
69#define PROPSETHDR_BYTEORDER_MAGIC 0xfffe
70#define PROPSETHDR_OSVER_KIND_WIN16 0
71#define PROPSETHDR_OSVER_KIND_MAC 1
72#define PROPSETHDR_OSVER_KIND_WIN32 2
74#define CP_UNICODE 1200
76#define MAX_VERSION_0_PROP_NAME_LENGTH 256
78#define CFTAG_WINDOWS (-1L)
79#define CFTAG_MACINTOSH (-2L)
80#define CFTAG_FMTID (-3L)
81#define CFTAG_NODATA 0L
132 const PROPVARIANT *propvar,
LCID targetCP,
LCID srcCP);
199 IPropertyStorage_AddRef(iface);
231 IPropertyStorage_Commit(iface, STGC_DEFAULT);
232 IStream_Release(
This->stm);
233 This->cs.DebugInfo->Spare[0] = 0;
269 &ansiName,
This->codePage);
298 const PROPSPEC rgpspec[],
299 PROPVARIANT rgpropvar[])
305 TRACE(
"(%p, %d, %p, %p)\n", iface, cpspec, rgpspec, rgpropvar);
309 if (!rgpspec || !rgpropvar)
312 for (
i = 0;
i < cpspec;
i++)
314 PropVariantInit(&rgpropvar[
i]);
315 if (rgpspec[
i].ulKind == PRSPEC_LPWSTR)
318 rgpspec[
i].
u.lpwstr);
326 switch (rgpspec[
i].
u.propid)
330 rgpropvar[
i].u.iVal =
This->codePage;
334 rgpropvar[
i].u.lVal =
This->locale;
339 rgpspec[
i].
u.propid);
360 TRACE(
"%s, %p, %d, %d\n",
405 wideStr = wideStr_tmp;
422 NULL, &defCharUsed) == 0 || defCharUsed)
433 TRACE(
"returning 0x%08x (%s)\n",
hr,
439 const PROPVARIANT *propvar,
LCID targetCP,
LCID srcCP)
448 &prop->u.pszVal, targetCP);
465 PROPID propid,
const PROPVARIANT *propvar,
LCID lcid)
482 TRACE(
"Setting 0x%08x to type %d\n", propid, propvar->vt);
492 sizeof(PROPVARIANT));
500 if (propid >
This->highestProp)
501 This->highestProp = propid;
540 TRACE(
"Adding prop name %s, propid %d\n",
555 const PROPSPEC rgpspec[],
556 const PROPVARIANT rgpropvar[],
563 TRACE(
"(%p, %d, %p, %p)\n", iface, cpspec, rgpspec, rgpropvar);
565 if (cpspec && (!rgpspec || !rgpropvar))
573 for (
i = 0;
i < cpspec;
i++)
575 if (rgpspec[
i].ulKind == PRSPEC_LPWSTR)
578 rgpspec[
i].
u.lpwstr);
588 propidNameFirst >= PID_MIN_READONLY)
604 switch (rgpspec[
i].
u.propid)
615 This->codePage = rgpropvar[
i].u.iVal;
617 This->grfFlags &= ~PROPSETFLAG_ANSI;
619 This->grfFlags |= PROPSETFLAG_ANSI;
628 This->locale = rgpropvar[
i].u.lVal;
636 if (rgpspec[
i].
u.propid >= PID_MIN_READONLY)
640 rgpspec[
i].
u.propid, &rgpropvar[
i],
GetACP());
644 if (
This->grfFlags & PROPSETFLAG_UNBUFFERED)
645 IPropertyStorage_Commit(iface, STGC_DEFAULT);
656 const PROPSPEC rgpspec[])
662 TRACE(
"(%p, %d, %p)\n", iface, cpspec, rgpspec);
664 if (cpspec && !rgpspec)
671 for (
i = 0;
i < cpspec;
i++)
673 if (rgpspec[
i].ulKind == PRSPEC_LPWSTR)
683 rgpspec[
i].u.propid < PID_MIN_READONLY)
689 if (
This->grfFlags & PROPSETFLAG_UNBUFFERED)
690 IPropertyStorage_Commit(iface, STGC_DEFAULT);
708 TRACE(
"(%p, %d, %p, %p)\n", iface, cpropid, rgpropid, rglpwstrName);
710 if (cpropid && (!rgpropid || !rglpwstrName))
729 rglpwstrName[
i] =
NULL;
748 TRACE(
"(%p, %d, %p, %p)\n", iface, cpropid, rgpropid, rglpwstrName);
750 if (cpropid && (!rgpropid || !rglpwstrName))
759 if (rgpropid[
i] != PID_ILLEGAL)
763 if (
This->grfFlags & PROPSETFLAG_UNBUFFERED)
764 IPropertyStorage_Commit(iface, STGC_DEFAULT);
781 TRACE(
"(%p, %d, %p)\n", iface, cpropid, rgpropid);
783 if (cpropid && !rgpropid)
790 for (
i = 0;
i < cpropid;
i++)
800 if (
This->grfFlags & PROPSETFLAG_UNBUFFERED)
801 IPropertyStorage_Commit(iface, STGC_DEFAULT);
811 DWORD grfCommitFlags)
816 TRACE(
"(%p, 0x%08x)\n", iface, grfCommitFlags);
838 TRACE(
"%p\n", iface);
895 if (
This->grfFlags & PROPSETFLAG_UNBUFFERED)
896 IPropertyStorage_Commit(iface, STGC_DEFAULT);
905 STATPROPSETSTG* statpsstg)
911 TRACE(
"%p, %p\n", iface, statpsstg);
916 hr = IStream_Stat(
This->stm, &
stat, STATFLAG_NONAME);
919 statpsstg->fmtid =
This->fmtid;
920 statpsstg->clsid =
This->clsid;
921 statpsstg->grfFlags =
This->grfFlags;
922 statpsstg->mtime =
stat.mtime;
923 statpsstg->ctime =
stat.ctime;
924 statpsstg->atime =
stat.atime;
925 statpsstg->dwOSVersion =
This->originatorOS;
938 if (
This->grfFlags & PROPSETFLAG_CASE_SENSITIVE)
946 if (
This->grfFlags & PROPSETFLAG_CASE_SENSITIVE)
971#ifdef WORDS_BIGENDIAN
986#define PropertyStorage_ByteSwapString(s, l)
1004 TRACE(
"Reading %d entries:\n", numEntries);
1015 TRACE(
"Reading entry with ID 0x%08x, %d bytes\n", propid, cbEntry);
1018 ptr[cbEntry - 1] =
'\0';
1028 if (cbEntry %
sizeof(
DWORD))
1037#define __thiscall_wrapper __stdcall
1039#define __thiscall_wrapper __cdecl
1067 prop->u.cVal = *(
const char *)
data;
1068 TRACE(
"Read char 0x%x ('%c')\n", prop->u.cVal, prop->u.cVal);
1071 prop->u.bVal = *
data;
1072 TRACE(
"Read byte 0x%x\n", prop->u.bVal);
1076 TRACE(
"Read bool %d\n", prop->u.boolVal);
1080 TRACE(
"Read short %d\n", prop->u.iVal);
1084 TRACE(
"Read ushort %d\n", prop->u.uiVal);
1089 TRACE(
"Read long %d\n", prop->u.lVal);
1094 TRACE(
"Read ulong %d\n", prop->u.ulVal);
1105 memcpy(&prop->u.dblVal,
data,
sizeof(
double));
1106 TRACE(
"Read double %f\n", prop->u.dblVal);
1115 WARN(
"Unicode string has odd number of bytes\n");
1120 prop->u.pszVal = allocate(allocate_data,
count);
1130 prop->u.pszVal[
count /
sizeof(
WCHAR) - 1] =
'\0';
1131 TRACE(
"Read string value %s\n",
1137 prop->u.pszVal[
count - 1] =
'\0';
1153 WARN(
"Unicode string has odd number of bytes\n");
1165 if (prop->u.bstrVal)
1172 prop->u.bstrVal[wcount - 1] =
'\0';
1185 prop->u.blob.cbSize =
count;
1186 prop->u.blob.pBlobData = allocate(allocate_data,
count);
1187 if (prop->u.blob.pBlobData)
1190 TRACE(
"Read blob value of size %d\n",
count);
1201 prop->u.pwszVal = allocate(allocate_data,
count *
sizeof(
WCHAR));
1202 if (prop->u.pwszVal)
1207 prop->u.pwszVal[
count - 1] =
'\0';
1228 prop->u.pclipdata = allocate(allocate_data,
sizeof (CLIPDATA));
1229 prop->u.pclipdata->cbSize =
len;
1230 prop->u.pclipdata->ulClipFmt =
tag;
1231 prop->u.pclipdata->pClipData = allocate(allocate_data,
len -
sizeof(prop->u.pclipdata->ulClipFmt));
1232 memcpy(prop->u.pclipdata->pClipData,
data+8,
len -
sizeof(prop->u.pclipdata->ulClipFmt));
1239 FIXME(
"unsupported type %d\n", prop->vt);
1276 TRACE(
"returning 0x%08x\n",
hr);
1305 TRACE(
"returning 0x%08x\n",
hr);
1329 cbSection), &
hdr->cbSection);
1331 cProperties), &
hdr->cProperties);
1334 TRACE(
"returning 0x%08x\n",
hr);
1349 DWORD dictOffset = 0;
1352 This->highestProp = 0;
1353 hr = IStream_Stat(
This->stm, &
stat, STATFLAG_NONAME);
1356 if (
stat.cbSize.u.HighPart)
1358 WARN(
"stream too big\n");
1363 if (
stat.cbSize.u.LowPart == 0)
1372 WARN(
"stream too small\n");
1386 WARN(
"bad magic in prop set header\n");
1390 if (
hdr.wFormat != 0 &&
hdr.wFormat != 1)
1392 WARN(
"bad format version %d\n",
hdr.wFormat);
1398 This->originatorOS =
hdr.dwOSVer;
1400 WARN(
"File comes from a Mac, strings will probably be screwed up\n");
1406 WARN(
"invalid offset %d (stream length is %d)\n", fmtOffset.
dwOffset,
1407 stat.cbSize.u.LowPart);
1424 WARN(
"section header too small, got %d\n", sectionHdr.
cbSection);
1451 idOffset->
propid < PID_MIN_READONLY && idOffset->
propid >
1461 TRACE(
"Dictionary offset is %d\n", dictOffset);
1467 PropVariantInit(&prop);
1472 TRACE(
"Read property with ID 0x%08x, type %d\n",
1473 idOffset->
propid, prop.vt);
1477 if (prop.vt ==
VT_I2)
1478 This->codePage = (
UINT)prop.u.iVal;
1485 if (prop.vt ==
VT_I4 && prop.u.lVal)
1486 This->grfFlags |= PROPSETFLAG_CASE_SENSITIVE;
1499 if (!
This->codePage)
1502 if (
This->grfFlags & PROPSETFLAG_ANSI)
1509 TRACE(
"Code page is %d, locale is %d\n",
This->codePage,
This->locale);
1570#ifdef WORDS_BIGENDIAN
1578 hr = IStream_Write(stm, leStr,
len, written);
1582 return IStream_Write(stm,
str,
len, written);
1593 const void *
value,
void *
extra,
void *closure)
1603 c->hr = IStream_Write(
This->stm, &propid,
sizeof(propid), &
count);
1606 c->bytesWritten +=
sizeof(
DWORD);
1609 DWORD keyLen, pad = 0;
1613 c->hr = IStream_Write(
This->stm, &keyLen,
sizeof(keyLen), &
count);
1616 c->bytesWritten +=
sizeof(
DWORD);
1621 c->bytesWritten += keyLen *
sizeof(
WCHAR);
1622 if (keyLen %
sizeof(
DWORD))
1624 c->hr = IStream_Write(
This->stm, &pad,
1628 c->bytesWritten +=
sizeof(
DWORD) - keyLen %
sizeof(
DWORD);
1636 c->hr = IStream_Write(
This->stm, &keyLen,
sizeof(keyLen), &
count);
1639 c->bytesWritten +=
sizeof(
DWORD);
1643 c->bytesWritten += keyLen;
1649#define SECTIONHEADER_OFFSET sizeof(PROPERTYSETHEADER) + sizeof(FORMATIDOFFSET)
1675 hr = IStream_Write(
This->stm, &propIdOffset,
sizeof(propIdOffset), &
count);
1685 hr = IStream_Write(
This->stm, &dwTemp,
sizeof(dwTemp), &
count);
1688 *sectionOffset +=
sizeof(dwTemp);
1721 TRACE(
"%p, %d, 0x%08x, (%d), (%d)\n",
This, propNum, propid,
var->vt,
1730 hr = IStream_Write(
This->stm, &propIdOffset,
sizeof(propIdOffset), &
count);
1739 hr = IStream_Write(
This->stm, &dwType,
sizeof(dwType), &
count);
1742 *sectionOffset +=
sizeof(dwType);
1752 hr = IStream_Write(
This->stm, &
var->u.cVal,
sizeof(
var->u.cVal),
1762 hr = IStream_Write(
This->stm, &wTemp,
sizeof(wTemp), &
count);
1772 hr = IStream_Write(
This->stm, &dwTemp,
sizeof(dwTemp), &
count);
1785 hr = IStream_Write(
This->stm, &dwTemp,
sizeof(dwTemp), &
count);
1797 hr = IStream_Write(
This->stm, &dwTemp,
sizeof(dwTemp), &
count);
1819 len =
var->u.pclipdata->cbSize;
1822 hr = IStream_Write(
This->stm, cf_hdr,
sizeof(cf_hdr), &
count);
1825 hr = IStream_Write(
This->stm,
var->u.pclipdata->pClipData,
1826 len -
sizeof(
var->u.pclipdata->ulClipFmt), &
count);
1842 FIXME(
"unsupported type: %d\n",
var->vt);
1869 void *
extra,
void *closure)
1890 closure.
propNum = startingPropNum;
1919 hr = IStream_Write(
This->stm, &fmtOffset,
sizeof(fmtOffset), &
count);
1922 if (
count !=
sizeof(fmtOffset))
1950 if (
This->grfFlags & PROPSETFLAG_CASE_SENSITIVE)
1962 hr = IStream_Write(
This->stm, §ionHdr,
sizeof(sectionHdr), &
count);
1978 PropVariantInit(&
var);
1997 if (
This->grfFlags & PROPSETFLAG_CASE_SENSITIVE)
2017 hr = IStream_Write(
This->stm, &dwTemp,
sizeof(dwTemp), &
count);
2043 if (!
This->name_to_propid)
2050 if (!
This->propid_to_name)
2057 if (!
This->propid_to_prop)
2082 (*pps)->cs.DebugInfo->Spare[0] = (
DWORD_PTR)(__FILE__
": PropertyStorage_impl.cs");
2084 (*pps)->fmtid = *rfmtid;
2085 (*pps)->grfMode = grfMode;
2090 (*pps)->cs.DebugInfo->Spare[0] = 0;
2095 else IStream_AddRef( stm );
2114 TRACE(
"PropertyStorage %p constructed\n", ps);
2134 if (ps->
grfFlags & PROPSETFLAG_CASE_SENSITIVE)
2137 if (ps->
grfFlags & PROPSETFLAG_ANSI)
2144 TRACE(
"PropertyStorage %p constructed\n", ps);
2178 return IStorage_AddRef( &
This->base.IStorage_iface );
2190 return IStorage_Release( &
This->base.IStorage_iface );
2199 const CLSID* pclsid,
2228 if (grfFlags & PROPSETFLAG_NONSIMPLE)
2230 FIXME(
"PROPSETFLAG_NONSIMPLE not supported\n");
2239 r = IStorage_CreateStream( &
This->base.IStorage_iface,
name, grfMode, 0, 0, &stm );
2245 IStream_Release( stm );
2248 TRACE(
"returning 0x%08x\n",
r);
2286 r = IStorage_OpenStream( &
This->base.IStorage_iface,
name, 0, grfMode, 0, &stm );
2292 IStream_Release( stm );
2295 TRACE(
"returning 0x%08x\n",
r);
2319 return IStorage_DestroyElement(&
This->base.IStorage_iface,
name);
2327 IEnumSTATPROPSETSTG** ppenum)
2337 IEnumSTATPROPSETSTG *iface,
2345 IEnumSTATPROPSETSTG *iface)
2351 IEnumSTATPROPSETSTG *iface)
2357 IEnumSTATPROPSETSTG *iface,
2359 STATPROPSETSTG *rgelt,
2360 ULONG *pceltFetched)
2366 IEnumSTATPROPSETSTG *iface,
2373 IEnumSTATPROPSETSTG *iface)
2379 IEnumSTATPROPSETSTG *iface,
2380 IEnumSTATPROPSETSTG **ppenum)
2387 IEnumSTATPROPSETSTG** ppenum)
2394 STATPROPSETSTG statpss;
2401 sizeof (STATPROPSETSTG),
2406 r = IStorage_EnumElements(stg, 0,
NULL, 0, &penum);
2416 r = IEnumSTATSTG_Next(penum, 1, &
stat, &
count);
2423 if (
stat.pwcsName[0] == 5 &&
stat.type == STGTY_STREAM)
2428 statpss.mtime =
stat.mtime;
2429 statpss.atime =
stat.atime;
2430 statpss.ctime =
stat.ctime;
2431 statpss.grfFlags =
stat.grfMode;
2432 statpss.clsid =
stat.clsid;
2437 IEnumSTATSTG_Release(penum);
2439 *ppenum = (IEnumSTATPROPSETSTG*) enumx;
2471 ULONG *pceltFetched)
2499 STATPROPSTG *src_prop = orig;
2500 STATPROPSTG *dest_prop =
dest;
2503 dest_prop->propid = src_prop->propid;
2504 dest_prop->vt = src_prop->vt;
2505 dest_prop->lpwstrName =
NULL;
2512 if (!dest_prop->lpwstrName)
return;
2521 const PROPVARIANT *prop =
v;
2525 stat.propid = propid;
2543 sizeof (STATPROPSTG),
2613 'I',
'n',
'f',
'o',
'r',
'm',
'a',
't',
'i',
'o',
'n',0 };
2615 'S',
'u',
'm',
'm',
'a',
'r',
'y',
'I',
'n',
'f',
'o',
'r',
'm',
'a',
't',
'i',
'o',
'n',0 };
2617#define BITS_PER_BYTE 8
2618#define CHARMASK 0x1f
2619#define BITS_IN_CHARMASK 5
2620#define NUM_ALPHA_CHARS 26
2637 static const char fmtMap[] =
"abcdefghijklmnopqrstuvwxyz012345";
2657 for (fmtptr = (
const BYTE *)rfmtid; fmtptr < (
const BYTE *)rfmtid +
sizeof(
FMTID); )
2669 if (bitsRemaining == 0)
2677 if (++fmtptr < (
const BYTE *)rfmtid +
sizeof(
FMTID))
2678 i |= *fmtptr << bitsRemaining;
2725 memset(rfmtid, 0,
sizeof(*rfmtid));
2743 WARN(
"invalid character (%d)\n", *pstr);
2748 *fmtptr |= wc << bitsUsed;
2757 WARN(
"extra bits\n");
2763 *fmtptr |= (
BYTE)wc;
2774#define DEFINE_STDCALL_WRAPPER(num,func,args) \
2775 __ASM_STDCALL_FUNC(func, args, \
2779 "movl (%ecx), %eax\n\t" \
2780 "jmp *(4*(" #num "))(%eax)" )
2790 return fn(
this, cbSize);
2796 USHORT CodePage, PROPVARIANT* pvar,
void* pma)
2804 FIXME(
"should raise C++ exception on failure\n");
2805 PropVariantInit(pvar);
2815 FIXME(
"%p,%d,%p,%p,%d,%d,%p\n", pvar, CodePage, pprop, pcb,
pid, fReserved, pcIndirect);
2835 if (
flags & PROPSETFLAG_NONSIMPLE)
2837 r = IUnknown_QueryInterface(unk, &IID_IStorage, (
void **)&stg);
2844 FIXME(
"PROPSETFLAG_NONSIMPLE not supported\n");
2845 IStorage_Release(stg);
2850 r = IUnknown_QueryInterface(unk, &IID_IStream, (
void **)&stm);
2857 IStream_Release( stm );
2861 TRACE(
"returning 0x%08x\n",
r);
2880 if (
flags & PROPSETFLAG_NONSIMPLE)
2882 r = IUnknown_QueryInterface(unk, &IID_IStorage, (
void **)&stg);
2889 FIXME(
"PROPSETFLAG_NONSIMPLE not supported\n");
2890 IStorage_Release(stg);
2895 r = IUnknown_QueryInterface(unk, &IID_IStream, (
void **)&stm);
2902 IStream_Release( stm );
2906 TRACE(
"returning 0x%08x\n",
r);
ACPI_SIZE strlen(const char *String)
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
#define HeapFree(x, y, z)
#define WideCharToMultiByte
#define MultiByteToWideChar
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpiA(LPCSTR str1, LPCSTR str2)
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt
BOOL dictionary_find(struct dictionary *d, const void *k, void **value)
void dictionary_enumerate(struct dictionary *d, enumeratefunc e, void *closure)
void dictionary_remove(struct dictionary *d, const void *k)
void dictionary_destroy(struct dictionary *d)
void dictionary_insert(struct dictionary *d, const void *k, const void *v)
struct dictionary * dictionary_create(comparefunc c, destroyfunc d, void *extra)
UINT dictionary_num_entries(struct dictionary *d)
HRESULT WINAPI PropVariantClear(PROPVARIANT *pvar)
HRESULT WINAPI PropVariantCopy(PROPVARIANT *pvarDest, const PROPVARIANT *pvarSrc)
#define __thiscall_wrapper
static HRESULT WINAPI IPropertySetStorage_fnOpen(IPropertySetStorage *ppstg, REFFMTID rfmtid, DWORD grfMode, IPropertyStorage **ppprstg)
static void *__thiscall_wrapper Allocate_CoTaskMemAlloc(void *this, ULONG size)
static HRESULT WINAPI IEnumSTATPROPSETSTG_fnQueryInterface(IEnumSTATPROPSETSTG *iface, REFIID riid, void **ppvObject)
#define SECTIONHEADER_OFFSET
static ULONG WINAPI IPropertyStorage_fnRelease(IPropertyStorage *iface)
static void PropertyStorage_MakeSectionHdr(DWORD cbSection, DWORD numProps, PROPERTYSECTIONHEADER *hdr)
static HRESULT PropertyStorage_WriteToStream(PropertyStorage_impl *)
static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *)
static BOOL PropertyStorage_PropertiesWriter(const void *key, const void *value, void *extra, void *closure)
static BOOL PropertyStorage_DictionaryWriter(const void *key, const void *value, void *extra, void *closure)
static HRESULT WINAPI IEnumSTATPROPSETSTG_fnClone(IEnumSTATPROPSETSTG *iface, IEnumSTATPROPSETSTG **ppenum)
static HRESULT WINAPI IEnumSTATPROPSETSTG_fnReset(IEnumSTATPROPSETSTG *iface)
static HRESULT PropertyStorage_ReadDictionary(PropertyStorage_impl *This, BYTE *ptr)
static HRESULT WINAPI IPropertyStorage_fnStat(IPropertyStorage *iface, STATPROPSETSTG *statpsstg)
static HRESULT WINAPI IPropertyStorage_fnWriteMultiple(IPropertyStorage *iface, ULONG cpspec, const PROPSPEC rgpspec[], const PROPVARIANT rgpropvar[], PROPID propidNameFirst)
static ULONG WINAPI IEnumSTATPROPSETSTG_fnRelease(IEnumSTATPROPSETSTG *iface)
static PropertyStorage_impl * impl_from_IPropertyStorage(IPropertyStorage *iface)
const IPropertySetStorageVtbl IPropertySetStorage_Vtbl
static PROPVARIANT * PropertyStorage_FindProperty(PropertyStorage_impl *This, DWORD propid)
static HRESULT WINAPI IEnumSTATPROPSETSTG_fnSkip(IEnumSTATPROPSETSTG *iface, ULONG celt)
static void prop_enum_copy_cb(IUnknown *parent, void *orig, void *dest)
static HRESULT WINAPI IEnumSTATPROPSTG_fnClone(IEnumSTATPROPSTG *iface, IEnumSTATPROPSTG **ppenum)
static int PropertyStorage_PropCompare(const void *a, const void *b, void *extra)
#define PROPSETHDR_OSVER_KIND_MAC
static HRESULT PropertStorage_WriteWStringToStream(IStream *stm, LPCWSTR str, DWORD len, DWORD *written)
static HRESULT PropertyStorage_WriteHeadersToStream(PropertyStorage_impl *This)
struct tagPROPERTYIDOFFSET PROPERTYIDOFFSET
static const WCHAR szDocSummaryInfo[]
#define PropertyStorage_ByteSwapString(s, l)
static const WCHAR szSummaryInfo[]
static HRESULT WINAPI IPropertyStorage_fnDeletePropertyNames(IPropertyStorage *iface, ULONG cpropid, const PROPID rgpropid[])
static HRESULT PropertyStorage_ConstructFromStream(IStream *stm, REFFMTID rfmtid, DWORD grfMode, IPropertyStorage **pps)
HRESULT WINAPI FmtIdToPropStgName(const FMTID *rfmtid, LPOLESTR str)
static HRESULT WINAPI IPropertyStorage_fnDeleteMultiple(IPropertyStorage *iface, ULONG cpspec, const PROPSPEC rgpspec[])
static HRESULT PropertyStorage_WriteDictionaryToStream(PropertyStorage_impl *This, DWORD *sectionOffset)
static PROPVARIANT * PropertyStorage_FindPropertyByName(PropertyStorage_impl *This, LPCWSTR name)
static HRESULT create_EnumSTATPROPSTG(PropertyStorage_impl *, IEnumSTATPROPSTG **)
static HRESULT WINAPI IPropertySetStorage_fnDelete(IPropertySetStorage *ppstg, REFFMTID rfmtid)
static HRESULT WINAPI IPropertyStorage_fnRevert(IPropertyStorage *iface)
static HRESULT PropertyStorage_WritePropertyToStream(PropertyStorage_impl *This, DWORD propNum, DWORD propid, const PROPVARIANT *var, DWORD *sectionOffset)
static HRESULT WINAPI IPropertySetStorage_fnEnum(IPropertySetStorage *ppstg, IEnumSTATPROPSETSTG **ppenum)
static HRESULT WINAPI IEnumSTATPROPSETSTG_fnNext(IEnumSTATPROPSETSTG *iface, ULONG celt, STATPROPSETSTG *rgelt, ULONG *pceltFetched)
static ULONG WINAPI IEnumSTATPROPSETSTG_fnAddRef(IEnumSTATPROPSETSTG *iface)
static HRESULT PropertyStorage_ReadProperty(PROPVARIANT *prop, const BYTE *data, UINT codepage, void *(__thiscall_wrapper *allocate)(void *this, ULONG size), void *allocate_data)
static const IEnumSTATPROPSETSTGVtbl IEnumSTATPROPSETSTG_Vtbl
static HRESULT PropertyStorage_ReadHeaderFromStream(IStream *stm, PROPERTYSETHEADER *hdr)
static HRESULT PropertyStorage_StorePropWithId(PropertyStorage_impl *This, PROPID propid, const PROPVARIANT *propvar, LCID lcid)
static HRESULT WINAPI IPropertySetStorage_fnQueryInterface(IPropertySetStorage *ppstg, REFIID riid, void **ppvObject)
static HRESULT WINAPI IPropertyStorage_fnReadMultiple(IPropertyStorage *iface, ULONG cpspec, const PROPSPEC rgpspec[], PROPVARIANT rgpropvar[])
static const IPropertyStorageVtbl IPropertyStorage_Vtbl
HRESULT WINAPI PropStgNameToFmtId(const LPOLESTR str, FMTID *rfmtid)
static HRESULT PropertyStorage_ReadFmtIdOffsetFromStream(IStream *stm, FORMATIDOFFSET *fmt)
static void PropertyStorage_PropertyDestroy(void *k, void *d, void *extra)
static ULONG WINAPI IPropertyStorage_fnAddRef(IPropertyStorage *iface)
struct tagPROPERTYSETHEADER PROPERTYSETHEADER
static LPWSTR PropertyStorage_FindPropertyNameById(PropertyStorage_impl *This, DWORD propid)
static ULONG WINAPI IEnumSTATPROPSTG_fnRelease(IEnumSTATPROPSTG *iface)
static HRESULT WINAPI IPropertyStorage_fnSetClass(IPropertyStorage *iface, REFCLSID clsid)
static HRESULT WINAPI IEnumSTATPROPSTG_fnSkip(IEnumSTATPROPSTG *iface, ULONG celt)
static HRESULT PropertyStorage_WritePropertiesToStream(PropertyStorage_impl *This, DWORD startingPropNum, DWORD *sectionOffset)
static HRESULT PropertyStorage_ReadSectionHeaderFromStream(IStream *stm, PROPERTYSECTIONHEADER *hdr)
static HRESULT WINAPI IPropertySetStorage_fnCreate(IPropertySetStorage *ppstg, REFFMTID rfmtid, const CLSID *pclsid, DWORD grfFlags, DWORD grfMode, IPropertyStorage **ppprstg)
static HRESULT PropertyStorage_BaseConstruct(IStream *stm, REFFMTID rfmtid, DWORD grfMode, PropertyStorage_impl **pps)
static BOOL prop_enum_stat(const void *k, const void *v, void *extra, void *arg)
static void PropertyStorage_MakeHeader(PropertyStorage_impl *This, PROPERTYSETHEADER *hdr)
static void PropertyStorage_MakePropertyIdOffset(DWORD propid, DWORD dwOffset, PROPERTYIDOFFSET *propIdOffset)
static StorageImpl * impl_from_IPropertySetStorage(IPropertySetStorage *iface)
static HRESULT WINAPI IPropertyStorage_fnQueryInterface(IPropertyStorage *iface, REFIID riid, void **ppvObject)
static void PropertyStorage_PropNameDestroy(void *k, void *d, void *extra)
static HRESULT WINAPI IPropertyStorage_fnWritePropertyNames(IPropertyStorage *iface, ULONG cpropid, const PROPID rgpropid[], const LPOLESTR rglpwstrName[])
static HRESULT WINAPI IPropertyStorage_fnCommit(IPropertyStorage *iface, DWORD grfCommitFlags)
struct tagFORMATIDOFFSET FORMATIDOFFSET
static ULONG WINAPI IPropertySetStorage_fnAddRef(IPropertySetStorage *ppstg)
static int PropertyStorage_PropNameCompare(const void *a, const void *b, void *extra)
static HRESULT WINAPI IEnumSTATPROPSTG_fnQueryInterface(IEnumSTATPROPSTG *iface, REFIID riid, void **ppvObject)
static HRESULT PropertyStorage_StringCopy(LPCSTR src, LCID srcCP, LPSTR *dst, LCID targetCP)
BOOLEAN WINAPI StgConvertPropertyToVariant(const SERIALIZEDPROPERTYVALUE *prop, USHORT CodePage, PROPVARIANT *pvar, void *pma)
static HRESULT PropertyStorage_CreateDictionaries(PropertyStorage_impl *)
static void PropertyStorage_DestroyDictionaries(PropertyStorage_impl *)
static HRESULT WINAPI IPropertyStorage_fnEnum(IPropertyStorage *iface, IEnumSTATPROPSTG **ppenum)
static HRESULT WINAPI IEnumSTATPROPSTG_fnNext(IEnumSTATPROPSTG *iface, ULONG celt, STATPROPSTG *rgelt, ULONG *pceltFetched)
static ULONG WINAPI IEnumSTATPROPSTG_fnAddRef(IEnumSTATPROPSTG *iface)
struct tagPROPERTYSECTIONHEADER PROPERTYSECTIONHEADER
#define PROPSETHDR_OSVER_KIND_WIN32
static HRESULT PropertyStorage_StoreNameWithId(PropertyStorage_impl *This, LPCSTR srcName, LCID cp, PROPID id)
static const IEnumSTATPROPSTGVtbl IEnumSTATPROPSTG_Vtbl
static void PropertyStorage_MakeFmtIdOffset(PropertyStorage_impl *This, FORMATIDOFFSET *fmtOffset)
static ULONG WINAPI IPropertySetStorage_fnRelease(IPropertySetStorage *ppstg)
#define PROPSETHDR_BYTEORDER_MAGIC
static HRESULT create_EnumSTATPROPSETSTG(StorageImpl *, IEnumSTATPROPSETSTG **)
SERIALIZEDPROPERTYVALUE *WINAPI StgConvertVariantToProperty(const PROPVARIANT *pvar, USHORT CodePage, SERIALIZEDPROPERTYVALUE *pprop, ULONG *pcb, PROPID pid, BOOLEAN fReserved, ULONG *pcIndirect)
static HRESULT WINAPI IPropertyStorage_fnReadPropertyNames(IPropertyStorage *iface, ULONG cpropid, const PROPID rgpropid[], LPOLESTR rglpwstrName[])
static HRESULT PropertyStorage_PropVariantCopy(PROPVARIANT *prop, const PROPVARIANT *propvar, LCID targetCP, LCID srcCP)
#define MAX_VERSION_0_PROP_NAME_LENGTH
static HRESULT PropertyStorage_ConstructEmpty(IStream *stm, REFFMTID rfmtid, DWORD grfFlags, DWORD grfMode, IPropertyStorage **pps)
static HRESULT WINAPI IEnumSTATPROPSTG_fnReset(IEnumSTATPROPSTG *iface)
static HRESULT WINAPI IPropertyStorage_fnSetTimes(IPropertyStorage *iface, const FILETIME *pctime, const FILETIME *patime, const FILETIME *pmtime)
HRESULT WINAPI StgOpenPropStg(IUnknown *unk, REFFMTID fmt, DWORD flags, DWORD reserved, IPropertyStorage **prop_stg)
static void *__cdecl Allocate_PMemoryAllocator(void *this, ULONG cbSize)
HRESULT WINAPI StgCreatePropStg(IUnknown *unk, REFFMTID fmt, const CLSID *clsid, DWORD flags, DWORD reserved, IPropertyStorage **prop_stg)
void StorageUtl_ReadGUID(const BYTE *buffer, ULONG offset, GUID *value)
void StorageUtl_WriteWord(BYTE *buffer, ULONG offset, WORD value)
void StorageUtl_ReadWord(const BYTE *buffer, ULONG offset, WORD *value)
void StorageUtl_ReadULargeInteger(const BYTE *buffer, ULONG offset, ULARGE_INTEGER *value)
void StorageUtl_WriteDWord(BYTE *buffer, ULONG offset, DWORD value)
void StorageUtl_WriteULargeInteger(BYTE *buffer, ULONG offset, const ULARGE_INTEGER *value)
void StorageUtl_WriteGUID(BYTE *buffer, ULONG offset, const GUID *value)
void StorageUtl_ReadDWord(const BYTE *buffer, ULONG offset, DWORD *value)
HRESULT WINAPI enumx_Clone(enumx_impl *iface, enumx_impl **ppenum)
ULONG WINAPI enumx_AddRef(enumx_impl *This)
void * enumx_add_element(enumx_impl *enumx, const void *data)
HRESULT WINAPI enumx_Reset(enumx_impl *This)
HRESULT WINAPI enumx_QueryInterface(enumx_impl *This, REFIID riid, void **ppvObject)
HRESULT WINAPI enumx_Skip(enumx_impl *This, ULONG celt)
enumx_impl * enumx_allocate(REFIID riid, const void *vtbl, ULONG elem_size, IUnknown *parent, enumx_copy_cb copy_cb)
ULONG WINAPI enumx_Release(enumx_impl *This)
HRESULT WINAPI enumx_Next(enumx_impl *This, ULONG celt, void *rgelt, ULONG *pceltFetched)
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble r
GLenum GLsizei GLuint GLint * bytesWritten
GLboolean GLboolean GLboolean b
GLenum GLuint GLenum GLsizei const GLchar * buf
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
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
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 WINAPI CoTaskMemFree(LPVOID ptr)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
int WINAPI lstrlenA(LPCSTR lpString)
#define memcpy(s1, s2, n)
static const DWORD padding[]
static const CLSID IPropertyStorage UINT *static const PROPSPEC PROPVARIANT *static UINT const PROPSPEC PROPVARIANT PROPID
#define LOCALE_SYSTEM_DEFAULT
_In_ DWORD _In_ DWORD dwOffset
#define STGM_SHARE_EXCLUSIVE
const FMTID FMTID_UserDefinedProperties
const FMTID FMTID_DocSummaryInformation
const FMTID FMTID_SummaryInformation
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
#define IsEqualGUID(rguid1, rguid2)
DWORD WINAPI GetVersion()
#define offsetof(TYPE, MEMBER)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
int seek(void *fd, ulong off, int mode)
struct dictionary * propid_to_name
IPropertyStorage IPropertyStorage_iface
struct dictionary * name_to_propid
struct dictionary * propid_to_prop
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
#define CONTAINING_RECORD(address, type, field)
static GLenum _GLUfuncptr fn
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
#define STG_E_INVALIDPOINTER
#define STG_E_INVALIDNAME
#define STG_E_INVALIDHEADER
#define STG_E_ACCESSDENIED
#define STG_E_INVALIDPARAMETER
#define STG_E_INVALIDFLAG
#define ERROR_NO_UNICODE_TRANSLATION
#define HRESULT_FROM_WIN32(x)
#define STG_E_INSUFFICIENTMEMORY