Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- configure | 1 + configure.ac | 1 + dlls/opcservices/tests/Makefile.in | 5 ++ dlls/opcservices/tests/opcservices.c | 85 ++++++++++++++++++++++++++++ 4 files changed, 92 insertions(+) create mode 100644 dlls/opcservices/tests/Makefile.in create mode 100644 dlls/opcservices/tests/opcservices.c
diff --git a/configure b/configure index 5d520f045a..b800fd269a 100755 --- a/configure +++ b/configure @@ -19715,6 +19715,7 @@ wine_fn_config_makefile dlls/olesvr.dll16 enable_win16 wine_fn_config_makefile dlls/olesvr32 enable_olesvr32 wine_fn_config_makefile dlls/olethk32 enable_olethk32 wine_fn_config_makefile dlls/opcservices enable_opcservices +wine_fn_config_makefile dlls/opcservices/tests enable_tests wine_fn_config_makefile dlls/openal32 enable_openal32 wine_fn_config_makefile dlls/opencl enable_opencl wine_fn_config_makefile dlls/opengl32 enable_opengl32 diff --git a/configure.ac b/configure.ac index 2b63d6ae50..d7d5e8e6ae 100644 --- a/configure.ac +++ b/configure.ac @@ -3574,6 +3574,7 @@ WINE_CONFIG_MAKEFILE(dlls/olesvr.dll16,enable_win16) WINE_CONFIG_MAKEFILE(dlls/olesvr32) WINE_CONFIG_MAKEFILE(dlls/olethk32) WINE_CONFIG_MAKEFILE(dlls/opcservices) +WINE_CONFIG_MAKEFILE(dlls/opcservices/tests) WINE_CONFIG_MAKEFILE(dlls/openal32) WINE_CONFIG_MAKEFILE(dlls/opencl) WINE_CONFIG_MAKEFILE(dlls/opengl32) diff --git a/dlls/opcservices/tests/Makefile.in b/dlls/opcservices/tests/Makefile.in new file mode 100644 index 0000000000..7c0963cc60 --- /dev/null +++ b/dlls/opcservices/tests/Makefile.in @@ -0,0 +1,5 @@ +TESTDLL = opcservices.dll +IMPORTS = ole32 + +C_SRCS = \ + opcservices.c diff --git a/dlls/opcservices/tests/opcservices.c b/dlls/opcservices/tests/opcservices.c new file mode 100644 index 0000000000..e257c6ea2c --- /dev/null +++ b/dlls/opcservices/tests/opcservices.c @@ -0,0 +1,85 @@ +/* + * Font related tests + * + * Copyright 2012, 2014-2017 Nikolay Sivov for CodeWeavers + * Copyright 2014 Aric Stewart for CodeWeavers + * + * 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 + */ + +#define COBJMACROS + +#include "windows.h" +#include "initguid.h" +#include "msopc.h" + +#include "wine/test.h" + +static IOpcFactory *create_factory(void) +{ + IOpcFactory *factory = NULL; + CoCreateInstance(&CLSID_OpcFactory, NULL, CLSCTX_INPROC_SERVER, &IID_IOpcFactory, (void **)&factory); + return factory; +} + +static void test_package(void) +{ + IOpcPartSet *partset, *partset2; + IOpcFactory *factory; + IOpcPackage *package; + HRESULT hr; + + factory = create_factory(); + + hr = IOpcFactory_CreatePackage(factory, &package); + ok(SUCCEEDED(hr) || broken(hr == E_NOTIMPL) /* Vista */, "Failed to create a package, hr %#x.\n", hr); + if (FAILED(hr)) + { + IOpcFactory_Release(factory); + return; + } + + hr = IOpcPackage_GetPartSet(package, &partset); + ok(SUCCEEDED(hr), "Failed to create a part set, hr %#x.\n", hr); + + hr = IOpcPackage_GetPartSet(package, &partset2); + ok(SUCCEEDED(hr), "Failed to create a part set, hr %#x.\n", hr); + ok(partset == partset2, "Expected same part set instance.\n"); + + IOpcPackage_Release(package); + + IOpcFactory_Release(factory); +} + +START_TEST(opcservices) +{ + IOpcFactory *factory; + HRESULT hr; + + hr = CoInitialize(NULL); + ok(SUCCEEDED(hr), "Failed to initialize COM, hr %#x.\n", hr); + + if (!(factory = create_factory())) { + win_skip("Failed to create IOpcFactory factory.\n"); + CoUninitialize(); + return; + } + + test_package(); + + IOpcFactory_Release(factory); + + CoUninitialize(); +}
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/opcservices/Makefile.in | 3 +- dlls/opcservices/factory.c | 4 +- dlls/opcservices/opc_private.h | 1 + dlls/opcservices/uri.c | 355 +++++++++++++++++++++++++++++++++ 4 files changed, 360 insertions(+), 3 deletions(-) create mode 100644 dlls/opcservices/uri.c
diff --git a/dlls/opcservices/Makefile.in b/dlls/opcservices/Makefile.in index 4a2d2945ae..651cb411d7 100644 --- a/dlls/opcservices/Makefile.in +++ b/dlls/opcservices/Makefile.in @@ -3,7 +3,8 @@ IMPORTS = uuid
C_SRCS = \ factory.c \ - package.c + package.c \ + uri.c
IDL_SRCS = \ opcservices.idl diff --git a/dlls/opcservices/factory.c b/dlls/opcservices/factory.c index b2a57c42ec..7cbe233e9d 100644 --- a/dlls/opcservices/factory.c +++ b/dlls/opcservices/factory.c @@ -68,9 +68,9 @@ static HRESULT WINAPI opc_factory_CreatePackageRootUri(IOpcFactory *iface, IOpcU
static HRESULT WINAPI opc_factory_CreatePartUri(IOpcFactory *iface, LPCWSTR uri, IOpcPartUri **part_uri) { - FIXME("iface %p, uri %s, part_uri %p stub!\n", iface, debugstr_w(uri), part_uri); + TRACE("iface %p, uri %s, part_uri %p.\n", iface, debugstr_w(uri), part_uri);
- return E_NOTIMPL; + return opc_part_uri_create(uri, part_uri); }
static HRESULT WINAPI opc_factory_CreateStreamOnFile(IOpcFactory *iface, LPCWSTR filename, diff --git a/dlls/opcservices/opc_private.h b/dlls/opcservices/opc_private.h index 492ec91280..4784b6c458 100644 --- a/dlls/opcservices/opc_private.h +++ b/dlls/opcservices/opc_private.h @@ -20,3 +20,4 @@ #include "wine/heap.h"
extern HRESULT opc_package_create(IOpcPackage **package) DECLSPEC_HIDDEN; +extern HRESULT opc_part_uri_create(const WCHAR *uri, IOpcPartUri **part_uri) DECLSPEC_HIDDEN; diff --git a/dlls/opcservices/uri.c b/dlls/opcservices/uri.c new file mode 100644 index 0000000000..60881e865e --- /dev/null +++ b/dlls/opcservices/uri.c @@ -0,0 +1,355 @@ +/* + * Copyright 2018 Nikolay Sivov for CodeWeavers + * + * 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 + */ + +#define COBJMACROS + +#include <stdarg.h> +#include "windef.h" +#include "winbase.h" + +#include "wine/debug.h" + +#include "opc_private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(msopc); + +struct opc_uri +{ + IOpcPartUri IOpcPartUri_iface; + LONG refcount; +}; + +static inline struct opc_uri *impl_from_IOpcPartUri(IOpcPartUri *iface) +{ + return CONTAINING_RECORD(iface, struct opc_uri, IOpcPartUri_iface); +} + +static HRESULT WINAPI opc_uri_QueryInterface(IOpcPartUri *iface, REFIID iid, void **out) +{ + TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out); + + if (IsEqualIID(iid, &IID_IOpcPartUri) || + IsEqualIID(iid, &IID_IUnknown)) + { + *out = iface; + IOpcPartUri_AddRef(iface); + return S_OK; + } + + WARN("Unsupported interface %s.\n", debugstr_guid(iid)); + return E_NOINTERFACE; +} + +static ULONG WINAPI opc_uri_AddRef(IOpcPartUri *iface) +{ + struct opc_uri *uri = impl_from_IOpcPartUri(iface); + ULONG refcount = InterlockedIncrement(&uri->refcount); + + TRACE("%p increasing refcount to %u.\n", iface, refcount); + + return refcount; +} + +static ULONG WINAPI opc_uri_Release(IOpcPartUri *iface) +{ + struct opc_uri *uri = impl_from_IOpcPartUri(iface); + ULONG refcount = InterlockedDecrement(&uri->refcount); + + TRACE("%p decreasing refcount to %u.\n", iface, refcount); + + if (!refcount) + heap_free(uri); + + return refcount; +} + +static HRESULT WINAPI opc_uri_GetPropertyBSTR(IOpcPartUri *iface, Uri_PROPERTY property, + BSTR *value, DWORD flags) +{ + FIXME("iface %p, property %d, value %p, flags %#x stub!\n", iface, property, value, flags); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_GetPropertyLength(IOpcPartUri *iface, Uri_PROPERTY property, + DWORD *length, DWORD flags) +{ + FIXME("iface %p, property %d, length %p, flags %#x stub!\n", iface, property, length, flags); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_GetPropertyDWORD(IOpcPartUri *iface, Uri_PROPERTY property, + DWORD *value, DWORD flags) +{ + FIXME("iface %p, property %d, value %p, flags %#x stub!\n", iface, property, value, flags); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_HasProperty(IOpcPartUri *iface, Uri_PROPERTY property, + BOOL *has_property) +{ + FIXME("iface %p, property %d, has_property %p stub!\n", iface, property, has_property); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_GetAbsoluteUri(IOpcPartUri *iface, BSTR *value) +{ + FIXME("iface %p, value %p stub!\n", iface, value); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_GetAuthority(IOpcPartUri *iface, BSTR *value) +{ + FIXME("iface %p, value %p stub!\n", iface, value); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_GetDisplayUri(IOpcPartUri *iface, BSTR *value) +{ + FIXME("iface %p, value %p stub!\n", iface, value); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_GetDomain(IOpcPartUri *iface, BSTR *value) +{ + FIXME("iface %p, value %p stub!\n", iface, value); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_GetExtension(IOpcPartUri *iface, BSTR *value) +{ + FIXME("iface %p, value %p stub!\n", iface, value); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_GetFragment(IOpcPartUri *iface, BSTR *value) +{ + FIXME("iface %p, value %p stub!\n", iface, value); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_GetHost(IOpcPartUri *iface, BSTR *value) +{ + FIXME("iface %p, value %p stub!\n", iface, value); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_GetPassword(IOpcPartUri *iface, BSTR *value) +{ + FIXME("iface %p, value %p stub!\n", iface, value); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_GetPath(IOpcPartUri *iface, BSTR *value) +{ + FIXME("iface %p, value %p stub!\n", iface, value); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_GetPathAndQuery(IOpcPartUri *iface, BSTR *value) +{ + FIXME("iface %p, value %p stub!\n", iface, value); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_GetQuery(IOpcPartUri *iface, BSTR *value) +{ + FIXME("iface %p, value %p stub!\n", iface, value); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_GetRawUri(IOpcPartUri *iface, BSTR *value) +{ + FIXME("iface %p, value %p stub!\n", iface, value); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_GetSchemeName(IOpcPartUri *iface, BSTR *value) +{ + FIXME("iface %p, value %p stub!\n", iface, value); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_GetUserInfo(IOpcPartUri *iface, BSTR *value) +{ + FIXME("iface %p, value %p stub!\n", iface, value); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_GetUserName(IOpcPartUri *iface, BSTR *value) +{ + FIXME("iface %p, value %p stub!\n", iface, value); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_GetHostType(IOpcPartUri *iface, DWORD *value) +{ + FIXME("iface %p, value %p stub!\n", iface, value); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_GetPort(IOpcPartUri *iface, DWORD *value) +{ + FIXME("iface %p, value %p stub!\n", iface, value); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_GetScheme(IOpcPartUri *iface, DWORD *value) +{ + FIXME("iface %p, value %p stub!\n", iface, value); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_GetZone(IOpcPartUri *iface, DWORD *value) +{ + FIXME("iface %p, value %p stub!\n", iface, value); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_GetProperties(IOpcPartUri *iface, DWORD *flags) +{ + FIXME("iface %p, flags %p stub!\n", iface, flags); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_IsEqual(IOpcPartUri *iface, IUri *uri, BOOL *is_equal) +{ + FIXME("iface %p, uri %p, is_equal %p stub!\n", iface, uri, is_equal); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_GetRelationshipsPartUri(IOpcPartUri *iface, IOpcPartUri **part_uri) +{ + FIXME("iface %p, part_uri %p stub!\n", iface, part_uri); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_GetRelativeUri(IOpcPartUri *iface, IOpcPartUri *part_uri, + IUri **relative_uri) +{ + FIXME("iface %p, part_uri %p, relative_uri %p stub!\n", iface, part_uri, relative_uri); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_CombinePartUri(IOpcPartUri *iface, IUri *relative_uri, IOpcPartUri **combined) +{ + FIXME("iface %p, relative_uri %p, combined %p stub!\n", iface, relative_uri, combined); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_ComparePartUri(IOpcPartUri *iface, IOpcPartUri *part_uri, + INT32 *result) +{ + FIXME("iface %p, part_uri %p, result %p stub!\n", iface, part_uri, result); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_GetSourceUri(IOpcPartUri *iface, IOpcUri **source_uri) +{ + FIXME("iface %p, source_uri %p stub!\n", iface, source_uri); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_uri_IsRelationshipsPartUri(IOpcPartUri *iface, BOOL *result) +{ + FIXME("iface %p, result %p stub!\n", iface, result); + + return E_NOTIMPL; +} + +static const IOpcPartUriVtbl opc_part_uri_vtbl = +{ + opc_uri_QueryInterface, + opc_uri_AddRef, + opc_uri_Release, + opc_uri_GetPropertyBSTR, + opc_uri_GetPropertyLength, + opc_uri_GetPropertyDWORD, + opc_uri_HasProperty, + opc_uri_GetAbsoluteUri, + opc_uri_GetAuthority, + opc_uri_GetDisplayUri, + opc_uri_GetDomain, + opc_uri_GetExtension, + opc_uri_GetFragment, + opc_uri_GetHost, + opc_uri_GetPassword, + opc_uri_GetPath, + opc_uri_GetPathAndQuery, + opc_uri_GetQuery, + opc_uri_GetRawUri, + opc_uri_GetSchemeName, + opc_uri_GetUserInfo, + opc_uri_GetUserName, + opc_uri_GetHostType, + opc_uri_GetPort, + opc_uri_GetScheme, + opc_uri_GetZone, + opc_uri_GetProperties, + opc_uri_IsEqual, + opc_uri_GetRelationshipsPartUri, + opc_uri_GetRelativeUri, + opc_uri_CombinePartUri, + opc_uri_ComparePartUri, + opc_uri_GetSourceUri, + opc_uri_IsRelationshipsPartUri, +}; + +HRESULT opc_part_uri_create(const WCHAR *str, IOpcPartUri **out) +{ + struct opc_uri *uri; + + if (!(uri = heap_alloc_zero(sizeof(*uri)))) + return E_OUTOFMEMORY; + + uri->IOpcPartUri_iface.lpVtbl = &opc_part_uri_vtbl; + uri->refcount = 1; + + *out = &uri->IOpcPartUri_iface; + TRACE("Created part uri %p.\n", *out); + return S_OK; +}
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/opcservices/package.c | 114 ++++++++++++++++++++++++++++++++++++- include/opcobjectmodel.idl | 30 +++++++++- 2 files changed, 142 insertions(+), 2 deletions(-)
diff --git a/dlls/opcservices/package.c b/dlls/opcservices/package.c index c49c980e65..a3a2fabce7 100644 --- a/dlls/opcservices/package.c +++ b/dlls/opcservices/package.c @@ -36,6 +36,12 @@ struct opc_package IOpcPartSet *part_set; };
+struct opc_part +{ + IOpcPart IOpcPart_iface; + LONG refcount; +}; + struct opc_part_set { IOpcPartSet IOpcPartSet_iface; @@ -52,6 +58,112 @@ static inline struct opc_part_set *impl_from_IOpcPartSet(IOpcPartSet *iface) return CONTAINING_RECORD(iface, struct opc_part_set, IOpcPartSet_iface); }
+static inline struct opc_part *impl_from_IOpcPart(IOpcPart *iface) +{ + return CONTAINING_RECORD(iface, struct opc_part, IOpcPart_iface); +} + +static HRESULT WINAPI opc_part_QueryInterface(IOpcPart *iface, REFIID iid, void **out) +{ + TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out); + + if (IsEqualIID(iid, &IID_IOpcPart) || + IsEqualIID(iid, &IID_IUnknown)) + { + *out = iface; + IOpcPart_AddRef(iface); + return S_OK; + } + + WARN("Unsupported interface %s.\n", debugstr_guid(iid)); + return E_NOINTERFACE; +} + +static ULONG WINAPI opc_part_AddRef(IOpcPart *iface) +{ + struct opc_part *part = impl_from_IOpcPart(iface); + ULONG refcount = InterlockedIncrement(&part->refcount); + + TRACE("%p increasing refcount to %u.\n", iface, refcount); + + return refcount; +} + +static ULONG WINAPI opc_part_Release(IOpcPart *iface) +{ + struct opc_part *part = impl_from_IOpcPart(iface); + ULONG refcount = InterlockedDecrement(&part->refcount); + + TRACE("%p decreasing refcount to %u.\n", iface, refcount); + + if (!refcount) + heap_free(part); + + return refcount; +} + +static HRESULT WINAPI opc_part_GetRelationshipSet(IOpcPart *iface, IOpcRelationshipSet **relationship_set) +{ + FIXME("iface %p, relationship_set %p stub!\n", iface, relationship_set); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_part_GetContentStream(IOpcPart *iface, IStream **stream) +{ + FIXME("iface %p, stream %p stub!\n", iface, stream); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_part_GetName(IOpcPart *iface, IOpcPartUri **name) +{ + FIXME("iface %p, name %p stub!\n", iface, name); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_part_GetContentType(IOpcPart *iface, LPWSTR *type) +{ + FIXME("iface %p, type %p stub!\n", iface, type); + + return E_NOTIMPL; +} + +static HRESULT WINAPI opc_part_GetCompressionOptions(IOpcPart *iface, OPC_COMPRESSION_OPTIONS *options) +{ + FIXME("iface %p, options %p stub!\n", iface, options); + + return E_NOTIMPL; +} + +static const IOpcPartVtbl opc_part_vtbl = +{ + opc_part_QueryInterface, + opc_part_AddRef, + opc_part_Release, + opc_part_GetRelationshipSet, + opc_part_GetContentStream, + opc_part_GetName, + opc_part_GetContentType, + opc_part_GetCompressionOptions, +}; + +static HRESULT opc_part_create(IOpcPart **out) +{ + struct opc_part *part; + + if (!(part = heap_alloc_zero(sizeof(*part)))) + return E_OUTOFMEMORY; + + part->IOpcPart_iface.lpVtbl = &opc_part_vtbl; + part->refcount = 1; + + *out = &part->IOpcPart_iface; + TRACE("Created part %p.\n", *out); + return S_OK; +} + static HRESULT WINAPI opc_part_set_QueryInterface(IOpcPartSet *iface, REFIID iid, void **out) { TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out); @@ -104,7 +216,7 @@ static HRESULT WINAPI opc_part_set_CreatePart(IOpcPartSet *iface, IOpcPartUri *n FIXME("iface %p, name %p, content_type %s, compression_options %#x, part %p stub!\n", iface, name, debugstr_w(content_type), compression_options, part);
- return E_NOTIMPL; + return opc_part_create(part); }
static HRESULT WINAPI opc_part_set_DeletePart(IOpcPartSet *iface, IOpcPartUri *name) diff --git a/include/opcobjectmodel.idl b/include/opcobjectmodel.idl index 45bc8aa4a5..eaf01085b2 100644 --- a/include/opcobjectmodel.idl +++ b/include/opcobjectmodel.idl @@ -20,10 +20,10 @@ #pragma makedep install #endif
-interface IOpcPart; interface IOpcPartUri; interface IOpcUri; interface IOpcRelationship; +interface IOpcRelationshipSet;
typedef [v1_enum] enum { @@ -38,6 +38,34 @@ typedef [v1_enum] enum OPC_WRITE_FORCE_ZIP32 = 1, } OPC_WRITE_FLAGS;
+[ + object, + uuid(42195949-3b79-4fc8-89c6-fc7fb979ee71), + pointer_default(ref) +] +interface IOpcPart : IUnknown +{ + HRESULT GetRelationshipSet( + [out, retval] IOpcRelationshipSet **relationship_set + ); + + HRESULT GetContentStream( + [out, retval] IStream **stream + ); + + HRESULT GetName( + [out, retval] IOpcPartUri **name + ); + + HRESULT GetContentType( + [out, string, retval] LPWSTR *type + ); + + HRESULT GetCompressionOptions( + [out, retval] OPC_COMPRESSION_OPTIONS *options + ); +} + [ object, uuid(42195949-3b79-4fc8-89c6-fc7fb979ee75),