Module: wine
Branch: master
Commit: 9d2a1e8adcaa9c642922286b8672f46a984d9417
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9d2a1e8adcaa9c642922286b8…
Author: Ismael Barros <razielmine(a)gmail.com>
Date: Tue Jul 22 22:23:16 2008 +0300
dplayx: Basic implementation of dpwsockx.dll, needed by dplayx.
---
Makefile.in | 2 +
configure | 3 ++
configure.ac | 1 +
dlls/Makefile.in | 1 +
dlls/dpwsockx/Makefile.in | 13 ++++++++
dlls/dpwsockx/dpwsockx.spec | 3 ++
dlls/dpwsockx/dpwsockx_dll.h | 30 +++++++++++++++++++
dlls/dpwsockx/dpwsockx_main.c | 63 +++++++++++++++++++++++++++++++++++++++++
8 files changed, 116 insertions(+), 0 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 1e7f4d8..6af86c4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -257,6 +257,7 @@ ALL_MAKEFILES = \
dlls/dpnet/Makefile \
dlls/dpnhpast/Makefile \
dlls/dpnlobby/Makefile \
+ dlls/dpwsockx/Makefile \
dlls/dsound/Makefile \
dlls/dsound/tests/Makefile \
dlls/dssenh/Makefile \
@@ -688,6 +689,7 @@ dlls/dpnaddr/Makefile: dlls/dpnaddr/Makefile.in dlls/Makedll.rules
dlls/dpnet/Makefile: dlls/dpnet/Makefile.in dlls/Makedll.rules
dlls/dpnhpast/Makefile: dlls/dpnhpast/Makefile.in dlls/Makedll.rules
dlls/dpnlobby/Makefile: dlls/dpnlobby/Makefile.in dlls/Makedll.rules
+dlls/dpwsockx/Makefile: dlls/dpwsockx/Makefile.in dlls/Makedll.rules
dlls/dsound/Makefile: dlls/dsound/Makefile.in dlls/Makedll.rules
dlls/dsound/tests/Makefile: dlls/dsound/tests/Makefile.in dlls/Maketest.rules
dlls/dssenh/Makefile: dlls/dssenh/Makefile.in dlls/Makedll.rules
diff --git a/configure b/configure
index 7cfa0fd..746e742 100755
--- a/configure
+++ b/configure
@@ -21941,6 +21941,8 @@ ac_config_files="$ac_config_files dlls/dpnhpast/Makefile"
ac_config_files="$ac_config_files dlls/dpnlobby/Makefile"
+ac_config_files="$ac_config_files dlls/dpwsockx/Makefile"
+
ac_config_files="$ac_config_files dlls/dsound/Makefile"
ac_config_files="$ac_config_files dlls/dsound/tests/Makefile"
@@ -23248,6 +23250,7 @@ do
"dlls/dpnet/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/dpnet/Makefile" ;;
"dlls/dpnhpast/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/dpnhpast/Makefile" ;;
"dlls/dpnlobby/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/dpnlobby/Makefile" ;;
+ "dlls/dpwsockx/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/dpwsockx/Makefile" ;;
"dlls/dsound/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/dsound/Makefile" ;;
"dlls/dsound/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/dsound/tests/Makefile" ;;
"dlls/dssenh/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/dssenh/Makefile" ;;
diff --git a/configure.ac b/configure.ac
index 7417f30..57abe38 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1801,6 +1801,7 @@ AC_CONFIG_FILES([dlls/dpnaddr/Makefile])
AC_CONFIG_FILES([dlls/dpnet/Makefile])
AC_CONFIG_FILES([dlls/dpnhpast/Makefile])
AC_CONFIG_FILES([dlls/dpnlobby/Makefile])
+AC_CONFIG_FILES([dlls/dpwsockx/Makefile])
AC_CONFIG_FILES([dlls/dsound/Makefile])
AC_CONFIG_FILES([dlls/dsound/tests/Makefile])
AC_CONFIG_FILES([dlls/dssenh/Makefile])
diff --git a/dlls/Makefile.in b/dlls/Makefile.in
index 0eac4a0..e597876 100644
--- a/dlls/Makefile.in
+++ b/dlls/Makefile.in
@@ -90,6 +90,7 @@ BASEDIRS = \
dpnet \
dpnhpast \
dpnlobby \
+ dpwsockx \
dsound \
dssenh \
dswave \
diff --git a/dlls/dpwsockx/Makefile.in b/dlls/dpwsockx/Makefile.in
new file mode 100644
index 0000000..cebac28
--- /dev/null
+++ b/dlls/dpwsockx/Makefile.in
@@ -0,0 +1,13 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR = @srcdir@
+VPATH = @srcdir@
+MODULE = dpwsockx.dll
+IMPORTS = kernel32
+
+C_SRCS = \
+ dpwsockx_main.c
+
+@MAKE_DLL_RULES@
+
+@DEPENDENCIES@ # everything below this line is overwritten by make depend
diff --git a/dlls/dpwsockx/dpwsockx.spec b/dlls/dpwsockx/dpwsockx.spec
new file mode 100644
index 0000000..5f84adc
--- /dev/null
+++ b/dlls/dpwsockx/dpwsockx.spec
@@ -0,0 +1,3 @@
+1 stdcall SPInit(ptr)
+3 stub DPWS_GetEnumPort
+4 stub DPWS_BuildIPMessageHeader
diff --git a/dlls/dpwsockx/dpwsockx_dll.h b/dlls/dpwsockx/dpwsockx_dll.h
new file mode 100644
index 0000000..08ae11c
--- /dev/null
+++ b/dlls/dpwsockx/dpwsockx_dll.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2008 Ismael Barros Barros
+ *
+ * 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
+ */
+
+#ifndef __WINE_DPWSOCKX_DLL_H
+#define __WINE_DPWSOCKX_DLL_H
+
+#include "windef.h"
+#include "winbase.h"
+#include "winnt.h"
+#include "wine/dplaysp.h"
+
+
+HRESULT WINAPI SPInit( LPSPINITDATA );
+
+#endif /* __WINE_DPWSOCKX_DLL_H */
diff --git a/dlls/dpwsockx/dpwsockx_main.c b/dlls/dpwsockx/dpwsockx_main.c
new file mode 100644
index 0000000..271915a
--- /dev/null
+++ b/dlls/dpwsockx/dpwsockx_main.c
@@ -0,0 +1,63 @@
+/* Internet TCP/IP and IPX Connection For DirectPlay
+ *
+ * Copyright 2008 Ismael Barros Barros
+ *
+ * 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>
+
+#include "windef.h"
+#include "winbase.h"
+#include "dpwsockx_dll.h"
+#include "wine/debug.h"
+#include "dplay.h"
+#include "wine/dplaysp.h"
+
+
+WINE_DEFAULT_DEBUG_CHANNEL(dplay);
+
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+{
+ TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
+
+ switch (fdwReason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ /* TODO: Initialization */
+ DisableThreadLibraryCalls(hinstDLL);
+ break;
+ case DLL_PROCESS_DETACH:
+ break;
+ default:
+ break;
+ }
+
+ return TRUE;
+}
+
+
+/******************************************************************
+ * SPInit (DPWSOCKX.1)
+ */
+HRESULT WINAPI SPInit( LPSPINITDATA lpspData )
+{
+ /* TODO: Initialize callbacks and needed fields in lpspData */
+ return DPERR_UNSUPPORTED;
+}