[PATCH 2/4] Implement stub dpnhupnp dll

Maarten Lankhorst m.b.lankhorst at gmail.com
Sat May 26 07:01:17 CDT 2007


-------------- next part --------------
>From 68ee76a179207e1c1572bb0f4ece8037b32b7ea5 Mon Sep 17 00:00:00 2001
From: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date: Sat, 26 May 2007 12:34:58 +0200
Subject: [PATCH 2/4] dpnhupnp: Create a stub dll

---
 configure.ac                  |    1 +
 dlls/Makefile.in              |    1 +
 dlls/dpnhupnp/Makefile.in     |   14 ++++++
 dlls/dpnhupnp/dpnhupnp.spec   |    5 ++
 dlls/dpnhupnp/dpnhupnp_main.c |   95 +++++++++++++++++++++++++++++++++++++++++
 5 files changed, 116 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8c9b427..6889e85 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1554,6 +1554,7 @@ AC_CONFIG_FILES([dlls/dplayx/tests/Makefile])
 AC_CONFIG_FILES([dlls/dpnaddr/Makefile])
 AC_CONFIG_FILES([dlls/dpnet/Makefile])
 AC_CONFIG_FILES([dlls/dpnhpast/Makefile])
+AC_CONFIG_FILES([dlls/dpnhupnp/Makefile])
 AC_CONFIG_FILES([dlls/dsound/Makefile])
 AC_CONFIG_FILES([dlls/dsound/tests/Makefile])
 AC_CONFIG_FILES([dlls/dswave/Makefile])
diff --git a/dlls/Makefile.in b/dlls/Makefile.in
index 5bb4e3a..813bc89 100644
--- a/dlls/Makefile.in
+++ b/dlls/Makefile.in
@@ -68,6 +68,7 @@ BASEDIRS = \
 	dpnaddr \
 	dpnet \
 	dpnhpast \
+	dpnhupnp \
 	dsound \
 	dswave \
 	dxdiagn \
diff --git a/dlls/dpnhupnp/Makefile.in b/dlls/dpnhupnp/Makefile.in
new file mode 100644
index 0000000..725778b
--- /dev/null
+++ b/dlls/dpnhupnp/Makefile.in
@@ -0,0 +1,14 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+MODULE    = dpnhupnp.dll
+IMPORTS   = kernel32 advapi32 ole32
+EXTRALIBS = -luuid
+
+C_SRCS = \
+	dpnhupnp_main.c
+
+ at MAKE_DLL_RULES@
+
+ at DEPENDENCIES@  # everything below this line is overwritten by make depend
\ No newline at end of file
diff --git a/dlls/dpnhupnp/dpnhupnp.spec b/dlls/dpnhupnp/dpnhupnp.spec
new file mode 100644
index 0000000..b40a5e6
--- /dev/null
+++ b/dlls/dpnhupnp/dpnhupnp.spec
@@ -0,0 +1,5 @@
+1 stdcall DirectPlayNATHelpCreate( ptr ptr )
+2 stdcall DllRegisterServer()
+3 stdcall DllCanUnloadNow()
+4 stdcall DllGetClassObject( long long ptr )
+5 stdcall DllUnregisterServer()
diff --git a/dlls/dpnhupnp/dpnhupnp_main.c b/dlls/dpnhupnp/dpnhupnp_main.c
new file mode 100644
index 0000000..51e97fc
--- /dev/null
+++ b/dlls/dpnhupnp/dpnhupnp_main.c
@@ -0,0 +1,95 @@
+/*
+ * DirectPlay NAT UPNP Helper
+ * Copyright (C) 2007 Maarten Lankhorst
+ *
+ * ClassFactory/Dll(Un)register based on qcap implementation
+ * Copyright (C) 2005 Rolf Kalbermatter
+ *
+ * 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 <assert.h>
+#include <stdio.h>
+#include <stdarg.h>
+
+#define COBJMACROS
+#define NONAMELESSSTRUCT
+#define NONAMELESSUNION
+
+#include "windef.h"
+#include "winbase.h"
+#include "winerror.h"
+#include "winreg.h"
+#include "objbase.h"
+#include "uuids.h"
+#include "strmif.h"
+
+#include "winsock2.h"
+#include "guiddef.h"
+#include "dpnathlp.h"
+
+#include "wine/unicode.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(upnp);
+
+BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
+{
+    TRACE("(%p, %08x, %p)\n", hInstDLL, fdwReason, lpv);
+
+    switch (fdwReason)
+    {
+        case DLL_PROCESS_ATTACH:
+            DisableThreadLibraryCalls(hInstDLL);
+            break;
+        case DLL_PROCESS_DETACH:
+            break;
+    }
+    return TRUE;
+}
+
+HRESULT WINAPI DllCanUnloadNow(void)
+{
+    FIXME("stub\n");
+    return S_FALSE;
+}
+
+HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
+{
+    FIXME("stub\n");
+    return E_FAIL;
+}
+
+HRESULT WINAPI DllRegisterServer(void)
+{
+    FIXME("stub\n");
+
+    return S_FALSE;
+}
+
+HRESULT WINAPI DllUnregisterServer(void)
+{
+    FIXME("stub\n");
+
+    return S_FALSE;
+}
+
+HRESULT WINAPI DirectPlayNATHelpCreate(const LPGUID pIID, void ** ppvInterface)
+{
+    FIXME("Stub!\n");
+    return E_FAIL;
+}
-- 
1.4.4.2



More information about the wine-patches mailing list