On 8/3/20 11:26 PM, Alistair Leslie-Hughes wrote:
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com
dlls/xactengine3_6/Makefile.in | 11 +++++++ dlls/xactengine3_6/main.c | 42 +++++++++++++++++++++++++++ dlls/xactengine3_6/xact_classes.idl | 28 ++++++++++++++++++ dlls/xactengine3_6/xactengine3_6.spec | 4 +++ 4 files changed, 85 insertions(+) create mode 100644 dlls/xactengine3_6/Makefile.in create mode 100644 dlls/xactengine3_6/main.c create mode 100644 dlls/xactengine3_6/xact_classes.idl create mode 100644 dlls/xactengine3_6/xactengine3_6.spec
I wonder if a better solution is to use preprocessor directives, similarly to how we do it in d3dcompiler (see the definition of IID_ID3D11ShaderReflection in d3d11shader.h). At least it'd be less files/code.
diff --git a/dlls/xactengine3_6/Makefile.in b/dlls/xactengine3_6/Makefile.in new file mode 100644 index 00000000000..ffd7020292e --- /dev/null +++ b/dlls/xactengine3_6/Makefile.in @@ -0,0 +1,11 @@ +MODULE = xactengine3_6.dll +IMPORTS = ole32 uuid +PARENTSRC = ../xactengine3_7 +EXTRALIBS = $(FAUDIO_LIBS) +EXTRAINCL = $(FAUDIO_CFLAGS)
+C_SRCS = \
- main.c \
- xact_dll.c
+IDL_SRCS = xact_classes.idl diff --git a/dlls/xactengine3_6/main.c b/dlls/xactengine3_6/main.c new file mode 100644 index 00000000000..53a75028691 --- /dev/null +++ b/dlls/xactengine3_6/main.c @@ -0,0 +1,42 @@ +/*
- Copyright (c) 2018 Ethan Lee 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 "config.h"
+#include <stdarg.h>
+#define COBJMACROS
+#include "xact_classes.h" +#include "wine/debug.h"
+WINE_DEFAULT_DEBUG_CHANNEL(xact3);
+extern IClassFactory XACTFactory;
+HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv) +{
- if (IsEqualGUID(rclsid, &CLSID_XACTEngine36))
- {
TRACE("(%s, %s, %p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
return IClassFactory_QueryInterface(&XACTFactory, riid, ppv);
- }
- FIXME("Unknown class %s\n", debugstr_guid(rclsid));
- return CLASS_E_CLASSNOTAVAILABLE;
+} diff --git a/dlls/xactengine3_6/xact_classes.idl b/dlls/xactengine3_6/xact_classes.idl new file mode 100644 index 00000000000..7a5b5ec202f --- /dev/null +++ b/dlls/xactengine3_6/xact_classes.idl @@ -0,0 +1,28 @@ +/*
- COM Classes for xactengine
- Copyright 2018 Ethan Lee 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
- */
+#pragma makedep register
+[
- helpstring("XACT3.6 Class"),
- threading(both),
- uuid(248d8a3b-6256-44d3-a018-2ac96c459f47)
+] +coclass XACTEngine36 { interface IXACT37Engine; } diff --git a/dlls/xactengine3_6/xactengine3_6.spec b/dlls/xactengine3_6/xactengine3_6.spec new file mode 100644 index 00000000000..b16365d0c9f --- /dev/null +++ b/dlls/xactengine3_6/xactengine3_6.spec @@ -0,0 +1,4 @@ +@ stdcall -private DllCanUnloadNow() +@ stdcall -private DllGetClassObject(ptr ptr ptr) +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer()