Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
August 2018
- 62 participants
- 1399 messages
Re: [PATCH 03/15] shell32: Add image file icon
by Alex Henrie
On Thu, Aug 30, 2018 at 3:40 AM Alexandre Julliard <julliard(a)winehq.org> wrote:
>
> Alex Henrie <alexhenrie24(a)gmail.com> writes:
>
> > Adapted from image-x-generic in the Tango Icon Library.
> >
> > Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com>
> > ---
> > dlls/shell32/Makefile.in | 1 +
> > dlls/shell32/resources/image.ico | Bin 0 -> 39102 bytes
> > dlls/shell32/resources/image.svg | 1008 ++++++++++++++++++++++++++++++
> > dlls/shell32/shell32.rc | 3 +
> > dlls/shell32/shresdef.h | 1 +
> > 5 files changed, 1013 insertions(+)
> > create mode 100644 dlls/shell32/resources/image.ico
> > create mode 100644 dlls/shell32/resources/image.svg
>
> This one is missing the 256x256 icon.
Sorry about that, and thank you for rebasing and accepting all but two
of the patches in this patchset.
-Alex
Aug. 31, 2018
[PATCH] kernel32: Fallback to default comspec when %COMSPEC% is not set.
by Alistair Leslie-Hughes
From: Qian Hong <qhong(a)codeweavers.com>
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=19801
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
dlls/kernel32/process.c | 6 +++++-
programs/cmd/wcmdmain.c | 10 ++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index 7ac7477..85e0042 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -2206,6 +2206,7 @@ static BOOL create_cmd_process( LPCWSTR filename, LPWSTR cmd_line, LPVOID env, L
{
static const WCHAR comspecW[] = {'C','O','M','S','P','E','C',0};
+ static const WCHAR cmdW[] = {'\\','c','m','d','.','e','x','e',0};
static const WCHAR slashscW[] = {' ','/','s','/','c',' ',0};
static const WCHAR quotW[] = {'"',0};
WCHAR comspec[MAX_PATH];
@@ -2213,7 +2214,10 @@ static BOOL create_cmd_process( LPCWSTR filename, LPWSTR cmd_line, LPVOID env, L
BOOL ret;
if (!GetEnvironmentVariableW( comspecW, comspec, ARRAY_SIZE( comspec )))
- return FALSE;
+ {
+ GetSystemDirectoryW( comspec, (sizeof(comspec) - sizeof(cmdW))/sizeof(WCHAR) );
+ strcatW( comspec, cmdW );
+ }
if (!(newcmdline = HeapAlloc( GetProcessHeap(), 0,
(strlenW(comspec) + 7 + strlenW(cmd_line) + 2) * sizeof(WCHAR))))
return FALSE;
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index 7a7ee16..66a5ac0 100644
--- a/programs/cmd/wcmdmain.c
+++ b/programs/cmd/wcmdmain.c
@@ -2400,10 +2400,20 @@ int wmain (int argc, WCHAR *argvW[])
static const WCHAR offW[] = {'O','F','F','\0'};
static const WCHAR promptW[] = {'P','R','O','M','P','T','\0'};
static const WCHAR defaultpromptW[] = {'$','P','$','G','\0'};
+ static const WCHAR comspecW[] = {'C','O','M','S','P','E','C',0};
+ static const WCHAR cmdW[] = {'\\','c','m','d','.','e','x','e',0};
+ WCHAR comspec[MAX_PATH];
CMD_LIST *toExecute = NULL; /* Commands left to be executed */
OSVERSIONINFOW osv;
char osver[50];
+ if (!GetEnvironmentVariableW(comspecW, comspec, sizeof(comspec)/sizeof(WCHAR)))
+ {
+ GetSystemDirectoryW(comspec, (sizeof(comspec) - sizeof(cmdW))/sizeof(WCHAR));
+ strcatW(comspec, cmdW);
+ SetEnvironmentVariableW(comspecW, comspec);
+ }
+
srand(time(NULL));
/* Get the windows version being emulated */
--
1.9.1
Aug. 31, 2018
[PATCH] include: Add MmIsAddressValid to header
by Alistair Leslie-Hughes
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
include/ddk/ntddk.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/ddk/ntddk.h b/include/ddk/ntddk.h
index 5c124ca..e76ccc9 100644
--- a/include/ddk/ntddk.h
+++ b/include/ddk/ntddk.h
@@ -214,6 +214,7 @@ NTSTATUS WINAPI IoQueryDeviceDescription(PINTERFACE_TYPE,PULONG,PCONFIGURATION_
PCONFIGURATION_TYPE,PULONG,PIO_QUERY_DEVICE_ROUTINE,PVOID);
void WINAPI IoRegisterDriverReinitialization(PDRIVER_OBJECT,PDRIVER_REINITIALIZE,PVOID);
NTSTATUS WINAPI IoRegisterShutdownNotification(PDEVICE_OBJECT);
+BOOLEAN WINAPI MmIsAddressValid(void *);
NTSTATUS WINAPI PsSetLoadImageNotifyRoutine(PLOAD_IMAGE_NOTIFY_ROUTINE);
void WINAPI RtlInitializeGenericTableAvl(PRTL_AVL_TABLE,PRTL_AVL_COMPARE_ROUTINE,PRTL_AVL_ALLOCATE_ROUTINE, PRTL_AVL_FREE_ROUTINE,void *);
void WINAPI RtlInsertElementGenericTableAvl(PRTL_AVL_TABLE,void *,ULONG,BOOL*);
--
1.9.1
Aug. 31, 2018
[PATCH 3/3] opcservices: Add IOpcPartSet stub.
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/opcservices/package.c | 128 ++++++++++++++++++++++++++++++++++++-
1 file changed, 125 insertions(+), 3 deletions(-)
diff --git a/dlls/opcservices/package.c b/dlls/opcservices/package.c
index 527bf949e5..c49c980e65 100644
--- a/dlls/opcservices/package.c
+++ b/dlls/opcservices/package.c
@@ -32,6 +32,14 @@ struct opc_package
{
IOpcPackage IOpcPackage_iface;
LONG refcount;
+
+ IOpcPartSet *part_set;
+};
+
+struct opc_part_set
+{
+ IOpcPartSet IOpcPartSet_iface;
+ LONG refcount;
};
static inline struct opc_package *impl_from_IOpcPackage(IOpcPackage *iface)
@@ -39,6 +47,99 @@ static inline struct opc_package *impl_from_IOpcPackage(IOpcPackage *iface)
return CONTAINING_RECORD(iface, struct opc_package, IOpcPackage_iface);
}
+static inline struct opc_part_set *impl_from_IOpcPartSet(IOpcPartSet *iface)
+{
+ return CONTAINING_RECORD(iface, struct opc_part_set, IOpcPartSet_iface);
+}
+
+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);
+
+ if (IsEqualIID(iid, &IID_IOpcPartSet) ||
+ IsEqualIID(iid, &IID_IUnknown))
+ {
+ *out = iface;
+ IOpcPartSet_AddRef(iface);
+ return S_OK;
+ }
+
+ WARN("Unsupported interface %s.\n", debugstr_guid(iid));
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI opc_part_set_AddRef(IOpcPartSet *iface)
+{
+ struct opc_part_set *part_set = impl_from_IOpcPartSet(iface);
+ ULONG refcount = InterlockedIncrement(&part_set->refcount);
+
+ TRACE("%p increasing refcount to %u.\n", iface, refcount);
+
+ return refcount;
+}
+
+static ULONG WINAPI opc_part_set_Release(IOpcPartSet *iface)
+{
+ struct opc_part_set *part_set = impl_from_IOpcPartSet(iface);
+ ULONG refcount = InterlockedDecrement(&part_set->refcount);
+
+ TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+
+ if (!refcount)
+ heap_free(part_set);
+
+ return refcount;
+}
+
+static HRESULT WINAPI opc_part_set_GetPart(IOpcPartSet *iface, IOpcPartUri *name, IOpcPart **part)
+{
+ FIXME("iface %p, name %p, part %p stub!\n", iface, name, part);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI opc_part_set_CreatePart(IOpcPartSet *iface, IOpcPartUri *name, LPCWSTR content_type,
+ OPC_COMPRESSION_OPTIONS compression_options, IOpcPart **part)
+{
+ 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;
+}
+
+static HRESULT WINAPI opc_part_set_DeletePart(IOpcPartSet *iface, IOpcPartUri *name)
+{
+ FIXME("iface %p, name %p stub!\n", iface, name);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI opc_part_set_PartExists(IOpcPartSet *iface, IOpcPartUri *name, BOOL *exists)
+{
+ FIXME("iface %p, name %p, exists %p stub!\n", iface, name, exists);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI opc_part_set_GtEnumerator(IOpcPartSet *iface, IOpcPartEnumerator **enumerator)
+{
+ FIXME("iface %p, enumerator %p stub!\n", iface, enumerator);
+
+ return E_NOTIMPL;
+}
+
+static const IOpcPartSetVtbl opc_part_set_vtbl =
+{
+ opc_part_set_QueryInterface,
+ opc_part_set_AddRef,
+ opc_part_set_Release,
+ opc_part_set_GetPart,
+ opc_part_set_CreatePart,
+ opc_part_set_DeletePart,
+ opc_part_set_PartExists,
+ opc_part_set_GtEnumerator,
+};
+
static HRESULT WINAPI opc_package_QueryInterface(IOpcPackage *iface, REFIID iid, void **out)
{
TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
@@ -73,16 +174,37 @@ static ULONG WINAPI opc_package_Release(IOpcPackage *iface)
TRACE("%p decreasing refcount to %u.\n", iface, refcount);
if (!refcount)
+ {
+ if (package->part_set)
+ IOpcPartSet_Release(package->part_set);
heap_free(package);
+ }
return refcount;
}
static HRESULT WINAPI opc_package_GetPartSet(IOpcPackage *iface, IOpcPartSet **part_set)
{
- FIXME("iface %p, part_set %p stub!\n", iface, part_set);
+ struct opc_package *package = impl_from_IOpcPackage(iface);
- return E_NOTIMPL;
+ TRACE("iface %p, part_set %p.\n", iface, part_set);
+
+ if (!package->part_set)
+ {
+ struct opc_part_set *part_set = heap_alloc_zero(sizeof(*part_set));
+ if (!part_set)
+ return E_OUTOFMEMORY;
+
+ part_set->IOpcPartSet_iface.lpVtbl = &opc_part_set_vtbl;
+ part_set->refcount = 1;
+
+ package->part_set = &part_set->IOpcPartSet_iface;
+ }
+
+ *part_set = package->part_set;
+ IOpcPartSet_AddRef(*part_set);
+
+ return S_OK;
}
static HRESULT WINAPI opc_package_GetRelationshipSet(IOpcPackage *iface, IOpcRelationshipSet **relationship_set)
@@ -105,7 +227,7 @@ HRESULT opc_package_create(IOpcPackage **out)
{
struct opc_package *package;
- if (!(package = heap_alloc(sizeof(*package))))
+ if (!(package = heap_alloc_zero(sizeof(*package))))
return E_OUTOFMEMORY;
package->IOpcPackage_iface.lpVtbl = &opc_package_vtbl;
--
2.18.0
Aug. 30, 2018
[PATCH 2/3] opcservices: Add IOpcPackage stub.
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/opcservices/Makefile.in | 3 +-
dlls/opcservices/factory.c | 6 +-
dlls/opcservices/opc_private.h | 22 +++++++
dlls/opcservices/package.c | 117 +++++++++++++++++++++++++++++++++
4 files changed, 145 insertions(+), 3 deletions(-)
create mode 100644 dlls/opcservices/opc_private.h
create mode 100644 dlls/opcservices/package.c
diff --git a/dlls/opcservices/Makefile.in b/dlls/opcservices/Makefile.in
index 20d8eb5262..4a2d2945ae 100644
--- a/dlls/opcservices/Makefile.in
+++ b/dlls/opcservices/Makefile.in
@@ -2,7 +2,8 @@ MODULE = opcservices.dll
IMPORTS = uuid
C_SRCS = \
- factory.c
+ factory.c \
+ package.c
IDL_SRCS = \
opcservices.idl
diff --git a/dlls/opcservices/factory.c b/dlls/opcservices/factory.c
index dd6556db8a..b2a57c42ec 100644
--- a/dlls/opcservices/factory.c
+++ b/dlls/opcservices/factory.c
@@ -29,6 +29,8 @@
#include "wine/debug.h"
+#include "opc_private.h"
+
WINE_DEFAULT_DEBUG_CHANNEL(msopc);
static HRESULT WINAPI opc_factory_QueryInterface(IOpcFactory *iface, REFIID iid, void **out)
@@ -82,9 +84,9 @@ static HRESULT WINAPI opc_factory_CreateStreamOnFile(IOpcFactory *iface, LPCWSTR
static HRESULT WINAPI opc_factory_CreatePackage(IOpcFactory *iface, IOpcPackage **package)
{
- FIXME("iface %p, package %p.\n", iface, package);
+ TRACE("iface %p, package %p.\n", iface, package);
- return E_NOTIMPL;
+ return opc_package_create(package);
}
static HRESULT WINAPI opc_factory_ReadPackageFromStream(IOpcFactory *iface, IStream *stream,
diff --git a/dlls/opcservices/opc_private.h b/dlls/opcservices/opc_private.h
new file mode 100644
index 0000000000..492ec91280
--- /dev/null
+++ b/dlls/opcservices/opc_private.h
@@ -0,0 +1,22 @@
+/*
+ * 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
+ */
+
+#include "msopc.h"
+#include "wine/heap.h"
+
+extern HRESULT opc_package_create(IOpcPackage **package) DECLSPEC_HIDDEN;
diff --git a/dlls/opcservices/package.c b/dlls/opcservices/package.c
new file mode 100644
index 0000000000..527bf949e5
--- /dev/null
+++ b/dlls/opcservices/package.c
@@ -0,0 +1,117 @@
+/*
+ * 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_package
+{
+ IOpcPackage IOpcPackage_iface;
+ LONG refcount;
+};
+
+static inline struct opc_package *impl_from_IOpcPackage(IOpcPackage *iface)
+{
+ return CONTAINING_RECORD(iface, struct opc_package, IOpcPackage_iface);
+}
+
+static HRESULT WINAPI opc_package_QueryInterface(IOpcPackage *iface, REFIID iid, void **out)
+{
+ TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
+
+ if (IsEqualIID(iid, &IID_IOpcPackage) ||
+ IsEqualIID(iid, &IID_IUnknown))
+ {
+ *out = iface;
+ IOpcPackage_AddRef(iface);
+ return S_OK;
+ }
+
+ WARN("Unsupported interface %s.\n", debugstr_guid(iid));
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI opc_package_AddRef(IOpcPackage *iface)
+{
+ struct opc_package *package = impl_from_IOpcPackage(iface);
+ ULONG refcount = InterlockedIncrement(&package->refcount);
+
+ TRACE("%p increasing refcount to %u.\n", iface, refcount);
+
+ return refcount;
+}
+
+static ULONG WINAPI opc_package_Release(IOpcPackage *iface)
+{
+ struct opc_package *package = impl_from_IOpcPackage(iface);
+ ULONG refcount = InterlockedDecrement(&package->refcount);
+
+ TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+
+ if (!refcount)
+ heap_free(package);
+
+ return refcount;
+}
+
+static HRESULT WINAPI opc_package_GetPartSet(IOpcPackage *iface, IOpcPartSet **part_set)
+{
+ FIXME("iface %p, part_set %p stub!\n", iface, part_set);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI opc_package_GetRelationshipSet(IOpcPackage *iface, IOpcRelationshipSet **relationship_set)
+{
+ FIXME("iface %p, relationship_set %p stub!\n", iface, relationship_set);
+
+ return E_NOTIMPL;
+}
+
+static const IOpcPackageVtbl opc_package_vtbl =
+{
+ opc_package_QueryInterface,
+ opc_package_AddRef,
+ opc_package_Release,
+ opc_package_GetPartSet,
+ opc_package_GetRelationshipSet,
+};
+
+HRESULT opc_package_create(IOpcPackage **out)
+{
+ struct opc_package *package;
+
+ if (!(package = heap_alloc(sizeof(*package))))
+ return E_OUTOFMEMORY;
+
+ package->IOpcPackage_iface.lpVtbl = &opc_package_vtbl;
+ package->refcount = 1;
+
+ *out = &package->IOpcPackage_iface;
+ TRACE("Created package %p.\n", *out);
+ return S_OK;
+}
--
2.18.0
Aug. 30, 2018
[PATCH 1/3] include: Add IOpcPackage definition.
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
include/opcbase.idl | 15 ++++
include/opcobjectmodel.idl | 174 +++++++++++++++++++++++++++++++++++++
2 files changed, 189 insertions(+)
diff --git a/include/opcbase.idl b/include/opcbase.idl
index fc92675420..33f56ac077 100644
--- a/include/opcbase.idl
+++ b/include/opcbase.idl
@@ -25,3 +25,18 @@ typedef [v1_enum] enum
OPC_STREAM_IO_READ = 1,
OPC_STREAM_IO_WRITE = 2,
} OPC_STREAM_IO_MODE;
+
+typedef [v1_enum] enum
+{
+ OPC_COMPRESSION_NONE = -1,
+ OPC_COMPRESSION_NORMAL = 0,
+ OPC_COMPRESSION_MAXIMUM = 1,
+ OPC_COMPRESSION_FAST = 2,
+ OPC_COMPRESSION_SUPERFAST = 3,
+} OPC_COMPRESSION_OPTIONS;
+
+typedef [v1_enum] enum
+{
+ OPC_URI_TARGET_MODE_INTERNAL = 0,
+ OPC_URI_TARGET_MODE_EXTERNAL = 1,
+} OPC_URI_TARGET_MODE;
diff --git a/include/opcobjectmodel.idl b/include/opcobjectmodel.idl
index e5370d2e54..45bc8aa4a5 100644
--- a/include/opcobjectmodel.idl
+++ b/include/opcobjectmodel.idl
@@ -20,6 +20,11 @@
#pragma makedep install
#endif
+interface IOpcPart;
+interface IOpcPartUri;
+interface IOpcUri;
+interface IOpcRelationship;
+
typedef [v1_enum] enum
{
OPC_READ_DEFAULT = 0,
@@ -32,3 +37,172 @@ typedef [v1_enum] enum
OPC_WRITE_DEFAULT = 0,
OPC_WRITE_FORCE_ZIP32 = 1,
} OPC_WRITE_FLAGS;
+
+[
+ object,
+ uuid(42195949-3b79-4fc8-89c6-fc7fb979ee75),
+ pointer_default(ref)
+]
+interface IOpcPartEnumerator : IUnknown
+{
+ HRESULT MoveNext(
+ [out, retval] BOOL *has_next
+ );
+
+ HRESULT MovePrevious(
+ [out, retval] BOOL *has_previous
+ );
+
+ HRESULT GetCurrent(
+ [out, retval] IOpcPart **part
+ );
+
+ HRESULT Clone(
+ [out, retval] IOpcPartEnumerator **enumerator
+ );
+}
+
+[
+ object,
+ uuid(42195949-3b79-4fc8-89c6-fc7fb979ee76),
+ pointer_default(ref)
+]
+interface IOpcRelationshipEnumerator : IUnknown
+{
+ HRESULT MoveNext(
+ [out, retval] BOOL *has_next
+ );
+
+ HRESULT MovePrevious(
+ [out, retval] BOOL *has_previous
+ );
+
+ HRESULT GetCurrent(
+ [out, retval] IOpcRelationship **relationship
+ );
+
+ HRESULT Clone(
+ [out, retval] IOpcRelationshipEnumerator **enumerator
+ );
+}
+
+[
+ object,
+ uuid(42195949-3b79-4fc8-89c6-fc7fb979ee73),
+ pointer_default(ref)
+]
+interface IOpcPartSet : IUnknown
+{
+ HRESULT GetPart(
+ [in] IOpcPartUri *name,
+ [out, retval] IOpcPart **part
+ );
+
+ HRESULT CreatePart(
+ [in] IOpcPartUri *name,
+ [in, string] LPCWSTR content_type,
+ [in] OPC_COMPRESSION_OPTIONS compression_options,
+ [out, retval] IOpcPart **part
+ );
+
+ HRESULT DeletePart(
+ [in] IOpcPartUri *name
+ );
+
+ HRESULT PartExists(
+ [in] IOpcPartUri *name,
+ [out, retval] BOOL *exists
+ );
+
+ HRESULT GetEnumerator(
+ [out, retval] IOpcPartEnumerator **enumerator
+ );
+}
+
+[
+ object,
+ uuid(42195949-3b79-4fc8-89c6-fc7fb979ee72),
+ pointer_default(ref)
+]
+interface IOpcRelationship : IUnknown
+{
+ HRESULT GetId(
+ [out, string, retval] LPWSTR *id
+ );
+
+ HRESULT GetRelationshipType(
+ [out, string, retval] LPWSTR *type
+ );
+
+ HRESULT GetSourceUri(
+ [out, retval] IOpcUri **uri
+ );
+
+ HRESULT GetTargetUri(
+ [out, retval] IUri **target
+ );
+
+ HRESULT GetTargetMode(
+ [out, retval] OPC_URI_TARGET_MODE *target_mode
+ );
+}
+
+
+[
+ object,
+ uuid(42195949-3b79-4fc8-89c6-fc7fb979ee74),
+ pointer_default(ref)
+]
+interface IOpcRelationshipSet : IUnknown
+{
+ HRESULT GetRelationship(
+ [in, string] LPCWSTR id,
+ [out, retval] IOpcRelationship **relationship
+ );
+
+ HRESULT CreateRelationship(
+ [in, string, unique] LPCWSTR id,
+ [in, string] LPCWSTR type,
+ [in] IUri *target_uri,
+ [in] OPC_URI_TARGET_MODE target_mode,
+ [out, retval] IOpcRelationship **relationship
+ );
+
+ HRESULT DeleteRelationship(
+ [in, string] LPCWSTR id
+ );
+
+ HRESULT RelationshipExists(
+ [in, string] LPCWSTR id,
+ [out, retval] BOOL *exists
+ );
+
+ HRESULT GetEnumerator(
+ [out, retval] IOpcRelationshipEnumerator **enumerator
+ );
+
+ HRESULT GetEnumeratorForType(
+ [in, string] LPCWSTR type,
+ [out, retval] IOpcRelationshipEnumerator **enumerator
+ );
+
+ HRESULT GetRelationshipsContentStream(
+ [out, retval] IStream **stream
+ );
+}
+
+[
+ object,
+ uuid(42195949-3b79-4fc8-89c6-fc7fb979ee70),
+ pointer_default(ref)
+]
+interface IOpcPackage : IUnknown
+{
+ HRESULT GetPartSet(
+ [out, retval] IOpcPartSet **part_set
+ );
+
+ HRESULT GetRelationshipSet(
+ [out, retval] IOpcRelationshipSet **relationship_set
+ );
+}
--
2.18.0
Aug. 30, 2018
[PATCH 4/4] shlwapi: Fix some trace messages.
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/shlwapi/istream.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/shlwapi/istream.c b/dlls/shlwapi/istream.c
index 8cae1cd4af..43f53ffc79 100644
--- a/dlls/shlwapi/istream.c
+++ b/dlls/shlwapi/istream.c
@@ -118,7 +118,7 @@ static HRESULT WINAPI IStream_fnRead(IStream *iface, void* pv, ULONG cb, ULONG*
ISHFileStream *This = impl_from_IStream(iface);
DWORD dwRead = 0;
- TRACE("(%p,%p,0x%08x,%p)\n", This, pv, cb, pcbRead);
+ TRACE("(%p,%p,%u,%p)\n", This, pv, cb, pcbRead);
if (!ReadFile(This->hFile, pv, cb, &dwRead, NULL))
{
@@ -138,7 +138,7 @@ static HRESULT WINAPI IStream_fnWrite(IStream *iface, const void* pv, ULONG cb,
ISHFileStream *This = impl_from_IStream(iface);
DWORD dwWritten = 0;
- TRACE("(%p,%p,0x%08x,%p)\n", This, pv, cb, pcbWritten);
+ TRACE("(%p,%p,%u,%p)\n", This, pv, cb, pcbWritten);
switch (STGM_ACCESS_MODE(This->dwMode))
{
@@ -166,7 +166,7 @@ static HRESULT WINAPI IStream_fnSeek(IStream *iface, LARGE_INTEGER dlibMove,
ISHFileStream *This = impl_from_IStream(iface);
DWORD dwPos;
- TRACE("(%p,%d,%d,%p)\n", This, dlibMove.u.LowPart, dwOrigin, pNewPos);
+ TRACE("(%p,%s,%d,%p)\n", This, wine_dbgstr_longlong(dlibMove.QuadPart), dwOrigin, pNewPos);
IStream_Commit(iface, 0); /* If ever buffered, this will be needed */
dwPos = SetFilePointer(This->hFile, dlibMove.u.LowPart, NULL, dwOrigin);
@@ -188,7 +188,7 @@ static HRESULT WINAPI IStream_fnSetSize(IStream *iface, ULARGE_INTEGER libNewSiz
{
ISHFileStream *This = impl_from_IStream(iface);
- TRACE("(%p,%d)\n", This, libNewSize.u.LowPart);
+ TRACE("(%p,%s)\n", This, wine_dbgstr_longlong(libNewSize.QuadPart));
IStream_Commit(iface, 0); /* If ever buffered, this will be needed */
if( ! SetFilePointer( This->hFile, libNewSize.QuadPart, NULL, FILE_BEGIN ) )
@@ -211,7 +211,7 @@ static HRESULT WINAPI IStream_fnCopyTo(IStream *iface, IStream* pstm, ULARGE_INT
ULONGLONG ulSize;
HRESULT hRet = S_OK;
- TRACE("(%p,%p,%d,%p,%p)\n", This, pstm, cb.u.LowPart, pcbRead, pcbWritten);
+ TRACE("(%p,%p,%s,%p,%p)\n", This, pstm, wine_dbgstr_longlong(cb.QuadPart), pcbRead, pcbWritten);
if (pcbRead)
pcbRead->QuadPart = 0;
@@ -280,7 +280,7 @@ static HRESULT WINAPI IStream_fnLockUnlockRegion(IStream *iface, ULARGE_INTEGER
ULARGE_INTEGER cb, DWORD dwLockType)
{
ISHFileStream *This = impl_from_IStream(iface);
- TRACE("(%p,%d,%d,%d)\n", This, libOffset.u.LowPart, cb.u.LowPart, dwLockType);
+ TRACE("(%p,%s,%s,%d)\n", This, wine_dbgstr_longlong(libOffset.QuadPart), wine_dbgstr_longlong(cb.QuadPart), dwLockType);
return E_NOTIMPL;
}
@@ -327,7 +327,7 @@ static HRESULT WINAPI IStream_fnClone(IStream *iface, IStream** ppstm)
{
ISHFileStream *This = impl_from_IStream(iface);
- TRACE("(%p)\n",This);
+ TRACE("(%p,%p)\n", This, ppstm);
if (ppstm)
*ppstm = NULL;
return E_NOTIMPL;
@@ -540,7 +540,7 @@ HRESULT WINAPI SHIStream_Read(IStream *lpStream, LPVOID lpvDest, ULONG ulSize)
ULONG ulRead;
HRESULT hRet;
- TRACE("(%p,%p,%d)\n", lpStream, lpvDest, ulSize);
+ TRACE("(%p,%p,%u)\n", lpStream, lpvDest, ulSize);
hRet = IStream_Read(lpStream, lpvDest, ulSize, &ulRead);
--
2.18.0
Aug. 30, 2018
[PATCH 3/4] shlwapi: Use wrappers to call stream methods internally.
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/shlwapi/istream.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/dlls/shlwapi/istream.c b/dlls/shlwapi/istream.c
index 7ebb478b29..8cae1cd4af 100644
--- a/dlls/shlwapi/istream.c
+++ b/dlls/shlwapi/istream.c
@@ -55,9 +55,6 @@ static inline ISHFileStream *impl_from_IStream(IStream *iface)
return CONTAINING_RECORD(iface, ISHFileStream, IStream_iface);
}
-static HRESULT WINAPI IStream_fnCommit(IStream*,DWORD);
-
-
/**************************************************************************
* IStream_fnQueryInterface
*/
@@ -104,7 +101,7 @@ static ULONG WINAPI IStream_fnRelease(IStream *iface)
if (!refCount)
{
- IStream_fnCommit(iface, 0); /* If ever buffered, this will be needed */
+ IStream_Commit(iface, 0); /* If ever buffered, this will be needed */
LocalFree(This->lpszPath);
CloseHandle(This->hFile);
HeapFree(GetProcessHeap(), 0, This);
@@ -171,7 +168,7 @@ static HRESULT WINAPI IStream_fnSeek(IStream *iface, LARGE_INTEGER dlibMove,
TRACE("(%p,%d,%d,%p)\n", This, dlibMove.u.LowPart, dwOrigin, pNewPos);
- IStream_fnCommit(iface, 0); /* If ever buffered, this will be needed */
+ IStream_Commit(iface, 0); /* If ever buffered, this will be needed */
dwPos = SetFilePointer(This->hFile, dlibMove.u.LowPart, NULL, dwOrigin);
if( dwPos == INVALID_SET_FILE_POINTER )
return HRESULT_FROM_WIN32(GetLastError());
@@ -193,7 +190,7 @@ static HRESULT WINAPI IStream_fnSetSize(IStream *iface, ULARGE_INTEGER libNewSiz
TRACE("(%p,%d)\n", This, libNewSize.u.LowPart);
- IStream_fnCommit(iface, 0); /* If ever buffered, this will be needed */
+ IStream_Commit(iface, 0); /* If ever buffered, this will be needed */
if( ! SetFilePointer( This->hFile, libNewSize.QuadPart, NULL, FILE_BEGIN ) )
return E_FAIL;
@@ -224,7 +221,7 @@ static HRESULT WINAPI IStream_fnCopyTo(IStream *iface, IStream* pstm, ULARGE_INT
if (!pstm)
return S_OK;
- IStream_fnCommit(iface, 0); /* If ever buffered, this will be needed */
+ IStream_Commit(iface, 0); /* If ever buffered, this will be needed */
/* Copy data */
ulSize = cb.QuadPart;
@@ -235,7 +232,7 @@ static HRESULT WINAPI IStream_fnCopyTo(IStream *iface, IStream* pstm, ULARGE_INT
ulLeft = ulSize > sizeof(copyBuff) ? sizeof(copyBuff) : ulSize;
/* Read */
- hRet = IStream_fnRead(iface, copyBuff, ulLeft, &ulRead);
+ hRet = IStream_Read(iface, copyBuff, ulLeft, &ulRead);
if (FAILED(hRet) || ulRead == 0)
break;
if (pcbRead)
--
2.18.0
Aug. 30, 2018
[PATCH 2/4] shlwapi: Call actual Write() method for destination streams.
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/shlwapi/istream.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/shlwapi/istream.c b/dlls/shlwapi/istream.c
index 946d2c84b6..7ebb478b29 100644
--- a/dlls/shlwapi/istream.c
+++ b/dlls/shlwapi/istream.c
@@ -242,7 +242,7 @@ static HRESULT WINAPI IStream_fnCopyTo(IStream *iface, IStream* pstm, ULARGE_INT
pcbRead->QuadPart += ulRead;
/* Write */
- hRet = IStream_fnWrite(pstm, copyBuff, ulRead, &ulWritten);
+ hRet = IStream_Write(pstm, copyBuff, ulRead, &ulWritten);
if (pcbWritten)
pcbWritten->QuadPart += ulWritten;
if (FAILED(hRet) || ulWritten != ulLeft)
--
2.18.0
Aug. 30, 2018
[PATCH 1/4] shlwapi/tests: Add a simple QI test for file streams.
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/shlwapi/tests/istream.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/dlls/shlwapi/tests/istream.c b/dlls/shlwapi/tests/istream.c
index 300e9b9c00..f1854a283f 100644
--- a/dlls/shlwapi/tests/istream.c
+++ b/dlls/shlwapi/tests/istream.c
@@ -247,6 +247,27 @@ static void test_stream_read_write(IStream *stream, DWORD mode)
ok(buf[0] == 0x5e && buf[1] == 0xa7, "expected 5ea7, got %02x%02x\n", buf[0], buf[1]);
}
+static void test_stream_qi(IStream *stream)
+{
+ IUnknown *unk;
+ HRESULT hr;
+
+ hr = IStream_QueryInterface(stream, &IID_IStream, (void **)&unk);
+ ok(SUCCEEDED(hr), "Failed to get IStream interface, hr %#x.\n", hr);
+ IUnknown_Release(unk);
+
+ unk = NULL;
+ hr = IStream_QueryInterface(stream, &IID_ISequentialStream, (void **)&unk);
+todo_wine
+ ok(SUCCEEDED(hr) || broken(hr == E_NOINTERFACE) /* XP */, "Failed to get ISequentialStream interface, hr %#x.\n", hr);
+ if (unk)
+ IUnknown_Release(unk);
+
+ hr = IStream_QueryInterface(stream, &IID_IUnknown, (void **)&unk);
+ ok(SUCCEEDED(hr), "Failed to get IUnknown interface, hr %#x.\n", hr);
+ IUnknown_Release(unk);
+}
+
static void test_SHCreateStreamOnFileA(DWORD mode, DWORD stgm)
{
IStream * stream;
@@ -310,6 +331,7 @@ if (0) /* This test crashes on WinXP SP2 */
ok(stream != NULL, "SHCreateStreamOnFileA: expected a valid IStream object, got NULL\n");
if (stream) {
+ test_stream_qi(stream);
test_IStream_invalid_operations(stream, mode);
refcount = IStream_Release(stream);
@@ -422,6 +444,7 @@ static void test_SHCreateStreamOnFileW(DWORD mode, DWORD stgm)
ok(stream != NULL, "SHCreateStreamOnFileW: expected a valid IStream object, got NULL\n");
if (stream) {
+ test_stream_qi(stream);
test_IStream_invalid_operations(stream, mode);
refcount = IStream_Release(stream);
@@ -551,6 +574,7 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm)
ok(stream != NULL, "SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n");
if (stream) {
+ test_stream_qi(stream);
test_IStream_invalid_operations(stream, mode);
refcount = IStream_Release(stream);
--
2.18.0
Aug. 30, 2018