From: Fabian Maurer dark.shadow4@web.de
--- dlls/coml2/coml2.spec | 2 +- dlls/coml2/storage32.c | 22 ++++++++++++++++++++++ dlls/ole32/storage32.c | 22 ---------------------- 3 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/dlls/coml2/coml2.spec b/dlls/coml2/coml2.spec index 9f20fdd525b..d6b24669f22 100644 --- a/dlls/coml2/coml2.spec +++ b/dlls/coml2/coml2.spec @@ -23,7 +23,7 @@ @ stub StgCreatePropStg @ stub StgCreateStorageEx @ stub StgIsStorageFile -@ stub StgIsStorageILockBytes +@ stdcall StgIsStorageILockBytes(ptr) @ stub StgOpenPropStg @ stub StgOpenStorage @ stub StgOpenStorageEx diff --git a/dlls/coml2/storage32.c b/dlls/coml2/storage32.c index 8ce9f68524f..873e9fea0e1 100644 --- a/dlls/coml2/storage32.c +++ b/dlls/coml2/storage32.c @@ -50,6 +50,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(storage);
+static const BYTE STORAGE_magic[8] ={0xd0,0xcf,0x11,0xe0,0xa1,0xb1,0x1a,0xe1}; + /*********************************************************************** * WriteClassStg [coml2.@] */ @@ -162,3 +164,23 @@ HRESULT WINAPI GetConvertStg(IStorage *stg)
return header[1] & OleStream_Convert ? S_OK : S_FALSE; } + +/****************************************************************************** + * StgIsStorageILockBytes [coml2.@] + */ +HRESULT WINAPI StgIsStorageILockBytes(ILockBytes *plkbyt) +{ + BYTE sig[sizeof(STORAGE_magic)]; + ULARGE_INTEGER offset; + ULONG read = 0; + + offset.HighPart = 0; + offset.LowPart = 0; + + ILockBytes_ReadAt(plkbyt, offset, sig, sizeof(sig), &read); + + if (read == sizeof(sig) && memcmp(sig, STORAGE_magic, sizeof(sig)) == 0) + return S_OK; + + return S_FALSE; +} diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 3335186ff90..496159773a3 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -9004,28 +9004,6 @@ HRESULT WINAPI StgSetTimes(OLECHAR const *str, FILETIME const *pctime, return r; }
-/****************************************************************************** - * StgIsStorageILockBytes [OLE32.@] - * - * Determines if the ILockBytes contains a storage object. - */ -HRESULT WINAPI StgIsStorageILockBytes(ILockBytes *plkbyt) -{ - BYTE sig[sizeof(STORAGE_magic)]; - ULARGE_INTEGER offset; - ULONG read = 0; - - offset.HighPart = 0; - offset.LowPart = 0; - - ILockBytes_ReadAt(plkbyt, offset, sig, sizeof(sig), &read); - - if (read == sizeof(sig) && memcmp(sig, STORAGE_magic, sizeof(sig)) == 0) - return S_OK; - - return S_FALSE; -} - /*********************************************************************** * OleLoadFromStream (OLE32.@) *
From: Fabian Maurer dark.shadow4@web.de
--- dlls/coml2/coml2.spec | 2 +- dlls/coml2/storage32.c | 42 ++++++++++++++++++++++++++++++++++++ dlls/ole32/storage32.c | 49 ------------------------------------------ 3 files changed, 43 insertions(+), 50 deletions(-)
diff --git a/dlls/coml2/coml2.spec b/dlls/coml2/coml2.spec index d6b24669f22..364413dbf4d 100644 --- a/dlls/coml2/coml2.spec +++ b/dlls/coml2/coml2.spec @@ -22,7 +22,7 @@ @ stub StgCreatePropSetStg @ stub StgCreatePropStg @ stub StgCreateStorageEx -@ stub StgIsStorageFile +@ stdcall StgIsStorageFile(wstr) @ stdcall StgIsStorageILockBytes(ptr) @ stub StgOpenPropStg @ stub StgOpenStorage diff --git a/dlls/coml2/storage32.c b/dlls/coml2/storage32.c index 873e9fea0e1..dd803c817c9 100644 --- a/dlls/coml2/storage32.c +++ b/dlls/coml2/storage32.c @@ -184,3 +184,45 @@ HRESULT WINAPI StgIsStorageILockBytes(ILockBytes *plkbyt)
return S_FALSE; } + +/****************************************************************************** + * StgIsStorageFile [coml2.@] + */ +HRESULT WINAPI StgIsStorageFile(LPCOLESTR fn) +{ + HANDLE hf; + BYTE magic[8]; + DWORD bytes_read; + + TRACE("%s\n", debugstr_w(fn)); + hf = CreateFileW(fn, GENERIC_READ, + FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); + + if (hf == INVALID_HANDLE_VALUE) + return STG_E_FILENOTFOUND; + + if (!ReadFile(hf, magic, 8, &bytes_read, NULL)) + { + WARN(" unable to read file\n"); + CloseHandle(hf); + return S_FALSE; + } + + CloseHandle(hf); + + if (bytes_read != 8) + { + TRACE(" too short\n"); + return S_FALSE; + } + + if (!memcmp(magic, STORAGE_magic, 8)) + { + TRACE(" -> YES\n"); + return S_OK; + } + + TRACE(" -> Invalid header.\n"); + return S_FALSE; +} diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 496159773a3..f0ec0b5e954 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -9339,55 +9339,6 @@ end: return r; }
-/****************************************************************************** - * StgIsStorageFile [OLE32.@] - * Verify if the file contains a storage object - * - * PARAMS - * fn [ I] Filename - * - * RETURNS - * S_OK if file has magic bytes as a storage object - * S_FALSE if file is not storage - */ -HRESULT WINAPI -StgIsStorageFile(LPCOLESTR fn) -{ - HANDLE hf; - BYTE magic[8]; - DWORD bytes_read; - - TRACE("%s\n", debugstr_w(fn)); - hf = CreateFileW(fn, GENERIC_READ, - FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); - - if (hf == INVALID_HANDLE_VALUE) - return STG_E_FILENOTFOUND; - - if (!ReadFile(hf, magic, 8, &bytes_read, NULL)) - { - WARN(" unable to read file\n"); - CloseHandle(hf); - return S_FALSE; - } - - CloseHandle(hf); - - if (bytes_read != 8) { - TRACE(" too short\n"); - return S_FALSE; - } - - if (!memcmp(magic,STORAGE_magic,8)) { - TRACE(" -> YES\n"); - return S_OK; - } - - TRACE(" -> Invalid header.\n"); - return S_FALSE; -} - /************************************************************************ * OleConvert Functions ***********************************************************************/
From: Fabian Maurer dark.shadow4@web.de
--- dlls/coml2/Makefile.in | 1 + dlls/coml2/coml2.spec | 2 +- dlls/coml2/stg_prop.c | 124 +++++++++++++++++++++++++++++++++++++++++ dlls/ole32/stg_prop.c | 67 ---------------------- 4 files changed, 126 insertions(+), 68 deletions(-) create mode 100644 dlls/coml2/stg_prop.c
diff --git a/dlls/coml2/Makefile.in b/dlls/coml2/Makefile.in index 5aa96ded363..739f791d4c5 100644 --- a/dlls/coml2/Makefile.in +++ b/dlls/coml2/Makefile.in @@ -5,4 +5,5 @@ IMPORTS = uuid
SOURCES = \ memlockbytes.c \ + stg_prop.c \ storage32.c diff --git a/dlls/coml2/coml2.spec b/dlls/coml2/coml2.spec index 364413dbf4d..eea1f4332f4 100644 --- a/dlls/coml2/coml2.spec +++ b/dlls/coml2/coml2.spec @@ -11,7 +11,7 @@ @ stub Coml2DllGetClassObject @ stdcall CreateILockBytesOnHGlobal(ptr long ptr) @ stub DllGetClassObject -@ stub FmtIdToPropStgName +@ stdcall FmtIdToPropStgName(ptr wstr) @ stdcall GetConvertStg(ptr) @ stdcall GetHGlobalFromILockBytes(ptr ptr) @ stub PropStgNameToFmtId diff --git a/dlls/coml2/stg_prop.c b/dlls/coml2/stg_prop.c new file mode 100644 index 00000000000..3e1e23dfb5a --- /dev/null +++ b/dlls/coml2/stg_prop.c @@ -0,0 +1,124 @@ +/* + * Compound Storage (32 bit version) + * Storage implementation + * + * This file contains the compound file implementation + * of the storage interface. + * + * Copyright 1999 Francis Beaudet + * Copyright 1999 Sylvain St-Germain + * Copyright 1999 Thuy Nguyen + * Copyright 2005 Mike McCormack + * Copyright 2005 Juan Lang + * Copyright 2006 Mike McCormack + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + * TODO: + * - I don't honor the maximum property set size. + * - Certain bogus files could result in reading past the end of a buffer. + * - Mac-generated files won't be read correctly, even if they're little + * endian, because I disregard whether the generator was a Mac. This means + * strings will probably be munged (as I don't understand Mac scripts.) + * - Not all PROPVARIANT types are supported. + * - User defined properties are not supported, see comment in + * PropertyStorage_ReadFromStream + */ + +#include <assert.h> +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#define COBJMACROS +#include "windef.h" +#include "winbase.h" +#include "winnls.h" +#include "winuser.h" +#include "wine/asm.h" +#include "wine/debug.h" +#include "wine/heap.h" +#include "oleauto.h" + +WINE_DEFAULT_DEBUG_CHANNEL(storage); + +/*********************************************************************** + * Format ID <-> name conversion + */ +static const WCHAR szSummaryInfo[] = L"\5SummaryInformation"; +static const WCHAR szDocSummaryInfo[] = L"\5DocumentSummaryInformation"; + +#define BITS_PER_BYTE 8 +#define CHARMASK 0x1f +#define BITS_IN_CHARMASK 5 +#define NUM_ALPHA_CHARS 26 + +/*********************************************************************** + * FmtIdToPropStgName [coml2.@] + */ +HRESULT WINAPI FmtIdToPropStgName(const FMTID *rfmtid, LPOLESTR str) +{ + static const char fmtMap[] = "abcdefghijklmnopqrstuvwxyz012345"; + + TRACE("%s, %p\n", debugstr_guid(rfmtid), str); + + if (!rfmtid) return E_INVALIDARG; + if (!str) return E_INVALIDARG; + + if (IsEqualGUID(&FMTID_SummaryInformation, rfmtid)) + lstrcpyW(str, szSummaryInfo); + else if (IsEqualGUID(&FMTID_DocSummaryInformation, rfmtid)) + lstrcpyW(str, szDocSummaryInfo); + else if (IsEqualGUID(&FMTID_UserDefinedProperties, rfmtid)) + lstrcpyW(str, szDocSummaryInfo); + else + { + const BYTE *fmtptr; + WCHAR *pstr = str; + ULONG bitsRemaining = BITS_PER_BYTE; + + *pstr++ = 5; + for (fmtptr = (const BYTE *)rfmtid; fmtptr < (const BYTE *)rfmtid + sizeof(FMTID); ) + { + ULONG i = *fmtptr >> (BITS_PER_BYTE - bitsRemaining); + + if (bitsRemaining >= BITS_IN_CHARMASK) + { + *pstr = (WCHAR)(fmtMap[i & CHARMASK]); + if (bitsRemaining == BITS_PER_BYTE && *pstr >= 'a' && + *pstr <= 'z') + *pstr += 'A' - 'a'; + pstr++; + bitsRemaining -= BITS_IN_CHARMASK; + if (bitsRemaining == 0) + { + fmtptr++; + bitsRemaining = BITS_PER_BYTE; + } + } + else + { + if (++fmtptr < (const BYTE *)rfmtid + sizeof(FMTID)) + i |= *fmtptr << bitsRemaining; + *pstr++ = (WCHAR)(fmtMap[i & CHARMASK]); + bitsRemaining += BITS_PER_BYTE - BITS_IN_CHARMASK; + } + } + *pstr = 0; + } + TRACE("returning %s\n", debugstr_w(str)); + return S_OK; +} diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c index 8bc159c7dd5..db998e6d30a 100644 --- a/dlls/ole32/stg_prop.c +++ b/dlls/ole32/stg_prop.c @@ -3005,73 +3005,6 @@ static const WCHAR szDocSummaryInfo[] = L"\5DocumentSummaryInformation"; #define BITS_IN_CHARMASK 5 #define NUM_ALPHA_CHARS 26
-/*********************************************************************** - * FmtIdToPropStgName [ole32.@] - * Returns the storage name of the format ID rfmtid. - * PARAMS - * rfmtid [I] Format ID for which to return a storage name - * str [O] Storage name associated with rfmtid. - * - * RETURNS - * E_INVALIDARG if rfmtid or str i NULL, S_OK otherwise. - * - * NOTES - * str must be at least CCH_MAX_PROPSTG_NAME characters in length. - */ -HRESULT WINAPI FmtIdToPropStgName(const FMTID *rfmtid, LPOLESTR str) -{ - static const char fmtMap[] = "abcdefghijklmnopqrstuvwxyz012345"; - - TRACE("%s, %p\n", debugstr_guid(rfmtid), str); - - if (!rfmtid) return E_INVALIDARG; - if (!str) return E_INVALIDARG; - - if (IsEqualGUID(&FMTID_SummaryInformation, rfmtid)) - lstrcpyW(str, szSummaryInfo); - else if (IsEqualGUID(&FMTID_DocSummaryInformation, rfmtid)) - lstrcpyW(str, szDocSummaryInfo); - else if (IsEqualGUID(&FMTID_UserDefinedProperties, rfmtid)) - lstrcpyW(str, szDocSummaryInfo); - else - { - const BYTE *fmtptr; - WCHAR *pstr = str; - ULONG bitsRemaining = BITS_PER_BYTE; - - *pstr++ = 5; - for (fmtptr = (const BYTE *)rfmtid; fmtptr < (const BYTE *)rfmtid + sizeof(FMTID); ) - { - ULONG i = *fmtptr >> (BITS_PER_BYTE - bitsRemaining); - - if (bitsRemaining >= BITS_IN_CHARMASK) - { - *pstr = (WCHAR)(fmtMap[i & CHARMASK]); - if (bitsRemaining == BITS_PER_BYTE && *pstr >= 'a' && - *pstr <= 'z') - *pstr += 'A' - 'a'; - pstr++; - bitsRemaining -= BITS_IN_CHARMASK; - if (bitsRemaining == 0) - { - fmtptr++; - bitsRemaining = BITS_PER_BYTE; - } - } - else - { - if (++fmtptr < (const BYTE *)rfmtid + sizeof(FMTID)) - i |= *fmtptr << bitsRemaining; - *pstr++ = (WCHAR)(fmtMap[i & CHARMASK]); - bitsRemaining += BITS_PER_BYTE - BITS_IN_CHARMASK; - } - } - *pstr = 0; - } - TRACE("returning %s\n", debugstr_w(str)); - return S_OK; -} - /*********************************************************************** * PropStgNameToFmtId [ole32.@] * Returns the format ID corresponding to the given name.
From: Fabian Maurer dark.shadow4@web.de
--- dlls/coml2/coml2.spec | 2 +- dlls/coml2/stg_prop.c | 75 ++++++++++++++++++++++++++++++++++ dlls/ole32/stg_prop.c | 94 ------------------------------------------- 3 files changed, 76 insertions(+), 95 deletions(-)
diff --git a/dlls/coml2/coml2.spec b/dlls/coml2/coml2.spec index eea1f4332f4..694790350cc 100644 --- a/dlls/coml2/coml2.spec +++ b/dlls/coml2/coml2.spec @@ -14,7 +14,7 @@ @ stdcall FmtIdToPropStgName(ptr wstr) @ stdcall GetConvertStg(ptr) @ stdcall GetHGlobalFromILockBytes(ptr ptr) -@ stub PropStgNameToFmtId +@ stdcall PropStgNameToFmtId(wstr ptr) @ stdcall ReadClassStg(ptr ptr) @ stdcall ReadClassStm(ptr ptr) @ stub StgCreateDocfile diff --git a/dlls/coml2/stg_prop.c b/dlls/coml2/stg_prop.c index 3e1e23dfb5a..93d658c2a0a 100644 --- a/dlls/coml2/stg_prop.c +++ b/dlls/coml2/stg_prop.c @@ -122,3 +122,78 @@ HRESULT WINAPI FmtIdToPropStgName(const FMTID *rfmtid, LPOLESTR str) TRACE("returning %s\n", debugstr_w(str)); return S_OK; } + +/*********************************************************************** + * PropStgNameToFmtId [coml2.@] + */ +HRESULT WINAPI PropStgNameToFmtId(const LPOLESTR str, FMTID *rfmtid) +{ + HRESULT hr = STG_E_INVALIDNAME; + + TRACE("%s, %p\n", debugstr_w(str), rfmtid); + + if (!rfmtid) return E_INVALIDARG; + if (!str) return STG_E_INVALIDNAME; + + if (!lstrcmpiW(str, szDocSummaryInfo)) + { + *rfmtid = FMTID_DocSummaryInformation; + hr = S_OK; + } + else if (!lstrcmpiW(str, szSummaryInfo)) + { + *rfmtid = FMTID_SummaryInformation; + hr = S_OK; + } + else + { + ULONG bits; + BYTE *fmtptr = (BYTE *)rfmtid - 1; + const WCHAR *pstr = str; + + memset(rfmtid, 0, sizeof(*rfmtid)); + for (bits = 0; bits < sizeof(FMTID) * BITS_PER_BYTE; + bits += BITS_IN_CHARMASK) + { + ULONG bitsUsed = bits % BITS_PER_BYTE, bitsStored; + WCHAR wc; + + if (bitsUsed == 0) + fmtptr++; + wc = *++pstr - 'A'; + if (wc > NUM_ALPHA_CHARS) + { + wc += 'A' - 'a'; + if (wc > NUM_ALPHA_CHARS) + { + wc += 'a' - '0' + NUM_ALPHA_CHARS; + if (wc > CHARMASK) + { + WARN("invalid character (%d)\n", *pstr); + goto end; + } + } + } + *fmtptr |= wc << bitsUsed; + bitsStored = min(BITS_PER_BYTE - bitsUsed, BITS_IN_CHARMASK); + if (bitsStored < BITS_IN_CHARMASK) + { + wc >>= BITS_PER_BYTE - bitsUsed; + if (bits + bitsStored == sizeof(FMTID) * BITS_PER_BYTE) + { + if (wc != 0) + { + WARN("extra bits\n"); + goto end; + } + break; + } + fmtptr++; + *fmtptr |= (BYTE)wc; + } + } + hr = S_OK; + } +end: + return hr; +} diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c index db998e6d30a..66b12f3ae9e 100644 --- a/dlls/ole32/stg_prop.c +++ b/dlls/ole32/stg_prop.c @@ -2994,100 +2994,6 @@ static const IPropertyStorageVtbl IPropertyStorage_Vtbl = IPropertyStorage_fnStat, };
-/*********************************************************************** - * Format ID <-> name conversion - */ -static const WCHAR szSummaryInfo[] = L"\5SummaryInformation"; -static const WCHAR szDocSummaryInfo[] = L"\5DocumentSummaryInformation"; - -#define BITS_PER_BYTE 8 -#define CHARMASK 0x1f -#define BITS_IN_CHARMASK 5 -#define NUM_ALPHA_CHARS 26 - -/*********************************************************************** - * PropStgNameToFmtId [ole32.@] - * Returns the format ID corresponding to the given name. - * PARAMS - * str [I] Storage name to convert to a format ID. - * rfmtid [O] Format ID corresponding to str. - * - * RETURNS - * E_INVALIDARG if rfmtid or str is NULL or if str can't be converted to - * a format ID, S_OK otherwise. - */ -HRESULT WINAPI PropStgNameToFmtId(const LPOLESTR str, FMTID *rfmtid) -{ - HRESULT hr = STG_E_INVALIDNAME; - - TRACE("%s, %p\n", debugstr_w(str), rfmtid); - - if (!rfmtid) return E_INVALIDARG; - if (!str) return STG_E_INVALIDNAME; - - if (!lstrcmpiW(str, szDocSummaryInfo)) - { - *rfmtid = FMTID_DocSummaryInformation; - hr = S_OK; - } - else if (!lstrcmpiW(str, szSummaryInfo)) - { - *rfmtid = FMTID_SummaryInformation; - hr = S_OK; - } - else - { - ULONG bits; - BYTE *fmtptr = (BYTE *)rfmtid - 1; - const WCHAR *pstr = str; - - memset(rfmtid, 0, sizeof(*rfmtid)); - for (bits = 0; bits < sizeof(FMTID) * BITS_PER_BYTE; - bits += BITS_IN_CHARMASK) - { - ULONG bitsUsed = bits % BITS_PER_BYTE, bitsStored; - WCHAR wc; - - if (bitsUsed == 0) - fmtptr++; - wc = *++pstr - 'A'; - if (wc > NUM_ALPHA_CHARS) - { - wc += 'A' - 'a'; - if (wc > NUM_ALPHA_CHARS) - { - wc += 'a' - '0' + NUM_ALPHA_CHARS; - if (wc > CHARMASK) - { - WARN("invalid character (%d)\n", *pstr); - goto end; - } - } - } - *fmtptr |= wc << bitsUsed; - bitsStored = min(BITS_PER_BYTE - bitsUsed, BITS_IN_CHARMASK); - if (bitsStored < BITS_IN_CHARMASK) - { - wc >>= BITS_PER_BYTE - bitsUsed; - if (bits + bitsStored == sizeof(FMTID) * BITS_PER_BYTE) - { - if (wc != 0) - { - WARN("extra bits\n"); - goto end; - } - break; - } - fmtptr++; - *fmtptr |= (BYTE)wc; - } - } - hr = S_OK; - } -end: - return hr; -} - #ifdef __i386__ /* thiscall functions are i386-specific */
#define DEFINE_STDCALL_WRAPPER(num,func,args) \
From: Fabian Maurer dark.shadow4@web.de
--- dlls/coml2/coml2.spec | 2 +- dlls/coml2/storage32.c | 12 ++++++++++++ dlls/ole32/storage32.c | 13 ------------- 3 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/dlls/coml2/coml2.spec b/dlls/coml2/coml2.spec index 694790350cc..f9747cb449d 100644 --- a/dlls/coml2/coml2.spec +++ b/dlls/coml2/coml2.spec @@ -19,7 +19,7 @@ @ stdcall ReadClassStm(ptr ptr) @ stub StgCreateDocfile @ stub StgCreateDocfileOnILockBytes -@ stub StgCreatePropSetStg +@ stdcall StgCreatePropSetStg(ptr long ptr) @ stub StgCreatePropStg @ stub StgCreateStorageEx @ stdcall StgIsStorageFile(wstr) diff --git a/dlls/coml2/storage32.c b/dlls/coml2/storage32.c index dd803c817c9..d6dab7d6b17 100644 --- a/dlls/coml2/storage32.c +++ b/dlls/coml2/storage32.c @@ -226,3 +226,15 @@ HRESULT WINAPI StgIsStorageFile(LPCOLESTR fn) TRACE(" -> Invalid header.\n"); return S_FALSE; } + +/****************************************************************************** + * StgCreatePropSetStg [coml2.@] + */ +HRESULT WINAPI StgCreatePropSetStg(IStorage *pstg, DWORD reserved, IPropertySetStorage **propset) +{ + TRACE("%p, %#lx, %p.\n", pstg, reserved, propset); + if (reserved) + return STG_E_INVALIDPARAMETER; + + return IStorage_QueryInterface(pstg, &IID_IPropertySetStorage, (void**)propset); +} diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index f0ec0b5e954..1bf08e45701 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -8649,19 +8649,6 @@ HRESULT WINAPI StgCreateStorageEx(const WCHAR* pwcsName, DWORD grfMode, DWORD st return STG_E_INVALIDPARAMETER; }
-/****************************************************************************** - * StgCreatePropSetStg [OLE32.@] - */ -HRESULT WINAPI StgCreatePropSetStg(IStorage *pstg, DWORD reserved, - IPropertySetStorage **propset) -{ - TRACE("%p, %#lx, %p.\n", pstg, reserved, propset); - if (reserved) - return STG_E_INVALIDPARAMETER; - - return IStorage_QueryInterface(pstg, &IID_IPropertySetStorage, (void**)propset); -} - /****************************************************************************** * StgOpenStorageEx [OLE32.@] */
This merge request was approved by Nikolay Sivov.
This merge request was approved by Esme Povirk.