From eebe5809fdea60b81cfed15d8128eec592ba10cf Mon Sep 17 00:00:00 2001 From: Robert Dickenson Date: Mon, 17 Jun 2002 19:33:45 +0000 Subject: [PATCH] Created new empty module for buiding ws2help.dll Yet to define parameters and return values for all exports. svn path=/trunk/; revision=3111 --- reactos/lib/ws2help/debug.h | 65 +++++++ reactos/lib/ws2help/makefile | 19 ++ reactos/lib/ws2help/ws2help.c | 327 ++++++++++++++++++++++++++++++++ reactos/lib/ws2help/ws2help.def | 30 +++ reactos/lib/ws2help/ws2help.edf | 30 +++ reactos/lib/ws2help/ws2help.h | 22 +++ reactos/lib/ws2help/ws2help.rc | 39 ++++ 7 files changed, 532 insertions(+) create mode 100644 reactos/lib/ws2help/debug.h create mode 100644 reactos/lib/ws2help/makefile create mode 100644 reactos/lib/ws2help/ws2help.c create mode 100644 reactos/lib/ws2help/ws2help.def create mode 100644 reactos/lib/ws2help/ws2help.edf create mode 100644 reactos/lib/ws2help/ws2help.h create mode 100644 reactos/lib/ws2help/ws2help.rc diff --git a/reactos/lib/ws2help/debug.h b/reactos/lib/ws2help/debug.h new file mode 100644 index 00000000000..13a623f8fb3 --- /dev/null +++ b/reactos/lib/ws2help/debug.h @@ -0,0 +1,65 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS WinSock 2 Helper DLL for TCP/IP + * FILE: include/debug.h + * PURPOSE: Debugging support macros + * DEFINES: DBG - Enable debug output + * NASSERT - Disable assertions + */ +#ifndef __DEBUG_H +#define __DEBUG_H + +#define NORMAL_MASK 0x000000FF +#define SPECIAL_MASK 0xFFFFFF00 +#define MIN_TRACE 0x00000001 +#define MID_TRACE 0x00000002 +#define MAX_TRACE 0x00000003 + +#define DEBUG_ULTRA 0xFFFFFFFF + +#ifdef DBG + +extern DWORD DebugTraceLevel; + +#define WSH_DbgPrint(_t_, _x_) \ + if (((DebugTraceLevel & NORMAL_MASK) >= _t_) || \ + ((DebugTraceLevel & _t_) > NORMAL_MASK)) { \ + DbgPrint("(%hS:%d)(%hS) ", __FILE__, __LINE__, __FUNCTION__); \ + DbgPrint _x_; \ + } + +#ifdef ASSERT +#undef ASSERT +#endif + +#ifdef NASSERT +#define ASSERT(x) +#else /* NASSERT */ +#define ASSERT(x) if (!(x)) { WSH_DbgPrint(MIN_TRACE, ("Assertion "#x" failed at %s:%d\n", __FILE__, __LINE__)); ExitProcess(0); } +#endif /* NASSERT */ + +#else /* DBG */ + +#define WSH_DbgPrint(_t_, _x_) + +#define ASSERT(x) + +#endif /* DBG */ + + +#define assert(x) ASSERT(x) +#define assert_irql(x) ASSERT_IRQL(x) + + +#define UNIMPLEMENTED \ + WSH_DbgPrint(MIN_TRACE, ("(%s:%d)(%s) is unimplemented, \ + please try again later.\n", __FILE__, __LINE__, __FUNCTION__)); + +#define CHECKPOINT \ + WSH_DbgPrint(MIN_TRACE, ("\n")); + +#define CP CHECKPOINT + +#endif /* __DEBUG_H */ + +/* EOF */ diff --git a/reactos/lib/ws2help/makefile b/reactos/lib/ws2help/makefile new file mode 100644 index 00000000000..3bb2aa4f47b --- /dev/null +++ b/reactos/lib/ws2help/makefile @@ -0,0 +1,19 @@ +# $Id: makefile + +PATH_TO_TOP = ../.. + +TARGET_TYPE = dynlink + +TARGET_NAME = ws2help + +TARGET_BASE = 0x777c0000 + +TARGET_CFLAGS = -DUNICODE + +TARGET_SDKLIBS = ntdll.a kernel32.a ws2_32.a + +TARGET_OBJECTS = $(TARGET_NAME).o + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk diff --git a/reactos/lib/ws2help/ws2help.c b/reactos/lib/ws2help/ws2help.c new file mode 100644 index 00000000000..392d78b5ec9 --- /dev/null +++ b/reactos/lib/ws2help/ws2help.c @@ -0,0 +1,327 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS WinSock 2 Helper DLL for TCP/IP + * FILE: ws2help.c + * PURPOSE: DLL entry + * PROGRAMMERS: Robert D. Dickenson (robertdickenson@users.sourceforge.net) + * REVISIONS: + * RDD 18/06-2002 Created + */ +#include "ws2help.h" + +#ifdef DBG + +/* See debug.h for debug/trace constants */ +DWORD DebugTraceLevel = MAX_TRACE; + +#endif /* DBG */ + +/* To make the linker happy */ +VOID STDCALL KeBugCheck (ULONG BugCheckCode) {} + + +BOOL +EXPORT +DllMain(HANDLE hInstDll, + ULONG dwReason, + PVOID Reserved) +{ + WSH_DbgPrint(MIN_TRACE, ("DllMain of ws2help.dll\n")); + + switch (dwReason) { + case DLL_PROCESS_ATTACH: + /* Don't need thread attach notifications + so disable them to improve performance */ + DisableThreadLibraryCalls(hInstDll); + break; + + case DLL_THREAD_ATTACH: + break; + + case DLL_THREAD_DETACH: + break; + + case DLL_PROCESS_DETACH: + break; + } + return TRUE; +} + + +INT +EXPORT +WahCloseApcHelper( + IN PVOID HelperDllSocketContext, + IN SOCKET SocketHandle + ) +{ + UNIMPLEMENTED + + return 0; +} + +INT +EXPORT +WahCloseHandleHelper( + IN PVOID HelperDllSocketContext, + IN SOCKET SocketHandle + ) +{ + UNIMPLEMENTED + + return 0; +} + +INT +EXPORT +WahCloseNotificationHelper( + IN PVOID HelperDllSocketContext, + IN SOCKET SocketHandle + ) +{ + UNIMPLEMENTED + + return 0; +} + +INT +EXPORT +WahCloseSocketHandle( + IN PVOID HelperDllSocketContext, + IN SOCKET SocketHandle + ) +{ + UNIMPLEMENTED + + return 0; +} + +INT +EXPORT +WahCloseThread( + IN PVOID HelperDllSocketContext, + IN SOCKET SocketHandle + ) +{ + UNIMPLEMENTED + + return 0; +} + +INT +EXPORT +WahCompleteRequest( + IN PVOID HelperDllSocketContext, + IN SOCKET SocketHandle + ) +{ + UNIMPLEMENTED + + return 0; +} + +INT +EXPORT +WahCreateHandleContextTable( + IN PVOID HelperDllSocketContext, + IN SOCKET SocketHandle + ) +{ + UNIMPLEMENTED + + return 0; +} + +INT +EXPORT +WahCreateNotificationTable( + IN PVOID HelperDllSocketContext, + IN SOCKET SocketHandle + ) +{ + UNIMPLEMENTED + + return 0; +} + +INT +EXPORT +WahCreateSocketHandle( + IN PVOID HelperDllSocketContext, + IN SOCKET SocketHandle + ) +{ + UNIMPLEMENTED + + return 0; +} + +INT +EXPORT +WahDestroyHandleContextTable( + IN PVOID HelperDllSocketContext, + IN SOCKET SocketHandle + ) +{ + UNIMPLEMENTED + + return 0; +} + +INT +EXPORT +WahDisableNonIFSHandleSupport( + IN PVOID HelperDllSocketContext, + IN SOCKET SocketHandle + ) +{ + UNIMPLEMENTED + + return 0; +} + +INT +EXPORT +WahEnableNonIFSHandleSupport( + IN PVOID HelperDllSocketContext, + IN SOCKET SocketHandle + ) +{ + UNIMPLEMENTED + + return 0; +} + +INT +EXPORT +WahEnumerateHandleContexts( + IN PVOID HelperDllSocketContext, + IN SOCKET SocketHandle + ) +{ + UNIMPLEMENTED + + return 0; +} + +INT +EXPORT +WahInsertHandleContext( + IN PVOID HelperDllSocketContext, + IN SOCKET SocketHandle + ) +{ + UNIMPLEMENTED + + return 0; +} + +INT +EXPORT +WahNotifyAllProcesses( + IN PVOID HelperDllSocketContext, + IN SOCKET SocketHandle + ) +{ + UNIMPLEMENTED + + return 0; +} + +INT +EXPORT +WahOpenApcHelper( + IN PVOID HelperDllSocketContext, + IN SOCKET SocketHandle + ) +{ + UNIMPLEMENTED + + return 0; +} + +INT +EXPORT +WahOpenCurrentThread( + IN PVOID HelperDllSocketContext, + IN SOCKET SocketHandle + ) +{ + UNIMPLEMENTED + + return 0; +} + +INT +EXPORT +WahOpenHandleHelper( + IN PVOID HelperDllSocketContext, + IN SOCKET SocketHandle + ) +{ + UNIMPLEMENTED + + return 0; +} + +INT +EXPORT +WahOpenNotificationHandleHelper( + IN PVOID HelperDllSocketContext, + IN SOCKET SocketHandle + ) +{ + UNIMPLEMENTED + + return 0; +} + +INT +EXPORT +WahQueueUserApc( + IN PVOID HelperDllSocketContext, + IN SOCKET SocketHandle + ) +{ + UNIMPLEMENTED + + return 0; +} + +INT +EXPORT +WahReferenceContextByHandle( + IN PVOID HelperDllSocketContext, + IN SOCKET SocketHandle + ) +{ + UNIMPLEMENTED + + return 0; +} + +INT +EXPORT +WahRemoveHandleContext( + IN PVOID HelperDllSocketContext, + IN SOCKET SocketHandle + ) +{ + UNIMPLEMENTED + + return 0; +} + +INT +EXPORT +WahWaitForNotification( + IN PVOID HelperDllSocketContext, + IN SOCKET SocketHandle + ) +{ + UNIMPLEMENTED + + return 0; +} + +/* EOF */ diff --git a/reactos/lib/ws2help/ws2help.def b/reactos/lib/ws2help/ws2help.def new file mode 100644 index 00000000000..1c946737069 --- /dev/null +++ b/reactos/lib/ws2help/ws2help.def @@ -0,0 +1,30 @@ +; WS2HELP.DLL - Windows Sockets 2 Helper DLL for TCP/IP + +LIBRARY ws2help.dll + +EXPORTS +WahCloseApcHelper@8 +WahCloseHandleHelper@8 +WahCloseNotificationHelper@8 +WahCloseSocketHandle@8 +WahCloseThread@8 +WahCompleteRequest@8 +WahCreateHandleContextTable@8 +WahCreateNotificationTable@8 +WahCreateSocketHandle@8 +WahDestroyHandleContextTable@8 +WahDisableNonIFSHandleSupport@8 +WahEnableNonIFSHandleSupport@8 +WahEnumerateHandleContexts@8 +WahInsertHandleContext@8 +WahNotifyAllProcesses@8 +WahOpenApcHelper@8 +WahOpenCurrentThread@8 +WahOpenHandleHelper@8 +WahOpenNotificationHandleHelper@8 +WahQueueUserApc@8 +WahReferenceContextByHandle@8 +WahRemoveHandleContext@8 +WahWaitForNotification@8 + +; EOF diff --git a/reactos/lib/ws2help/ws2help.edf b/reactos/lib/ws2help/ws2help.edf new file mode 100644 index 00000000000..1e8a0a47aaf --- /dev/null +++ b/reactos/lib/ws2help/ws2help.edf @@ -0,0 +1,30 @@ +; WS2HELP.DLL - Windows Sockets 2 Helper DLL for TCP/IP + +LIBRARY ws2help.dll + +EXPORTS +WahCloseApcHelper=WahCloseApcHelper@8 +WahCloseHandleHelper=WahCloseHandleHelper@8 +WahCloseNotificationHelper=WahCloseNotificationHelper@8 +WahCloseSocketHandle=WahCloseSocketHandle@8 +WahCloseThread=WahCloseThread@8 +WahCompleteRequest=WahCompleteRequest@8 +WahCreateHandleContextTable=WahCreateHandleContextTable@8 +WahCreateNotificationTable=WahCreateNotificationTable@8 +WahCreateSocketHandle=WahCreateSocketHandle@8 +WahDestroyHandleContextTable=WahDestroyHandleContextTable@8 +WahDisableNonIFSHandleSupport=WahDisableNonIFSHandleSupport@8 +WahEnableNonIFSHandleSupport=WahEnableNonIFSHandleSupport@8 +WahEnumerateHandleContexts=WahEnumerateHandleContexts@8 +WahInsertHandleContext=WahInsertHandleContext@8 +WahNotifyAllProcesses=WahNotifyAllProcesses@8 +WahOpenApcHelper=WahOpenApcHelper@8 +WahOpenCurrentThread=WahOpenCurrentThread@8 +WahOpenHandleHelper=WahOpenHandleHelper@8 +WahOpenNotificationHandleHelper=WahOpenNotificationHandleHelper@8 +WahQueueUserApc=WahQueueUserApc@8 +WahReferenceContextByHandle=WahReferenceContextByHandle@8 +WahRemoveHandleContext=WahRemoveHandleContext@8 +WahWaitForNotification=WahWaitForNotification@8 + +; EOF diff --git a/reactos/lib/ws2help/ws2help.h b/reactos/lib/ws2help/ws2help.h new file mode 100644 index 00000000000..3f875b67d20 --- /dev/null +++ b/reactos/lib/ws2help/ws2help.h @@ -0,0 +1,22 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS WinSock 2 Helper DLL for TCP/IP + * FILE: include/ws2help.h + * PURPOSE: WinSock 2 Helper DLL for TCP/IP header + */ +#ifndef __WS2HELP_H +#define __WS2HELP_H + +#include +#include +#include +#include + +#define EXPORT STDCALL + +#define OBJ_NAME_PATH_SEPARATOR ((WCHAR)L'\\') + + +#endif /* __WS2HELP_H */ + +/* EOF */ diff --git a/reactos/lib/ws2help/ws2help.rc b/reactos/lib/ws2help/ws2help.rc new file mode 100644 index 00000000000..a2aad15f01e --- /dev/null +++ b/reactos/lib/ws2help/ws2help.rc @@ -0,0 +1,39 @@ +#include +#include + +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +VS_VERSION_INFO VERSIONINFO + FILEVERSION RES_UINT_FV_MAJOR,RES_UINT_FV_MINOR,RES_UINT_FV_REVISION,RES_UINT_FV_BUILD + PRODUCTVERSION RES_UINT_PV_MAJOR,RES_UINT_PV_MINOR,RES_UINT_PV_REVISION,RES_UINT_PV_BUILD + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", RES_STR_COMPANY_NAME + VALUE "FileDescription", "Windows Sockets 2 Helper API\0" + VALUE "FileVersion", RES_STR_FILE_VERSION + VALUE "InternalName", "ws2help\0" + VALUE "LegalCopyright", RES_STR_LEGAL_COPYRIGHT + VALUE "OriginalFilename", "ws2help.dll\0" + VALUE "ProductName", RES_STR_PRODUCT_NAME + VALUE "ProductVersion", RES_STR_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +