Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- Microsoft only distributes the header file, so I wrote the IDL based on MSDN documentation. --- include/Makefile.in | 1 + include/roparameterizediid.idl | 91 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 include/roparameterizediid.idl
diff --git a/include/Makefile.in b/include/Makefile.in index cc42f66ebd..d453dc8568 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -146,6 +146,7 @@ IDL_SRCS = \ pstore.idl \ qedit.idl \ richole.idl \ + roparameterizediid.idl \ row.idl \ rowchg.idl \ rowpos.idl \ diff --git a/include/roparameterizediid.idl b/include/roparameterizediid.idl new file mode 100644 index 0000000000..5c3ffd7b5c --- /dev/null +++ b/include/roparameterizediid.idl @@ -0,0 +1,91 @@ +/* + * Copyright 2017 Alex Henrie + * + * 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 + */ + +import "unknwn.idl"; + +typedef void *ROPARAMIIDHANDLE; + +[ + object +] +interface IRoSimpleMetaDataBuilder : IUnknown +{ + HRESULT SetDelegate( + GUID iid + ); + + HRESULT SetEnum( + const WCHAR *typename, + const WCHAR *basetype + ); + + HRESULT SetInterfaceGroupParameterizedDefault( + const WCHAR *typename, + UINT32 name_element_count, + const WCHAR **name_elements + ); + + HRESULT SetInterfaceGroupSimpleDefault( + const WCHAR *typename, + const WCHAR *default_name, + const GUID *default_iid + ); + + HRESULT SetParameterizedDelegate( + GUID iid, + UINT32 arg_count + ); + + HRESULT SetParameterizedInterface( + GUID iid, + UINT32 arg_count + ); + + HRESULT SetRuntimeClassParameterizedDefault( + GUID iid, + UINT32 name_element_count, + const WCHAR **name_elements + ); + + HRESULT SetRuntimeClassSimpleDefault( + const WCHAR *typename, + const WCHAR *default_name, + const GUID *default_iid + ); + + HRESULT SetStruct( + const WCHAR *typename, + UINT32 field_count, + const WCHAR **field_typenames + ); + + HRESULT SetWinRtInterface( + GUID iid + ); +} + +[ + object +] +interface IRoMetaDataLocator : IUnknown +{ + HRESULT Locate( + const WCHAR *typename, + IRoSimpleMetaDataBuilder *out + ); +}
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- Fixes https://bugs.winehq.org/show_bug.cgi?id=42701 --- .../api-ms-win-core-winrt-roparameterizediid-l1-1-0.spec | 2 +- dlls/combase/Makefile.in | 2 +- dlls/combase/combase.spec | 2 +- dlls/combase/roapi.c | 14 ++++++++++++++ 4 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/dlls/api-ms-win-core-winrt-roparameterizediid-l1-1-0/api-ms-win-core-winrt-roparameterizediid-l1-1-0.spec b/dlls/api-ms-win-core-winrt-roparameterizediid-l1-1-0/api-ms-win-core-winrt-roparameterizediid-l1-1-0.spec index 9fb16ab225..68db3e90a9 100644 --- a/dlls/api-ms-win-core-winrt-roparameterizediid-l1-1-0/api-ms-win-core-winrt-roparameterizediid-l1-1-0.spec +++ b/dlls/api-ms-win-core-winrt-roparameterizediid-l1-1-0/api-ms-win-core-winrt-roparameterizediid-l1-1-0.spec @@ -1,3 +1,3 @@ @ stub RoFreeParameterizedTypeExtra -@ stub RoGetParameterizedTypeInstanceIID +@ stdcall RoGetParameterizedTypeInstanceIID(long ptr ptr ptr ptr) combase.RoGetParameterizedTypeInstanceIID @ stub RoParameterizedTypeExtraGetTypeSignature diff --git a/dlls/combase/Makefile.in b/dlls/combase/Makefile.in index c5ab8d205d..b1d759e49a 100644 --- a/dlls/combase/Makefile.in +++ b/dlls/combase/Makefile.in @@ -1,5 +1,5 @@ MODULE = combase.dll -IMPORTS = ole32 +IMPORTS = ole32 uuid
C_SRCS = \ roapi.c \ diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec index 493e7968d1..c238eb82db 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -253,7 +253,7 @@ @ stub RoGetApartmentIdentifier @ stub RoGetErrorReportingFlags @ stub RoGetMatchingRestrictedErrorInfo -@ stub RoGetParameterizedTypeInstanceIID +@ stdcall RoGetParameterizedTypeInstanceIID(long ptr ptr ptr ptr) @ stub RoGetServerActivatableClasses @ stdcall RoInitialize(long) @ stub RoInspectCapturedStackBackTrace diff --git a/dlls/combase/roapi.c b/dlls/combase/roapi.c index a2dfd548f2..7dd269e09b 100644 --- a/dlls/combase/roapi.c +++ b/dlls/combase/roapi.c @@ -18,6 +18,7 @@
#include "objbase.h" #include "roapi.h" +#include "roparameterizediid.h" #include "hstring.h"
#include "wine/debug.h" @@ -55,3 +56,16 @@ HRESULT WINAPI RoGetActivationFactory(HSTRING classid, REFIID iid, void **factor FIXME("stub: %p %p %p\n", classid, iid, factory); return E_NOTIMPL; } + +/*********************************************************************** + * RoGetParameterizedTypeInstanceIID (combase.@) + */ +HRESULT WINAPI RoGetParameterizedTypeInstanceIID(UINT32 name_element_count, const WCHAR **name_elements, + const IRoMetaDataLocator *meta_data_locator, GUID *iid, + ROPARAMIIDHANDLE *hiid) +{ + FIXME("stub: %d %p %p %s %p\n", name_element_count, name_elements, meta_data_locator, wine_dbgstr_guid(iid), hiid); + if (iid) *iid = GUID_NULL; + if (hiid) *hiid = INVALID_HANDLE_VALUE; + return E_NOTIMPL; +}
Hi Alex,
On 13.11.2017 06:00, Alex Henrie wrote:
diff --git a/include/roparameterizediid.idl b/include/roparameterizediid.idl new file mode 100644 index 0000000000..5c3ffd7b5c --- /dev/null +++ b/include/roparameterizediid.idl
Note that PSDK headers have plain (not IDL-based) header for that. IDL still may be a good choice for Wine, but in this case you may want to mark it as winrt with a pragma. See windows.foundation.idl for an example.
@@ -0,0 +1,91 @@ +/*
- Copyright 2017 Alex Henrie
- 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
- */
+import "unknwn.idl";
+typedef void *ROPARAMIIDHANDLE;
+[
- object
+] +interface IRoSimpleMetaDataBuilder : IUnknown
As far as I can see, this shouldn't inherit from IUnknown.
Thanks,
Jacek
2017-11-13 7:53 GMT-07:00 Jacek Caban jacek@codeweavers.com:
Hi Alex,
On 13.11.2017 06:00, Alex Henrie wrote:
diff --git a/include/roparameterizediid.idl b/include/roparameterizediid.idl new file mode 100644 index 0000000000..5c3ffd7b5c --- /dev/null +++ b/include/roparameterizediid.idl
Note that PSDK headers have plain (not IDL-based) header for that. IDL still may be a good choice for Wine, but in this case you may want to mark it as winrt with a pragma. See windows.foundation.idl for an example.
OK.
@@ -0,0 +1,91 @@ +/*
- Copyright 2017 Alex Henrie
- 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
- */
+import "unknwn.idl";
+typedef void *ROPARAMIIDHANDLE;
+[
- object
+] +interface IRoSimpleMetaDataBuilder : IUnknown
As far as I can see, this shouldn't inherit from IUnknown.
You're right, MSDN says that it inherits from IUnknown, but the SDK header does not have any IUnknown methods.
-Alex