mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
Added WinSock 2 DLL Stubs
svn path=/trunk/; revision=1362
This commit is contained in:
parent
2a734dfd02
commit
ab2b4e0924
16 changed files with 2745 additions and 0 deletions
6
reactos/lib/ws2_32/.cvsignore
Normal file
6
reactos/lib/ws2_32/.cvsignore
Normal file
|
@ -0,0 +1,6 @@
|
|||
ws2_32.a
|
||||
ws2_32.dll
|
||||
ws2_32.coff
|
||||
base.tmp
|
||||
junk.tmp
|
||||
temp.exp
|
48
reactos/lib/ws2_32/include/catalog.h
Normal file
48
reactos/lib/ws2_32/include/catalog.h
Normal file
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS WinSock 2 DLL
|
||||
* FILE: include/catalog.h
|
||||
* PURPOSE: Service Provider Catalog definitions
|
||||
*/
|
||||
#ifndef __CATALOG_H
|
||||
#define __CATALOG_H
|
||||
|
||||
#include <ws2_32.h>
|
||||
#include <wsahelp.h>
|
||||
|
||||
typedef struct _CATALOG_ENTRY {
|
||||
LIST_ENTRY ListEntry;
|
||||
CRITICAL_SECTION Lock;
|
||||
WCHAR LibraryName[MAX_PATH];
|
||||
HMODULE hModule;
|
||||
PWINSOCK_MAPPING Mapping;
|
||||
LPWSPSTARTUP WSPStartup;
|
||||
WSPDATA WSPData;
|
||||
WSPPROC_TABLE ProcTable;
|
||||
} CATALOG_ENTRY, *PCATALOG_ENTRY;
|
||||
|
||||
extern LIST_ENTRY Catalog;
|
||||
|
||||
PCATALOG_ENTRY CreateCatalogEntry(
|
||||
LPWSTR LibraryName);
|
||||
|
||||
INT DestroyCatalogEntry(
|
||||
PCATALOG_ENTRY Provider);
|
||||
|
||||
PCATALOG_ENTRY LocateProvider(
|
||||
LPWSAPROTOCOL_INFOW lpProtocolInfo);
|
||||
|
||||
INT LoadProvider(
|
||||
PCATALOG_ENTRY Provider,
|
||||
LPWSAPROTOCOL_INFOW lpProtocolInfo);
|
||||
|
||||
INT UnloadProvider(
|
||||
PCATALOG_ENTRY Provider);
|
||||
|
||||
VOID CreateCatalog(VOID);
|
||||
|
||||
VOID DestroyCatalog(VOID);
|
||||
|
||||
#endif /* __CATALOG_H */
|
||||
|
||||
/* EOF */
|
70
reactos/lib/ws2_32/include/debug.h
Normal file
70
reactos/lib/ws2_32/include/debug.h
Normal file
|
@ -0,0 +1,70 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS WinSock 2 DLL
|
||||
* 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 Get_DbgPrint(quote...) L##quote
|
||||
|
||||
#define WS_DbgPrint(_t_, _x_) \
|
||||
if (((DebugTraceLevel & NORMAL_MASK) >= _t_) || \
|
||||
((DebugTraceLevel & _t_) > NORMAL_MASK)) { \
|
||||
WCHAR _buffer[256]; \
|
||||
swprintf(_buffer, L"(%S:%d)(%S) ", __FILE__, __LINE__, __FUNCTION__); \
|
||||
OutputDebugStringW(_buffer); \
|
||||
swprintf(_buffer, Get_DbgPrint _x_); \
|
||||
OutputDebugStringW(_buffer); \
|
||||
}
|
||||
|
||||
#ifdef ASSERT
|
||||
#undef ASSERT
|
||||
#endif
|
||||
|
||||
#ifdef NASSERT
|
||||
#define ASSERT(x)
|
||||
#else /* NASSERT */
|
||||
#define ASSERT(x) if (!(x)) { WS_DbgPrint(MIN_TRACE, ("Assertion "#x" failed at %s:%d\n", __FILE__, __LINE__)); KeBugCheck(0); }
|
||||
#endif /* NASSERT */
|
||||
|
||||
#define ASSERT_IRQL(x) ASSERT(KeGetCurrentIrql() <= (x))
|
||||
|
||||
#else /* DBG */
|
||||
|
||||
#define WS_DbgPrint(_t_, _x_)
|
||||
|
||||
#define ASSERT_IRQL(x)
|
||||
#define ASSERT(x)
|
||||
|
||||
#endif /* DBG */
|
||||
|
||||
|
||||
#define assert(x) ASSERT(x)
|
||||
#define assert_irql(x) ASSERT_IRQL(x)
|
||||
|
||||
|
||||
#define UNIMPLEMENTED \
|
||||
WS_DbgPrint(MIN_TRACE, ("is unimplemented, please try again later.\n"));
|
||||
|
||||
#define CHECKPOINT \
|
||||
do { WS_DbgPrint(MIN_TRACE, ("\n")); } while(0);
|
||||
|
||||
#endif /* __DEBUG_H */
|
||||
|
||||
/* EOF */
|
114
reactos/lib/ws2_32/include/upcall.h
Normal file
114
reactos/lib/ws2_32/include/upcall.h
Normal file
|
@ -0,0 +1,114 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS WinSock 2 DLL
|
||||
* FILE: include/upcall.h
|
||||
* PURPOSE: Upcall function defintions
|
||||
*/
|
||||
#ifndef __UPCALL_H
|
||||
#define __UPCALL_H
|
||||
|
||||
#include <ws2_32.h>
|
||||
|
||||
BOOL
|
||||
WSPAPI
|
||||
WPUCloseEvent(
|
||||
IN WSAEVENT hEvent,
|
||||
OUT LPINT lpErrno);
|
||||
|
||||
INT
|
||||
WSPAPI
|
||||
WPUCloseSocketHandle(
|
||||
IN SOCKET s,
|
||||
OUT LPINT lpErrno);
|
||||
|
||||
INT
|
||||
WSPAPI
|
||||
WPUCloseThread(
|
||||
IN LPWSATHREADID lpThreadId,
|
||||
OUT LPINT lpErrno);
|
||||
|
||||
WSAEVENT
|
||||
WSPAPI
|
||||
WPUCreateEvent(
|
||||
OUT LPINT lpErrno);
|
||||
|
||||
SOCKET
|
||||
WSPAPI
|
||||
WPUCreateSocketHandle(
|
||||
IN DWORD dwCatalogEntryId,
|
||||
IN DWORD dwContext,
|
||||
OUT LPINT lpErrno);
|
||||
|
||||
SOCKET
|
||||
WSPAPI
|
||||
WPUFDIsSet(
|
||||
IN SOCKET s,
|
||||
IN LPFD_SET set);
|
||||
|
||||
INT
|
||||
WSPAPI
|
||||
WPUGetProviderPath(
|
||||
IN LPGUID lpProviderId,
|
||||
OUT LPWSTR lpszProviderDllPath,
|
||||
IN OUT LPINT lpProviderDllPathLen,
|
||||
OUT LPINT lpErrno);
|
||||
|
||||
SOCKET
|
||||
WSPAPI
|
||||
WPUModifyIFSHandle(
|
||||
IN DWORD dwCatalogEntryId,
|
||||
IN SOCKET ProposedHandle,
|
||||
OUT LPINT lpErrno);
|
||||
|
||||
INT
|
||||
WSPAPI
|
||||
WPUOpenCurrentThread(
|
||||
OUT LPWSATHREADID lpThreadId,
|
||||
OUT LPINT lpErrno);
|
||||
|
||||
BOOL
|
||||
WSPAPI
|
||||
WPUPostMessage(
|
||||
IN HWND hWnd,
|
||||
IN UINT Msg,
|
||||
IN WPARAM wParam,
|
||||
IN LPARAM lParam);
|
||||
|
||||
INT
|
||||
WSPAPI
|
||||
WPUQueryBlockingCallback(
|
||||
IN DWORD dwCatalogEntryId,
|
||||
OUT LPBLOCKINGCALLBACK FAR* lplpfnCallback,
|
||||
OUT LPDWORD lpdwContext,
|
||||
OUT LPINT lpErrno);
|
||||
|
||||
INT
|
||||
WSPAPI
|
||||
WPUQuerySocketHandleContext(
|
||||
IN SOCKET s,
|
||||
OUT LPDWORD lpContext,
|
||||
OUT LPINT lpErrno);
|
||||
|
||||
INT
|
||||
WSPAPI
|
||||
WPUQueueApc(
|
||||
IN LPWSATHREADID lpThreadId,
|
||||
IN LPWSAUSERAPC lpfnUserApc,
|
||||
IN DWORD dwContext,
|
||||
OUT LPINT lpErrno);
|
||||
|
||||
BOOL
|
||||
WSPAPI
|
||||
WPUResetEvent(
|
||||
IN WSAEVENT hEvent,
|
||||
OUT LPINT lpErrno);
|
||||
|
||||
BOOL
|
||||
WSPAPI
|
||||
WPUSetEvent(
|
||||
IN WSAEVENT hEvent,
|
||||
OUT LPINT lpErrno);
|
||||
|
||||
#endif /* __UPCALL_H */
|
||||
|
||||
/* EOF */
|
40
reactos/lib/ws2_32/include/ws2_32.h
Normal file
40
reactos/lib/ws2_32/include/ws2_32.h
Normal file
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS WinSock 2 DLL
|
||||
* FILE: include/ws2_32.h
|
||||
* PURPOSE: WinSock 2 DLL header
|
||||
*/
|
||||
#ifndef __WS2_32_H
|
||||
#define __WS2_32_H
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <winsock2.h>
|
||||
#include <ws2spi.h>
|
||||
#include <windows.h>
|
||||
#include <debug.h>
|
||||
|
||||
/* Exported by ntdll.dll, but where is the prototype? */
|
||||
unsigned long strtoul(const char *nptr, char **endptr, int base);
|
||||
|
||||
|
||||
#define EXPORT STDCALL
|
||||
|
||||
extern HANDLE GlobalHeap;
|
||||
extern WSPUPCALLTABLE UpcallTable;
|
||||
|
||||
|
||||
typedef struct _WINSOCK_THREAD_BLOCK {
|
||||
INT LastErrorValue; /* Error value from last function that failed */
|
||||
BOOL Initialized; /* TRUE if WSAStartup() has been successfully called */
|
||||
} WINSOCK_THREAD_BLOCK, *PWINSOCK_THREAD_BLOCK;
|
||||
|
||||
|
||||
/* Macros */
|
||||
|
||||
#define WSAINITIALIZED (((PWINSOCK_THREAD_BLOCK)NtCurrentTeb()->WinSockData)->Initialized)
|
||||
|
||||
#define WSASETINITIALIZED (((PWINSOCK_THREAD_BLOCK)NtCurrentTeb()->WinSockData)->Initialized = TRUE)
|
||||
|
||||
#endif /* __WS2_32_H */
|
||||
|
||||
/* EOF */
|
98
reactos/lib/ws2_32/makefile
Normal file
98
reactos/lib/ws2_32/makefile
Normal file
|
@ -0,0 +1,98 @@
|
|||
# Makefile for ReactOS WinSock 2 DLL
|
||||
|
||||
PATH_TO_TOP = ../..
|
||||
|
||||
BASE_CFLAGS = -Iinclude -I../../include -DUNICODE
|
||||
|
||||
TARGETNAME=ws2_32
|
||||
|
||||
MISC_OBJECTS = misc/dllmain.o misc/catalog.o misc/event.o misc/ns.o \
|
||||
misc/stubs.o misc/upcall.o
|
||||
|
||||
RESOURCE_OBJECT = $(TARGETNAME).coff
|
||||
|
||||
OBJECTS = $(MISC_OBJECTS) $(RESOURCE_OBJECT)
|
||||
|
||||
LIBS = ../ntdll/ntdll.a \
|
||||
../kernel32/kernel32.a \
|
||||
../advapi32/advapi32.a
|
||||
|
||||
ifeq ($(DOSCLI),yes)
|
||||
CLEAN_FILES = misc\*.o \
|
||||
$(TARGETNAME).o $(TARGETNAME).a junk.tmp base.tmp temp.exp \
|
||||
$(TARGETNAME).dll $(TARGETNAME).sym $(TARGETNAME).coff
|
||||
else
|
||||
CLEAN_FILES = misc/*.o \
|
||||
$(TARGETNAME).o $(TARGETNAME).a junk.tmp base.tmp temp.exp \
|
||||
$(TARGETNAME).dll $(TARGETNAME).sym $(TARGETNAME).coff
|
||||
endif
|
||||
|
||||
all: $(TARGETNAME).dll
|
||||
|
||||
$(TARGETNAME).coff: $(TARGETNAME).rc ../../include/reactos/resource.h
|
||||
|
||||
$(TARGETNAME).a: $(OBJECTS)
|
||||
$(LD) -r $(OBJECTS) -o $(TARGETNAME).a
|
||||
|
||||
$(TARGETNAME).dll: $(LIBS) $(OBJECTS) $(TARGETNAME).def
|
||||
$(LD) -r $(OBJECTS) -o $(TARGETNAME).o
|
||||
$(DLLTOOL) \
|
||||
--dllname $(TARGETNAME).dll \
|
||||
--def $(TARGETNAME).def \
|
||||
--kill-at \
|
||||
--output-lib $(TARGETNAME).a
|
||||
$(CC) \
|
||||
$(TARGETNAME).o \
|
||||
$(LIBS) \
|
||||
-specs=$(TARGETNAME)_specs \
|
||||
-mdll \
|
||||
-o junk.tmp \
|
||||
-Wl,--base-file,base.tmp
|
||||
- $(RM) junk.tmp
|
||||
$(DLLTOOL) \
|
||||
--dllname $(TARGETNAME).dll \
|
||||
--base-file base.tmp \
|
||||
--output-exp temp.exp \
|
||||
--def $(TARGETNAME).edf
|
||||
- $(RM) base.tmp
|
||||
$(CC) \
|
||||
$(TARGETNAME).o \
|
||||
$(LIBS) \
|
||||
-specs=$(TARGETNAME)_specs \
|
||||
-mdll \
|
||||
-o $(TARGETNAME).dll \
|
||||
-Wl,--image-base,0x10000 \
|
||||
-Wl,--file-alignment,0x1000 \
|
||||
-Wl,--section-alignment,0x1000 \
|
||||
-Wl,temp.exp
|
||||
- $(RM) temp.exp
|
||||
$(NM) --numeric-sort $(TARGETNAME).dll > $(TARGETNAME).sym
|
||||
|
||||
|
||||
clean: $(CLEAN_FILES:%=%_clean)
|
||||
|
||||
$(CLEAN_FILES:%=%_clean): %_clean:
|
||||
- $(RM) $*
|
||||
|
||||
.PHONY: clean $(CLEAN_FILES:%=%_clean)
|
||||
|
||||
install: $(FLOPPY_DIR)/dlls/$(TARGETNAME).dll
|
||||
|
||||
$(FLOPPY_DIR)/dlls/$(TARGETNAME).dll: $(TARGETNAME).dll
|
||||
ifeq ($(DOSCLI),yes)
|
||||
$(CP) $(TARGETNAME).dll $(FLOPPY_DIR)\dlls\$(TARGETNAME).dll
|
||||
else
|
||||
$(CP) $(TARGETNAME).dll $(FLOPPY_DIR)/dlls/$(TARGETNAME).dll
|
||||
endif
|
||||
|
||||
dist: $(DIST_DIR)/dlls/$(TARGETNAME).dll
|
||||
|
||||
$(DIST_DIR)/dlls/$(TARGETNAME).dll: $(TARGETNAME).dll
|
||||
ifeq ($(DOSCLI),yes)
|
||||
$(CP) $(TARGETNAME).dll ..\..\$(DIST_DIR)\dlls\$(TARGETNAME).dll
|
||||
else
|
||||
$(CP) $(TARGETNAME).dll ../../$(DIST_DIR)/dlls/$(TARGETNAME).dll
|
||||
endif
|
||||
|
||||
include ../../rules.mak
|
||||
|
193
reactos/lib/ws2_32/misc/catalog.c
Normal file
193
reactos/lib/ws2_32/misc/catalog.c
Normal file
|
@ -0,0 +1,193 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS WinSock 2 DLL
|
||||
* FILE: misc/catalog.c
|
||||
* PURPOSE: Service Provider Catalog
|
||||
* PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
|
||||
* REVISIONS:
|
||||
* CSH 01/09-2000 Created
|
||||
*/
|
||||
#include <ws2_32.h>
|
||||
#include <catalog.h>
|
||||
|
||||
|
||||
LIST_ENTRY CatalogListHead;
|
||||
CRITICAL_SECTION CatalogLock;
|
||||
|
||||
PCATALOG_ENTRY CreateCatalogEntry(
|
||||
LPWSTR LibraryName)
|
||||
{
|
||||
PCATALOG_ENTRY Provider;
|
||||
|
||||
Provider = HeapAlloc(GlobalHeap, 0, sizeof(CATALOG_ENTRY));
|
||||
if (!Provider)
|
||||
return NULL;
|
||||
|
||||
InitializeCriticalSection(&Provider->Lock);
|
||||
Provider->hModule = (HMODULE)INVALID_HANDLE_VALUE;
|
||||
lstrcpyW(Provider->LibraryName, LibraryName);
|
||||
Provider->Mapping = NULL;
|
||||
|
||||
EnterCriticalSection(&CatalogLock);
|
||||
InsertTailList(&CatalogListHead, &Provider->ListEntry);
|
||||
LeaveCriticalSection(&CatalogLock);
|
||||
|
||||
return Provider;
|
||||
}
|
||||
|
||||
|
||||
INT DestroyCatalogEntry(
|
||||
PCATALOG_ENTRY Provider)
|
||||
{
|
||||
INT Status;
|
||||
|
||||
EnterCriticalSection(&CatalogLock);
|
||||
RemoveEntryList(&Provider->ListEntry);
|
||||
LeaveCriticalSection(&CatalogLock);
|
||||
|
||||
HeapFree(GlobalHeap, 0, Provider->Mapping);
|
||||
|
||||
if (Provider->hModule != (HMODULE)INVALID_HANDLE_VALUE) {
|
||||
Status = UnloadProvider(Provider);
|
||||
} else {
|
||||
Status = NO_ERROR;
|
||||
}
|
||||
|
||||
DeleteCriticalSection(&Provider->Lock);
|
||||
|
||||
HeapFree(GlobalHeap, 0, Provider);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
PCATALOG_ENTRY LocateProvider(
|
||||
LPWSAPROTOCOL_INFOW lpProtocolInfo)
|
||||
{
|
||||
PLIST_ENTRY CurrentEntry;
|
||||
PCATALOG_ENTRY Provider;
|
||||
UINT i;
|
||||
|
||||
EnterCriticalSection(&CatalogLock);
|
||||
CurrentEntry = CatalogListHead.Flink;
|
||||
while (CurrentEntry != &CatalogListHead) {
|
||||
Provider = CONTAINING_RECORD(CurrentEntry,
|
||||
CATALOG_ENTRY,
|
||||
ListEntry);
|
||||
|
||||
for (i = 0; i < Provider->Mapping->Rows; i++) {
|
||||
if ((lpProtocolInfo->iAddressFamily == Provider->Mapping->Mapping[i].AddressFamily) &&
|
||||
(lpProtocolInfo->iSocketType == Provider->Mapping->Mapping[i].SocketType) &&
|
||||
((lpProtocolInfo->iProtocol == Provider->Mapping->Mapping[i].Protocol) ||
|
||||
(lpProtocolInfo->iSocketType == SOCK_RAW))) {
|
||||
LeaveCriticalSection(&CatalogLock);
|
||||
return Provider;
|
||||
}
|
||||
}
|
||||
|
||||
CurrentEntry = CurrentEntry->Flink;
|
||||
}
|
||||
LeaveCriticalSection(&CatalogLock);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
INT LoadProvider(
|
||||
PCATALOG_ENTRY Provider,
|
||||
LPWSAPROTOCOL_INFOW lpProtocolInfo)
|
||||
{
|
||||
INT Status = NO_ERROR;
|
||||
|
||||
WS_DbgPrint(MIN_TRACE, ("Loading provider...\n"));
|
||||
|
||||
if (Provider->hModule == (HMODULE)INVALID_HANDLE_VALUE) {
|
||||
/* DLL is not loaded so load it now */
|
||||
Provider->hModule = LoadLibrary(Provider->LibraryName);
|
||||
if (Provider->hModule != (HMODULE)INVALID_HANDLE_VALUE) {
|
||||
Provider->WSPStartup = (LPWSPSTARTUP)GetProcAddress(Provider->hModule,
|
||||
"WSPStartup");
|
||||
if (Provider->WSPStartup) {
|
||||
Status = WSPStartup(MAKEWORD(2, 2),
|
||||
&Provider->WSPData,
|
||||
lpProtocolInfo,
|
||||
UpcallTable,
|
||||
&Provider->ProcTable);
|
||||
} else
|
||||
Status = ERROR_BAD_PROVIDER;
|
||||
} else
|
||||
Status = ERROR_DLL_NOT_FOUND;
|
||||
} else
|
||||
Status = NO_ERROR;
|
||||
|
||||
WS_DbgPrint(MIN_TRACE, ("Status %d\n", Status));
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
INT UnloadProvider(
|
||||
PCATALOG_ENTRY Provider)
|
||||
{
|
||||
INT Status = NO_ERROR;
|
||||
|
||||
if (Provider->hModule != (HMODULE)INVALID_HANDLE_VALUE) {
|
||||
Provider->ProcTable.lpWSPCleanup(&Status);
|
||||
|
||||
if (!FreeLibrary(Provider->hModule))
|
||||
Status = GetLastError();
|
||||
|
||||
Provider->hModule = (HMODULE)INVALID_HANDLE_VALUE;
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
VOID CreateCatalog(VOID)
|
||||
{
|
||||
PCATALOG_ENTRY Provider;
|
||||
|
||||
InitializeCriticalSection(&CatalogLock);
|
||||
|
||||
InitializeListHead(&CatalogListHead);
|
||||
|
||||
/* FIXME: Read service provider catalog from registry */
|
||||
#if 1
|
||||
Provider = CreateCatalogEntry(L"msafd.dll");
|
||||
if (!Provider)
|
||||
return;
|
||||
|
||||
Provider->Mapping = HeapAlloc(GlobalHeap, 0, sizeof(WINSOCK_MAPPING) + 3 * sizeof(DWORD));
|
||||
if (!Provider->Mapping)
|
||||
return;
|
||||
|
||||
Provider->Mapping->Rows = 1;
|
||||
Provider->Mapping->Columns = 3;
|
||||
Provider->Mapping->Mapping[0].AddressFamily = AF_INET;
|
||||
Provider->Mapping->Mapping[0].SocketType = SOCK_RAW;
|
||||
Provider->Mapping->Mapping[0].Protocol = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
VOID DestroyCatalog(VOID)
|
||||
{
|
||||
PLIST_ENTRY CurrentEntry;
|
||||
PCATALOG_ENTRY Provider;
|
||||
|
||||
CurrentEntry = CatalogListHead.Flink;
|
||||
while (CurrentEntry != &CatalogListHead) {
|
||||
Provider = CONTAINING_RECORD(CurrentEntry,
|
||||
CATALOG_ENTRY,
|
||||
ListEntry);
|
||||
|
||||
DestroyCatalogEntry(Provider);
|
||||
|
||||
CurrentEntry = CurrentEntry->Flink;
|
||||
}
|
||||
|
||||
DeleteCriticalSection(&CatalogLock);
|
||||
}
|
||||
|
||||
/* EOF */
|
272
reactos/lib/ws2_32/misc/dllmain.c
Normal file
272
reactos/lib/ws2_32/misc/dllmain.c
Normal file
|
@ -0,0 +1,272 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS WinSock 2 DLL
|
||||
* FILE: misc/dllmain.c
|
||||
* PURPOSE: DLL entry point
|
||||
* PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
|
||||
* REVISIONS:
|
||||
* CSH 01/09-2000 Created
|
||||
*/
|
||||
#include <ws2_32.h>
|
||||
#include <catalog.h>
|
||||
#include <upcall.h>
|
||||
|
||||
#ifdef DBG
|
||||
|
||||
/* See debug.h for debug/trace constants */
|
||||
DWORD DebugTraceLevel = MIN_TRACE;
|
||||
|
||||
#endif /* DBG */
|
||||
|
||||
/* To make the linker happy */
|
||||
VOID STDCALL KeBugCheck (ULONG BugCheckCode) {}
|
||||
|
||||
|
||||
HANDLE GlobalHeap;
|
||||
WSPUPCALLTABLE UpcallTable;
|
||||
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSAGetLastError(VOID)
|
||||
{
|
||||
PWINSOCK_THREAD_BLOCK p = NtCurrentTeb()->WinSockData;
|
||||
|
||||
if (p) {
|
||||
return p->LastErrorValue;
|
||||
} else {
|
||||
/* FIXME: What error code should we use here? Can this even happen? */
|
||||
return ERROR_BAD_ENVIRONMENT;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
EXPORT
|
||||
WSASetLastError(
|
||||
IN INT iError)
|
||||
{
|
||||
PWINSOCK_THREAD_BLOCK p = NtCurrentTeb()->WinSockData;
|
||||
|
||||
if (p)
|
||||
p->LastErrorValue = iError;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSAStartup(
|
||||
IN WORD wVersionRequested,
|
||||
OUT LPWSADATA lpWSAData)
|
||||
{
|
||||
WS_DbgPrint(MIN_TRACE, ("WSAStartup of ws2_32.dll\n"));
|
||||
|
||||
lpWSAData->wVersion = wVersionRequested;
|
||||
lpWSAData->wHighVersion = 2;
|
||||
lstrcpyA(lpWSAData->szDescription, "WinSock 2.0");
|
||||
lstrcpyA(lpWSAData->szSystemStatus, "Running");
|
||||
lpWSAData->iMaxSockets = 0;
|
||||
lpWSAData->iMaxUdpDg = 0;
|
||||
lpWSAData->lpVendorInfo = NULL;
|
||||
|
||||
WSASETINITIALIZED;
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSACleanup(VOID)
|
||||
{
|
||||
WS_DbgPrint(MIN_TRACE, ("WSACleanup of ws2_32.dll\n"));
|
||||
|
||||
if (!WSAINITIALIZED) {
|
||||
WSASetLastError(WSANOTINITIALISED);
|
||||
return WSANOTINITIALISED;
|
||||
}
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
|
||||
SOCKET
|
||||
EXPORT
|
||||
WSASocketA(
|
||||
IN INT af,
|
||||
IN INT type,
|
||||
IN INT protocol,
|
||||
IN LPWSAPROTOCOL_INFOA lpProtocolInfo,
|
||||
IN GROUP g,
|
||||
IN DWORD dwFlags)
|
||||
/*
|
||||
* FUNCTION: Creates a new socket
|
||||
*/
|
||||
{
|
||||
WSAPROTOCOL_INFOW ProtocolInfoW;
|
||||
LPWSAPROTOCOL_INFOW p;
|
||||
UNICODE_STRING StringU;
|
||||
ANSI_STRING StringA;
|
||||
|
||||
if (lpProtocolInfo) {
|
||||
memcpy(&ProtocolInfoW,
|
||||
lpProtocolInfo,
|
||||
sizeof(WSAPROTOCOL_INFOA) -
|
||||
sizeof(CHAR) * (WSAPROTOCOL_LEN + 1));
|
||||
|
||||
RtlInitAnsiString(&StringA, (LPSTR)lpProtocolInfo->szProtocol);
|
||||
RtlInitUnicodeString(&StringU, (LPWSTR)&ProtocolInfoW.szProtocol);
|
||||
RtlAnsiStringToUnicodeString(&StringU,
|
||||
&StringA,
|
||||
FALSE);
|
||||
p = &ProtocolInfoW;
|
||||
} else {
|
||||
p = NULL;
|
||||
}
|
||||
|
||||
return WSASocketW(af,
|
||||
type,
|
||||
protocol,
|
||||
p,
|
||||
g,
|
||||
dwFlags);
|
||||
}
|
||||
|
||||
|
||||
SOCKET
|
||||
EXPORT
|
||||
WSASocketW(
|
||||
IN INT af,
|
||||
IN INT type,
|
||||
IN INT protocol,
|
||||
IN LPWSAPROTOCOL_INFOW lpProtocolInfo,
|
||||
IN GROUP g,
|
||||
IN DWORD dwFlags)
|
||||
/*
|
||||
* FUNCTION: Creates a new socket
|
||||
* ARGUMENTS:
|
||||
* af = Address family
|
||||
* type = Socket type
|
||||
* protocol = Protocol type
|
||||
* lpProtocolInfo = Pointer to protocol information
|
||||
* g = Reserved
|
||||
* dwFlags = Socket flags
|
||||
* RETURNS:
|
||||
* Created socket, or INVALID_SOCKET if it could not be created
|
||||
*/
|
||||
{
|
||||
INT Status;
|
||||
SOCKET Socket;
|
||||
PCATALOG_ENTRY Provider;
|
||||
WSAPROTOCOL_INFOW ProtocolInfo;
|
||||
|
||||
if (!WSAINITIALIZED) {
|
||||
WSASetLastError(WSANOTINITIALISED);
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
|
||||
if (!lpProtocolInfo) {
|
||||
lpProtocolInfo = &ProtocolInfo;
|
||||
ZeroMemory(&ProtocolInfo, sizeof(WSAPROTOCOL_INFOW));
|
||||
|
||||
ProtocolInfo.iAddressFamily = af;
|
||||
ProtocolInfo.iSocketType = type;
|
||||
ProtocolInfo.iProtocol = protocol;
|
||||
}
|
||||
|
||||
Provider = LocateProvider(lpProtocolInfo);
|
||||
if (!Provider) {
|
||||
WSASetLastError(WSAEAFNOSUPPORT);
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
|
||||
Status = LoadProvider(Provider, lpProtocolInfo);
|
||||
|
||||
if (Status != NO_ERROR) {
|
||||
WSASetLastError(Status);
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
|
||||
Socket = Provider->ProcTable.lpWSPSocket(af,
|
||||
type,
|
||||
protocol,
|
||||
lpProtocolInfo,
|
||||
g,
|
||||
dwFlags,
|
||||
&Status);
|
||||
if (Status != NO_ERROR) {
|
||||
WSASetLastError(Status);
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
|
||||
return Socket;
|
||||
}
|
||||
|
||||
|
||||
BOOL
|
||||
STDCALL
|
||||
DllMain(PVOID hInstDll,
|
||||
ULONG dwReason,
|
||||
PVOID Reserved)
|
||||
{
|
||||
WS_DbgPrint(MIN_TRACE, ("DllMain of ws2_32.dll\n"));
|
||||
|
||||
#if 0
|
||||
switch (dwReason) {
|
||||
case DLL_PROCESS_ATTACH:
|
||||
GlobalHeap = HeapCreate(0, 0, 0);
|
||||
if (!GlobalHeap)
|
||||
return FALSE;
|
||||
|
||||
if (ReadCatalog() != NO_ERROR)
|
||||
return FALSE;
|
||||
|
||||
UpcallTable.lpWPUCloseEvent = WPUCloseEvent;
|
||||
UpcallTable.lpWPUCloseSocketHandle = WPUCloseSocketHandle;
|
||||
UpcallTable.lpWPUCreateEvent = WPUCreateEvent;
|
||||
UpcallTable.lpWPUCreateSocketHandle = WPUCreateSocketHandle;
|
||||
UpcallTable.lpWPUFDIsSet = WPUFDIsSet;
|
||||
UpcallTable.lpWPUGetProviderPath = WPUGetProviderPath;
|
||||
UpcallTable.lpWPUModifyIFSHandle = WPUModifyIFSHandle;
|
||||
UpcallTable.lpWPUPostMessage = WPUPostMessage;
|
||||
UpcallTable.lpWPUQueryBlockingCallback = WPUQueryBlockingCallback;
|
||||
UpcallTable.lpWPUQuerySocketHandleContext = WPUQuerySocketHandleContext;
|
||||
UpcallTable.lpWPUQueueApc = WPUQueueApc;
|
||||
UpcallTable.lpWPUResetEvent = WPUResetEvent;
|
||||
UpcallTable.lpWPUSetEvent = WPUSetEvent;
|
||||
UpcallTable.lpWPUOpenCurrentThread = WPUOpenCurrentThread;
|
||||
UpcallTable.lpWPUCloseThread = WPUCloseThread;
|
||||
break;
|
||||
|
||||
case DLL_THREAD_ATTACH: {
|
||||
PWINSOCK_THREAD_BLOCK p;
|
||||
|
||||
p = HeapAlloc(GlobalHeap, 0, sizeof(WINSOCK_THREAD_BLOCK));
|
||||
if (p) {
|
||||
p->LastErrorValue = NO_ERROR;
|
||||
p->Initialized = FALSE;
|
||||
NtCurrentTeb()->WinSockData = p;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case DLL_THREAD_DETACH: {
|
||||
PWINSOCK_THREAD_BLOCK p = NtCurrentTeb()->WinSockData;
|
||||
|
||||
if (p)
|
||||
HeapFree(GlobalHeap, 0, p);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case DLL_PROCESS_DETACH:
|
||||
DestroyCatalog();
|
||||
HeapDestroy(GlobalHeap);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* EOF */
|
69
reactos/lib/ws2_32/misc/event.c
Normal file
69
reactos/lib/ws2_32/misc/event.c
Normal file
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS WinSock 2 DLL
|
||||
* FILE: misc/event.c
|
||||
* PURPOSE: Event handling
|
||||
* PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
|
||||
* REVISIONS:
|
||||
* CSH 01/09-2000 Created
|
||||
*/
|
||||
#include <ws2_32.h>
|
||||
|
||||
BOOL
|
||||
EXPORT
|
||||
WSACloseEvent(
|
||||
IN WSAEVENT hEvent)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
WSAEVENT
|
||||
EXPORT
|
||||
WSACreateEvent(VOID)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return (WSAEVENT)0;
|
||||
}
|
||||
|
||||
|
||||
BOOL
|
||||
EXPORT
|
||||
WSAResetEvent(
|
||||
IN WSAEVENT hEvent)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
BOOL
|
||||
EXPORT
|
||||
WSASetEvent(
|
||||
IN WSAEVENT hEvent)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
DWORD
|
||||
EXPORT
|
||||
WSAWaitForMultipleEvents(
|
||||
IN DWORD cEvents,
|
||||
IN CONST WSAEVENT FAR* lphEvents,
|
||||
IN BOOL fWaitAll,
|
||||
IN DWORD dwTimeout,
|
||||
IN BOOL fAlertable)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* EOF */
|
504
reactos/lib/ws2_32/misc/ns.c
Normal file
504
reactos/lib/ws2_32/misc/ns.c
Normal file
|
@ -0,0 +1,504 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS WinSock 2 DLL
|
||||
* FILE: misc/ns.c
|
||||
* PURPOSE: Namespace APIs
|
||||
* PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
|
||||
* REVISIONS:
|
||||
* CSH 01/09-2000 Created
|
||||
*/
|
||||
#include <ws2_32.h>
|
||||
|
||||
/* Name resolution APIs */
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSAAddressToStringA(
|
||||
IN LPSOCKADDR lpsaAddress,
|
||||
IN DWORD dwAddressLength,
|
||||
IN LPWSAPROTOCOL_INFOA lpProtocolInfo,
|
||||
OUT LPSTR lpszAddressString,
|
||||
IN OUT LPDWORD lpdwAddressStringLength)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSAAddressToStringW(
|
||||
IN LPSOCKADDR lpsaAddress,
|
||||
IN DWORD dwAddressLength,
|
||||
IN LPWSAPROTOCOL_INFOW lpProtocolInfo,
|
||||
OUT LPWSTR lpszAddressString,
|
||||
IN OUT LPDWORD lpdwAddressStringLength)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSAEnumNameSpaceProvidersA(
|
||||
IN OUT LPDWORD lpdwBufferLength,
|
||||
OUT LPWSANAMESPACE_INFOA lpnspBuffer)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSAEnumNameSpaceProvidersW(
|
||||
IN OUT LPDWORD lpdwBufferLength,
|
||||
OUT LPWSANAMESPACE_INFOW lpnspBuffer)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSAGetServiceClassInfoA(
|
||||
IN LPGUID lpProviderId,
|
||||
IN LPGUID lpServiceClassId,
|
||||
IN OUT LPDWORD lpdwBufferLength,
|
||||
OUT LPWSASERVICECLASSINFOA lpServiceClassInfo)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSAGetServiceClassInfoW(
|
||||
IN LPGUID lpProviderId,
|
||||
IN LPGUID lpServiceClassId,
|
||||
IN OUT LPDWORD lpdwBufferLength,
|
||||
OUT LPWSASERVICECLASSINFOW lpServiceClassInfo)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSAGetServiceClassNameByClassIdA(
|
||||
IN LPGUID lpServiceClassId,
|
||||
OUT LPSTR lpszServiceClassName,
|
||||
IN OUT LPDWORD lpdwBufferLength)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSAGetServiceClassNameByClassIdW(
|
||||
IN LPGUID lpServiceClassId,
|
||||
OUT LPWSTR lpszServiceClassName,
|
||||
IN OUT LPDWORD lpdwBufferLength)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSAInstallServiceClassA(
|
||||
IN LPWSASERVICECLASSINFOA lpServiceClassInfo)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSAInstallServiceClassW(
|
||||
IN LPWSASERVICECLASSINFOW lpServiceClassInfo)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSALookupServiceBeginA(
|
||||
IN LPWSAQUERYSETA lpqsRestrictions,
|
||||
IN DWORD dwControlFlags,
|
||||
OUT LPHANDLE lphLookup)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSALookupServiceBeginW(
|
||||
IN LPWSAQUERYSETW lpqsRestrictions,
|
||||
IN DWORD dwControlFlags,
|
||||
OUT LPHANDLE lphLookup)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSALookupServiceEnd(
|
||||
IN HANDLE hLookup)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSALookupServiceNextA(
|
||||
IN HANDLE hLookup,
|
||||
IN DWORD dwControlFlags,
|
||||
IN OUT LPDWORD lpdwBufferLength,
|
||||
OUT LPWSAQUERYSETA lpqsResults)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSALookupServiceNextW(
|
||||
IN HANDLE hLookup,
|
||||
IN DWORD dwControlFlags,
|
||||
IN OUT LPDWORD lpdwBufferLength,
|
||||
OUT LPWSAQUERYSETW lpqsResults)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSARemoveServiceClass(
|
||||
IN LPGUID lpServiceClassId)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSASetServiceA(
|
||||
IN LPWSAQUERYSETA lpqsRegInfo,
|
||||
IN WSAESETSERVICEOP essOperation,
|
||||
IN DWORD dwControlFlags)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSASetServiceW(
|
||||
IN LPWSAQUERYSETW lpqsRegInfo,
|
||||
IN WSAESETSERVICEOP essOperation,
|
||||
IN DWORD dwControlFlags)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSAStringToAddressA(
|
||||
IN LPSTR AddressString,
|
||||
IN INT AddressFamily,
|
||||
IN LPWSAPROTOCOL_INFOA lpProtocolInfo,
|
||||
OUT LPSOCKADDR lpAddress,
|
||||
IN OUT LPINT lpAddressLength)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSAStringToAddressW(
|
||||
IN LPWSTR AddressString,
|
||||
IN INT AddressFamily,
|
||||
IN LPWSAPROTOCOL_INFOW lpProtocolInfo,
|
||||
OUT LPSOCKADDR lpAddress,
|
||||
IN OUT LPINT lpAddressLength)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* WinSock 1.1 compatible name resolution APIs */
|
||||
|
||||
LPHOSTENT
|
||||
EXPORT
|
||||
gethostbyaddr(
|
||||
IN CONST CHAR FAR* addr,
|
||||
IN INT len,
|
||||
IN INT type)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return (LPHOSTENT)NULL;
|
||||
}
|
||||
|
||||
LPHOSTENT
|
||||
EXPORT
|
||||
gethostbyname(
|
||||
IN CONST CHAR FAR* name)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return (LPHOSTENT)NULL;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
gethostname(
|
||||
OUT CHAR FAR* name,
|
||||
IN INT namelen)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
LPPROTOENT
|
||||
EXPORT
|
||||
getprotobyname(
|
||||
IN CONST CHAR FAR* name)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return (LPPROTOENT)NULL;
|
||||
}
|
||||
|
||||
|
||||
LPPROTOENT
|
||||
EXPORT
|
||||
getprotobynumber(
|
||||
IN INT number)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return (LPPROTOENT)NULL;
|
||||
}
|
||||
|
||||
LPSERVENT
|
||||
EXPORT
|
||||
getservbyname(
|
||||
IN CONST CHAR FAR* name,
|
||||
IN CONST CHAR FAR* proto)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return (LPSERVENT)NULL;
|
||||
}
|
||||
|
||||
|
||||
LPSERVENT
|
||||
EXPORT
|
||||
getservbyport(
|
||||
IN INT port,
|
||||
IN CONST CHAR FAR* proto)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return (LPSERVENT)NULL;
|
||||
}
|
||||
|
||||
|
||||
ULONG
|
||||
EXPORT
|
||||
inet_addr(
|
||||
IN CONST CHAR FAR* cp)
|
||||
/*
|
||||
* FUNCTION: Converts a string containing an IPv4 address to an unsigned long
|
||||
* ARGUMENTS:
|
||||
* cp = Pointer to string with address to convert
|
||||
* RETURNS:
|
||||
* Binary representation of IPv4 address, or INADDR_NONE
|
||||
*/
|
||||
{
|
||||
UINT i;
|
||||
PCHAR p;
|
||||
ULONG u = 0;
|
||||
|
||||
/* FIXME: Little endian version only */
|
||||
|
||||
p = (PCHAR)cp;
|
||||
|
||||
if (strlen(p) == 0)
|
||||
return INADDR_NONE;
|
||||
|
||||
if (strcmp(p, " ") == 0)
|
||||
return 0;
|
||||
|
||||
for (i = 3; i >= 0; i--) {
|
||||
u += (strtoul(p, &p, 0) << (i * 8));
|
||||
|
||||
if (strlen(p) == 0)
|
||||
return u;
|
||||
|
||||
if (p[0] != '.')
|
||||
return INADDR_NONE;
|
||||
|
||||
p++;
|
||||
}
|
||||
|
||||
return u;
|
||||
}
|
||||
|
||||
|
||||
CHAR FAR*
|
||||
EXPORT
|
||||
inet_ntoa(
|
||||
IN IN_ADDR in)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return (CHAR FAR*)NULL;
|
||||
}
|
||||
|
||||
|
||||
HANDLE
|
||||
EXPORT
|
||||
WSAAsyncGetHostByAddr(
|
||||
IN HWND hWnd,
|
||||
IN UINT wMsg,
|
||||
IN CONST CHAR FAR* addr,
|
||||
IN INT len,
|
||||
IN INT type,
|
||||
OUT CHAR FAR* buf,
|
||||
IN INT buflen)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return (HANDLE)0;
|
||||
}
|
||||
|
||||
|
||||
HANDLE
|
||||
EXPORT
|
||||
WSAAsyncGetHostByName(
|
||||
IN HWND hWnd,
|
||||
IN UINT wMsg,
|
||||
IN CONST CHAR FAR* name,
|
||||
OUT CHAR FAR* buf,
|
||||
IN INT buflen)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return (HANDLE)0;
|
||||
}
|
||||
|
||||
|
||||
HANDLE
|
||||
EXPORT
|
||||
WSAAsyncGetProtoByName(
|
||||
IN HWND hWnd,
|
||||
IN UINT wMsg,
|
||||
IN CONST CHAR FAR* name,
|
||||
OUT CHAR FAR* buf,
|
||||
IN INT buflen)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return (HANDLE)0;
|
||||
}
|
||||
|
||||
|
||||
HANDLE
|
||||
EXPORT
|
||||
WSAAsyncGetProtoByNumber(
|
||||
IN HWND hWnd,
|
||||
IN UINT wMsg,
|
||||
IN INT number,
|
||||
OUT CHAR FAR* buf,
|
||||
IN INT buflen)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return (HANDLE)0;
|
||||
}
|
||||
|
||||
|
||||
HANDLE
|
||||
EXPORT
|
||||
WSAAsyncGetServByName(
|
||||
IN HWND hWnd,
|
||||
IN UINT wMsg,
|
||||
IN CONST CHAR FAR* name,
|
||||
IN CONST CHAR FAR* proto,
|
||||
OUT CHAR FAR* buf,
|
||||
IN INT buflen)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return (HANDLE)0;
|
||||
}
|
||||
|
||||
|
||||
HANDLE
|
||||
EXPORT
|
||||
WSAAsyncGetServByPort(
|
||||
IN HWND hWnd,
|
||||
IN UINT wMsg,
|
||||
IN INT port,
|
||||
IN CONST CHAR FAR* proto,
|
||||
OUT CHAR FAR* buf,
|
||||
IN INT buflen)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return (HANDLE)0;
|
||||
}
|
||||
|
||||
/* EOF */
|
780
reactos/lib/ws2_32/misc/stubs.c
Normal file
780
reactos/lib/ws2_32/misc/stubs.c
Normal file
|
@ -0,0 +1,780 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS WinSock 2 DLL
|
||||
* FILE: misc/stubs.c
|
||||
* PURPOSE: Stubs
|
||||
* PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
|
||||
* REVISIONS:
|
||||
* CSH 01/09-2000 Created
|
||||
*/
|
||||
#include <ws2_32.h>
|
||||
|
||||
SOCKET
|
||||
EXPORT
|
||||
accept(
|
||||
IN SOCKET s,
|
||||
OUT LPSOCKADDR addr,
|
||||
OUT INT FAR* addrlen)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
bind(
|
||||
IN SOCKET s,
|
||||
IN CONST LPSOCKADDR name,
|
||||
IN INT namelen)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
closesocket(
|
||||
IN SOCKET s)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
connect(
|
||||
IN SOCKET s,
|
||||
IN CONST LPSOCKADDR name,
|
||||
IN INT namelen)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
getpeername(
|
||||
IN SOCKET s,
|
||||
OUT LPSOCKADDR name,
|
||||
IN OUT INT FAR* namelen)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
getsockname(
|
||||
IN SOCKET s,
|
||||
OUT LPSOCKADDR name,
|
||||
IN OUT INT FAR* namelen)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
getsockopt(
|
||||
IN SOCKET s,
|
||||
IN INT level,
|
||||
IN INT optname,
|
||||
OUT CHAR FAR* optval,
|
||||
IN OUT INT FAR* optlen)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
ULONG
|
||||
EXPORT
|
||||
htonl(
|
||||
IN ULONG hostlong)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
USHORT
|
||||
EXPORT
|
||||
htons(
|
||||
IN USHORT hostshort)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
ioctlsocket(
|
||||
IN SOCKET s,
|
||||
IN LONG cmd,
|
||||
IN OUT ULONG FAR* argp)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
listen(
|
||||
IN SOCKET s,
|
||||
IN INT backlog)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
ULONG
|
||||
EXPORT
|
||||
ntohl(
|
||||
IN ULONG netlong)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
USHORT
|
||||
EXPORT
|
||||
ntohs(
|
||||
IN USHORT netshort)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
recv(
|
||||
IN SOCKET s,
|
||||
OUT CHAR FAR* buf,
|
||||
IN INT len,
|
||||
IN INT flags)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
recvfrom(
|
||||
IN SOCKET s,
|
||||
OUT CHAR FAR* buf,
|
||||
IN INT len,
|
||||
IN INT flags,
|
||||
OUT LPSOCKADDR from,
|
||||
IN OUT INT FAR* fromlen)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
select(
|
||||
IN INT nfds,
|
||||
IN OUT LPFD_SET readfds,
|
||||
IN OUT LPFD_SET writefds,
|
||||
IN OUT LPFD_SET exceptfds,
|
||||
IN CONST LPTIMEVAL timeout)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
send(
|
||||
IN SOCKET s,
|
||||
IN CONST CHAR FAR* buf,
|
||||
IN INT len,
|
||||
IN INT flags)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
sendto(
|
||||
IN SOCKET s,
|
||||
IN CONST CHAR FAR* buf,
|
||||
IN INT len,
|
||||
IN INT flags,
|
||||
IN CONST LPSOCKADDR to,
|
||||
IN INT tolen)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
setsockopt(
|
||||
IN SOCKET s,
|
||||
IN INT level,
|
||||
IN INT optname,
|
||||
IN CONST CHAR FAR* optval,
|
||||
IN INT optlen)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
shutdown(
|
||||
IN SOCKET s,
|
||||
IN INT how)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
SOCKET
|
||||
EXPORT
|
||||
socket(
|
||||
IN INT af,
|
||||
IN INT type,
|
||||
IN INT protocol)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
|
||||
SOCKET
|
||||
EXPORT
|
||||
WSAAccept(
|
||||
IN SOCKET s,
|
||||
OUT LPSOCKADDR addr,
|
||||
IN OUT LPINT addrlen,
|
||||
IN LPCONDITIONPROC lpfnCondition,
|
||||
IN DWORD dwCallbackData)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSAAsyncSelect(
|
||||
IN SOCKET s,
|
||||
IN HWND hWnd,
|
||||
IN UINT wMsg,
|
||||
IN LONG lEvent)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSACancelBlockingCall(VOID)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSAConnect(
|
||||
IN SOCKET s,
|
||||
IN CONST LPSOCKADDR name,
|
||||
IN INT namelen,
|
||||
IN LPWSABUF lpCallerData,
|
||||
OUT LPWSABUF lpCalleeData,
|
||||
IN LPQOS lpSQOS,
|
||||
IN LPQOS lpGQOS)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSADuplicateSocketA(
|
||||
IN SOCKET s,
|
||||
IN DWORD dwProcessId,
|
||||
OUT LPWSAPROTOCOL_INFOA lpProtocolInfo)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSADuplicateSocketW(
|
||||
IN SOCKET s,
|
||||
IN DWORD dwProcessId,
|
||||
OUT LPWSAPROTOCOL_INFOW lpProtocolInfo)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSAEnumNetworkEvents(
|
||||
IN SOCKET s,
|
||||
IN WSAEVENT hEventObject,
|
||||
OUT LPWSANETWORKEVENTS lpNetworkEvents)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSAEnumProtocolsA(
|
||||
IN LPINT lpiProtocols,
|
||||
OUT LPWSAPROTOCOL_INFOA lpProtocolBuffer,
|
||||
IN OUT LPDWORD lpdwBufferLength)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSAEnumProtocolsW(
|
||||
IN LPINT lpiProtocols,
|
||||
OUT LPWSAPROTOCOL_INFOW lpProtocolBuffer,
|
||||
IN OUT LPDWORD lpdwBufferLength)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSAEventSelect(
|
||||
IN SOCKET s,
|
||||
IN WSAEVENT hEventObject,
|
||||
IN LONG lNetworkEvents)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL
|
||||
EXPORT
|
||||
WSAGetOverlappedResult(
|
||||
IN SOCKET s,
|
||||
IN LPWSAOVERLAPPED lpOverlapped,
|
||||
OUT LPDWORD lpcbTransfer,
|
||||
IN BOOL fWait,
|
||||
OUT LPDWORD lpdwFlags)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL
|
||||
EXPORT
|
||||
WSAGetQOSByName(
|
||||
IN SOCKET s,
|
||||
IN OUT LPWSABUF lpQOSName,
|
||||
OUT LPQOS lpQOS)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSAHtonl(
|
||||
IN SOCKET s,
|
||||
IN ULONG hostLONG,
|
||||
OUT ULONG FAR* lpnetlong)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSAHtons(
|
||||
IN SOCKET s,
|
||||
IN USHORT hostshort,
|
||||
OUT USHORT FAR* lpnetshort)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSAIoctl(
|
||||
IN SOCKET s,
|
||||
IN DWORD dwIoControlCode,
|
||||
IN LPVOID lpvInBuffer,
|
||||
IN DWORD cbInBuffer,
|
||||
OUT LPVOID lpvOutBuffer,
|
||||
IN DWORD cbOutBuffer,
|
||||
OUT LPDWORD lpcbBytesReturned,
|
||||
IN LPWSAOVERLAPPED lpOverlapped,
|
||||
IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL
|
||||
EXPORT
|
||||
WSAIsBlocking(VOID)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SOCKET
|
||||
EXPORT
|
||||
WSAJoinLeaf(
|
||||
IN SOCKET s,
|
||||
IN CONST LPSOCKADDR name,
|
||||
IN INT namelen,
|
||||
IN LPWSABUF lpCallerData,
|
||||
OUT LPWSABUF lpCalleeData,
|
||||
IN LPQOS lpSQOS,
|
||||
IN LPQOS lpGQOS,
|
||||
IN DWORD dwFlags)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSANtohl(
|
||||
IN SOCKET s,
|
||||
IN ULONG netlong,
|
||||
OUT ULONG FAR* lphostlong)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSANtohs(
|
||||
IN SOCKET s,
|
||||
IN USHORT netshort,
|
||||
OUT USHORT FAR* lphostshort)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSARecv(
|
||||
IN SOCKET s,
|
||||
IN OUT LPWSABUF lpBuffers,
|
||||
IN DWORD dwBufferCount,
|
||||
OUT LPDWORD lpNumberOfBytesRecvd,
|
||||
IN OUT LPDWORD lpFlags,
|
||||
IN LPWSAOVERLAPPED lpOverlapped,
|
||||
IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSARecvDisconnect(
|
||||
IN SOCKET s,
|
||||
OUT LPWSABUF lpInboundDisconnectData)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSARecvFrom(
|
||||
IN SOCKET s,
|
||||
IN OUT LPWSABUF lpBuffers,
|
||||
IN DWORD dwBufferCount,
|
||||
OUT LPDWORD lpNumberOfBytesRecvd,
|
||||
IN OUT LPDWORD lpFlags,
|
||||
OUT LPSOCKADDR lpFrom,
|
||||
IN OUT LPINT lpFromlen,
|
||||
IN LPWSAOVERLAPPED lpOverlapped,
|
||||
IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSASend(
|
||||
IN SOCKET s,
|
||||
IN LPWSABUF lpBuffers,
|
||||
IN DWORD dwBufferCount,
|
||||
OUT LPDWORD lpNumberOfBytesSent,
|
||||
IN DWORD dwFlags,
|
||||
IN LPWSAOVERLAPPED lpOverlapped,
|
||||
IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSASendDisconnect(
|
||||
IN SOCKET s,
|
||||
IN LPWSABUF lpOutboundDisconnectData)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSASendTo(
|
||||
IN SOCKET s,
|
||||
IN LPWSABUF lpBuffers,
|
||||
IN DWORD dwBufferCount,
|
||||
OUT LPDWORD lpNumberOfBytesSent,
|
||||
IN DWORD dwFlags,
|
||||
IN CONST LPSOCKADDR lpTo,
|
||||
IN INT iToLen,
|
||||
IN LPWSAOVERLAPPED lpOverlapped,
|
||||
IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
FARPROC
|
||||
EXPORT
|
||||
WSASetBlockingHook(
|
||||
IN FARPROC lpBlockFunc)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return (FARPROC)0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSAUnhookBlockingHook(VOID)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSAProviderConfigChange(
|
||||
IN OUT LPHANDLE lpNotificationHandle,
|
||||
IN LPWSAOVERLAPPED lpOverlapped,
|
||||
IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSACancelAsyncRequest(
|
||||
IN HANDLE hAsyncTaskHandle)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
#if 0
|
||||
PASCAL FAR
|
||||
#else
|
||||
EXPORT
|
||||
#endif
|
||||
__WSAFDIsSet(SOCKET s, LPFD_SET set)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* WinSock Service Provider support functions */
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WPUCompleteOverlappedRequest(
|
||||
IN SOCKET s,
|
||||
IN LPWSAOVERLAPPED lpOverlapped,
|
||||
IN DWORD dwError,
|
||||
IN DWORD cbTransferred,
|
||||
OUT LPINT lpErrno)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSPStartup(
|
||||
IN WORD wVersionRequested,
|
||||
OUT LPWSPDATA lpWSPData,
|
||||
IN LPWSAPROTOCOL_INFOW lpProtocolInfo,
|
||||
IN WSPUPCALLTABLE UpcallTable,
|
||||
OUT LPWSPPROC_TABLE lpProcTable)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSCDeinstallProvider(
|
||||
IN LPGUID lpProviderId,
|
||||
OUT LPINT lpErrno)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSCEnumProtocols(
|
||||
IN LPINT lpiProtocols,
|
||||
OUT LPWSAPROTOCOL_INFOW lpProtocolBuffer,
|
||||
IN OUT LPDWORD lpdwBufferLength,
|
||||
OUT LPINT lpErrno)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSCGetProviderPath(
|
||||
IN LPGUID lpProviderId,
|
||||
OUT LPWSTR lpszProviderDllPath,
|
||||
IN OUT LPINT lpProviderDllPathLen,
|
||||
OUT LPINT lpErrno)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSCInstallProvider(
|
||||
IN CONST LPGUID lpProviderId,
|
||||
IN CONST LPWSTR lpszProviderDllPath,
|
||||
IN CONST LPWSAPROTOCOL_INFOW lpProtocolInfoList,
|
||||
IN DWORD dwNumberOfEntries,
|
||||
OUT LPINT lpErrno)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSCEnableNSProvider(
|
||||
IN LPGUID lpProviderId,
|
||||
IN BOOL fEnable)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSCInstallNameSpace(
|
||||
IN LPWSTR lpszIdentifier,
|
||||
IN LPWSTR lpszPathName,
|
||||
IN DWORD dwNameSpace,
|
||||
IN DWORD dwVersion,
|
||||
IN LPGUID lpProviderId)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSCUnInstallNameSpace(
|
||||
IN LPGUID lpProviderId)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT
|
||||
EXPORT
|
||||
WSCWriteProviderOrder(
|
||||
IN LPDWORD lpwdCatalogEntryId,
|
||||
IN DWORD dwNumberOfEntries)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* EOF */
|
202
reactos/lib/ws2_32/misc/upcall.c
Normal file
202
reactos/lib/ws2_32/misc/upcall.c
Normal file
|
@ -0,0 +1,202 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS WinSock 2 DLL
|
||||
* FILE: misc/upcall.c
|
||||
* PURPOSE: Upcall functions
|
||||
* PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
|
||||
* REVISIONS:
|
||||
* CSH 01/09-2000 Created
|
||||
*/
|
||||
#include <ws2_32.h>
|
||||
|
||||
BOOL
|
||||
WSPAPI
|
||||
WPUCloseEvent(
|
||||
IN WSAEVENT hEvent,
|
||||
OUT LPINT lpErrno)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
WSPAPI
|
||||
WPUCloseSocketHandle(
|
||||
IN SOCKET s,
|
||||
OUT LPINT lpErrno)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
WSPAPI
|
||||
WPUCloseThread(
|
||||
IN LPWSATHREADID lpThreadId,
|
||||
OUT LPINT lpErrno)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
WSAEVENT
|
||||
WSPAPI
|
||||
WPUCreateEvent(
|
||||
OUT LPINT lpErrno)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return (WSAEVENT)0;
|
||||
}
|
||||
|
||||
|
||||
SOCKET
|
||||
WSPAPI
|
||||
WPUCreateSocketHandle(
|
||||
IN DWORD dwCatalogEntryId,
|
||||
IN DWORD dwContext,
|
||||
OUT LPINT lpErrno)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return (SOCKET)0;
|
||||
}
|
||||
|
||||
|
||||
SOCKET
|
||||
WSPAPI
|
||||
WPUFDIsSet(
|
||||
IN SOCKET s,
|
||||
IN LPFD_SET set)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return (SOCKET)0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
WSPAPI
|
||||
WPUGetProviderPath(
|
||||
IN LPGUID lpProviderId,
|
||||
OUT LPWSTR lpszProviderDllPath,
|
||||
IN OUT LPINT lpProviderDllPathLen,
|
||||
OUT LPINT lpErrno)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
SOCKET
|
||||
WSPAPI
|
||||
WPUModifyIFSHandle(
|
||||
IN DWORD dwCatalogEntryId,
|
||||
IN SOCKET ProposedHandle,
|
||||
OUT LPINT lpErrno)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return (SOCKET)0;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
WSPAPI
|
||||
WPUOpenCurrentThread(
|
||||
OUT LPWSATHREADID lpThreadId,
|
||||
OUT LPINT lpErrno)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
BOOL
|
||||
WSPAPI
|
||||
WPUPostMessage(
|
||||
IN HWND hWnd,
|
||||
IN UINT Msg,
|
||||
IN WPARAM wParam,
|
||||
IN LPARAM lParam)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
WSPAPI
|
||||
WPUQueryBlockingCallback(
|
||||
IN DWORD dwCatalogEntryId,
|
||||
OUT LPBLOCKINGCALLBACK FAR* lplpfnCallback,
|
||||
OUT LPDWORD lpdwContext,
|
||||
OUT LPINT lpErrno)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
WSPAPI
|
||||
WPUQuerySocketHandleContext(
|
||||
IN SOCKET s,
|
||||
OUT LPDWORD lpContext,
|
||||
OUT LPINT lpErrno)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
WSPAPI
|
||||
WPUQueueApc(
|
||||
IN LPWSATHREADID lpThreadId,
|
||||
IN LPWSAUSERAPC lpfnUserApc,
|
||||
IN DWORD dwContext,
|
||||
OUT LPINT lpErrno)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
BOOL
|
||||
WSPAPI
|
||||
WPUResetEvent(
|
||||
IN WSAEVENT hEvent,
|
||||
OUT LPINT lpErrno)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
BOOL
|
||||
WSPAPI
|
||||
WPUSetEvent(
|
||||
IN WSAEVENT hEvent,
|
||||
OUT LPINT lpErrno)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* EOF */
|
116
reactos/lib/ws2_32/ws2_32.def
Normal file
116
reactos/lib/ws2_32/ws2_32.def
Normal file
|
@ -0,0 +1,116 @@
|
|||
; WS2_32.DLL - Windows Sockets 2 DLL
|
||||
|
||||
LIBRARY ws2_32.dll
|
||||
|
||||
EXPORTS
|
||||
;WEP
|
||||
WPUCompleteOverlappedRequest@20
|
||||
WSAAccept@20
|
||||
WSAAddressToStringA@20
|
||||
WSAAddressToStringW@20
|
||||
WSAAsyncGetHostByAddr@28
|
||||
WSAAsyncGetHostByName@20
|
||||
WSAAsyncGetProtoByName@20
|
||||
WSAAsyncGetProtoByNumber@20
|
||||
WSAAsyncGetServByName@24
|
||||
WSAAsyncGetServByPort@24
|
||||
WSAAsyncSelect@16
|
||||
WSACancelAsyncRequest@4
|
||||
WSACancelBlockingCall@0
|
||||
WSACleanup@0
|
||||
WSACloseEvent@4
|
||||
WSAConnect@28
|
||||
WSACreateEvent@0
|
||||
WSADuplicateSocketA@12
|
||||
WSADuplicateSocketW@12
|
||||
WSAEnumNameSpaceProvidersA@8
|
||||
WSAEnumNameSpaceProvidersW@8
|
||||
WSAEnumNetworkEvents@12
|
||||
WSAEnumProtocolsA@12
|
||||
WSAEnumProtocolsW@12
|
||||
WSAEventSelect@12
|
||||
WSAGetLastError@0
|
||||
WSAGetOverlappedResult@20
|
||||
WSAGetQOSByName@12
|
||||
WSAGetServiceClassInfoA@16
|
||||
WSAGetServiceClassInfoW@16
|
||||
WSAGetServiceClassNameByClassIdA@12
|
||||
WSAGetServiceClassNameByClassIdW@12
|
||||
WSAHtonl@12
|
||||
WSAHtons@12
|
||||
WSAInstallServiceClassA@4
|
||||
WSAInstallServiceClassW@4
|
||||
WSAIoctl@36
|
||||
WSAIsBlocking@0
|
||||
WSAJoinLeaf@32
|
||||
WSALookupServiceBeginA@12
|
||||
WSALookupServiceBeginW@12
|
||||
WSALookupServiceEnd@4
|
||||
WSALookupServiceNextA@16
|
||||
WSALookupServiceNextW@16
|
||||
WSANtohl@12
|
||||
WSANtohs@12
|
||||
WSAProviderConfigChange@12
|
||||
WSARecv@28
|
||||
WSARecvDisconnect@8
|
||||
WSARecvFrom@36
|
||||
WSARemoveServiceClass@4
|
||||
WSAResetEvent@4
|
||||
WSASend@28
|
||||
WSASendDisconnect@8
|
||||
WSASendTo@36
|
||||
WSASetBlockingHook@4
|
||||
WSASetEvent@4
|
||||
WSASetLastError@4
|
||||
WSASetServiceA@12
|
||||
WSASetServiceW@12
|
||||
WSASocketA@24
|
||||
WSASocketW@24
|
||||
WSAStartup@8
|
||||
WSAStringToAddressA@20
|
||||
WSAStringToAddressW@20
|
||||
WSAUnhookBlockingHook@0
|
||||
WSAWaitForMultipleEvents@20
|
||||
;WSApSetPostRoutine
|
||||
WSCDeinstallProvider@8
|
||||
WSCEnableNSProvider@8
|
||||
WSCEnumProtocols@16
|
||||
WSCGetProviderPath@16
|
||||
WSCInstallNameSpace@20
|
||||
WSCInstallProvider@20
|
||||
WSCUnInstallNameSpace@4
|
||||
;WSCWriteNameSpaceOrder
|
||||
WSCWriteProviderOrder@8
|
||||
__WSAFDIsSet@8
|
||||
accept@12
|
||||
bind@12
|
||||
closesocket@4
|
||||
connect@12
|
||||
gethostbyaddr@12
|
||||
gethostbyname@4
|
||||
gethostname@8
|
||||
getpeername@12
|
||||
getprotobyname@4
|
||||
getprotobynumber@4
|
||||
getservbyname@8
|
||||
getservbyport@8
|
||||
getsockname@12
|
||||
getsockopt@20
|
||||
htonl@4
|
||||
htons@4
|
||||
inet_addr@4
|
||||
inet_ntoa@4
|
||||
ioctlsocket@12
|
||||
listen@8
|
||||
ntohl@4
|
||||
ntohs@4
|
||||
recv@16
|
||||
recvfrom@24
|
||||
select@20
|
||||
send@16
|
||||
sendto@24
|
||||
setsockopt@20
|
||||
shutdown@8
|
||||
socket@12
|
||||
|
||||
; EOF
|
116
reactos/lib/ws2_32/ws2_32.edf
Normal file
116
reactos/lib/ws2_32/ws2_32.edf
Normal file
|
@ -0,0 +1,116 @@
|
|||
; WS2_32.DLL - Windows Sockets 2 DLL
|
||||
|
||||
LIBRARY ws2_32.dll
|
||||
|
||||
EXPORTS
|
||||
;WEP
|
||||
WPUCompleteOverlappedRequest=WPUCompleteOverlappedRequest@20
|
||||
WSAAccept=WSAAccept@20
|
||||
WSAAddressToStringA=WSAAddressToStringA@20
|
||||
WSAAddressToStringW=WSAAddressToStringW@20
|
||||
WSAAsyncGetHostByAddr=WSAAsyncGetHostByAddr@28
|
||||
WSAAsyncGetHostByName=WSAAsyncGetHostByName@20
|
||||
WSAAsyncGetProtoByName=WSAAsyncGetProtoByName@20
|
||||
WSAAsyncGetProtoByNumber=WSAAsyncGetProtoByNumber@20
|
||||
WSAAsyncGetServByName=WSAAsyncGetServByName@24
|
||||
WSAAsyncGetServByPort=WSAAsyncGetServByPort@24
|
||||
WSAAsyncSelect=WSAAsyncSelect@16
|
||||
WSACancelAsyncRequest=WSACancelAsyncRequest@4
|
||||
WSACancelBlockingCall=WSACancelBlockingCall@0
|
||||
WSACleanup=WSACleanup@0
|
||||
WSACloseEvent=WSACloseEvent@4
|
||||
WSAConnect=WSAConnect@28
|
||||
WSACreateEvent=WSACreateEvent@0
|
||||
WSADuplicateSocketA=WSADuplicateSocketA@12
|
||||
WSADuplicateSocketW=WSADuplicateSocketW@12
|
||||
WSAEnumNameSpaceProvidersA=WSAEnumNameSpaceProvidersA@8
|
||||
WSAEnumNameSpaceProvidersW=WSAEnumNameSpaceProvidersW@8
|
||||
WSAEnumNetworkEvents=WSAEnumNetworkEvents@12
|
||||
WSAEnumProtocolsA=WSAEnumProtocolsA@12
|
||||
WSAEnumProtocolsW=WSAEnumProtocolsW@12
|
||||
WSAEventSelect=WSAEventSelect@12
|
||||
WSAGetLastError=WSAGetLastError@0
|
||||
WSAGetOverlappedResult=WSAGetOverlappedResult@20
|
||||
WSAGetQOSByName=WSAGetQOSByName@12
|
||||
WSAGetServiceClassInfoA=WSAGetServiceClassInfoA@16
|
||||
WSAGetServiceClassInfoW=WSAGetServiceClassInfoW@16
|
||||
WSAGetServiceClassNameByClassIdA=WSAGetServiceClassNameByClassIdA@12
|
||||
WSAGetServiceClassNameByClassIdW=WSAGetServiceClassNameByClassIdW@12
|
||||
WSAHtonl=WSAHtonl@12
|
||||
WSAHtons=WSAHtons@12
|
||||
WSAInstallServiceClassA=WSAInstallServiceClassA@4
|
||||
WSAInstallServiceClassW=WSAInstallServiceClassW@4
|
||||
WSAIoctl=WSAIoctl@36
|
||||
WSAIsBlocking=WSAIsBlocking@0
|
||||
WSAJoinLeaf=WSAJoinLeaf@32
|
||||
WSALookupServiceBeginA=WSALookupServiceBeginA@12
|
||||
WSALookupServiceBeginW=WSALookupServiceBeginW@12
|
||||
WSALookupServiceEnd=WSALookupServiceEnd@4
|
||||
WSALookupServiceNextA=WSALookupServiceNextA@16
|
||||
WSALookupServiceNextW=WSALookupServiceNextW@16
|
||||
WSANtohl=WSANtohl@12
|
||||
WSANtohs=WSANtohs@12
|
||||
WSAProviderConfigChange=WSAProviderConfigChange@12
|
||||
WSARecv=WSARecv@28
|
||||
WSARecvDisconnect=WSARecvDisconnect@8
|
||||
WSARecvFrom=WSARecvFrom@36
|
||||
WSARemoveServiceClass=WSARemoveServiceClass@4
|
||||
WSAResetEvent=WSAResetEvent@4
|
||||
WSASend=WSASend@28
|
||||
WSASendDisconnect=WSASendDisconnect@8
|
||||
WSASendTo=WSASendTo@36
|
||||
WSASetBlockingHook=WSASetBlockingHook@4
|
||||
WSASetEvent=WSASetEvent@4
|
||||
WSASetLastError=WSASetLastError@4
|
||||
WSASetServiceA=WSASetServiceA@12
|
||||
WSASetServiceW=WSASetServiceW@12
|
||||
WSASocketA=WSASocketA@24
|
||||
WSASocketW=WSASocketW@24
|
||||
WSAStartup=WSAStartup@8
|
||||
WSAStringToAddressA=WSAStringToAddressA@20
|
||||
WSAStringToAddressW=WSAStringToAddressW@20
|
||||
WSAUnhookBlockingHook=WSAUnhookBlockingHook@0
|
||||
WSAWaitForMultipleEvents=WSAWaitForMultipleEvents@20
|
||||
;WSApSetPostRoutine
|
||||
WSCDeinstallProvider=WSCDeinstallProvider@8
|
||||
WSCEnableNSProvider=WSCEnableNSProvider@8
|
||||
WSCEnumProtocols=WSCEnumProtocols@16
|
||||
WSCGetProviderPath=WSCGetProviderPath@16
|
||||
WSCInstallNameSpace=WSCInstallNameSpace@20
|
||||
WSCInstallProvider=WSCInstallProvider@20
|
||||
WSCUnInstallNameSpace=WSCUnInstallNameSpace@4
|
||||
;WSCWriteNameSpaceOrder
|
||||
WSCWriteProviderOrder=WSCWriteProviderOrder@8
|
||||
__WSAFDIsSet=__WSAFDIsSet@8
|
||||
accept=accept@12
|
||||
bind=bind@12
|
||||
closesocket=closesocket@4
|
||||
connect=connect@12
|
||||
gethostbyaddr=gethostbyaddr@12
|
||||
gethostbyname=gethostbyname@4
|
||||
gethostname=gethostname@8
|
||||
getpeername=getpeername@12
|
||||
getprotobyname=getprotobyname@4
|
||||
getprotobynumber=getprotobynumber@4
|
||||
getservbyname=getservbyname@8
|
||||
getservbyport=getservbyport@8
|
||||
getsockname=getsockname@12
|
||||
getsockopt=getsockopt@20
|
||||
htonl=htonl@4
|
||||
htons=htons@4
|
||||
inet_addr=inet_addr@4
|
||||
inet_ntoa=inet_ntoa@4
|
||||
ioctlsocket=ioctlsocket@12
|
||||
listen=listen@8
|
||||
ntohl=ntohl@4
|
||||
ntohs=ntohs@4
|
||||
recv=recv@16
|
||||
recvfrom=recvfrom@24
|
||||
select=select@20
|
||||
send=send@16
|
||||
sendto=sendto@24
|
||||
setsockopt=setsockopt@20
|
||||
shutdown=shutdown@8
|
||||
socket=socket@12
|
||||
|
||||
; EOF
|
39
reactos/lib/ws2_32/ws2_32.rc
Normal file
39
reactos/lib/ws2_32/ws2_32.rc
Normal file
|
@ -0,0 +1,39 @@
|
|||
#include <defines.h>
|
||||
#include <reactos/resource.h>
|
||||
|
||||
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 DLL\0"
|
||||
VALUE "FileVersion", RES_STR_FILE_VERSION
|
||||
VALUE "InternalName", "ws2_32\0"
|
||||
VALUE "LegalCopyright", RES_STR_LEGAL_COPYRIGHT
|
||||
VALUE "OriginalFilename", "ws2_32.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
|
||||
|
||||
|
78
reactos/lib/ws2_32/ws2_32_specs
Normal file
78
reactos/lib/ws2_32/ws2_32_specs
Normal file
|
@ -0,0 +1,78 @@
|
|||
*asm:
|
||||
|
||||
|
||||
*asm_final:
|
||||
|
||||
|
||||
*cpp:
|
||||
-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE}
|
||||
|
||||
*cc1:
|
||||
%(cc1_spec)
|
||||
|
||||
*cc1plus:
|
||||
|
||||
|
||||
*endfile:
|
||||
|
||||
|
||||
*link:
|
||||
%{mwindows:--subsystem windows} %{mdll:--dll -e _DllMain@12}
|
||||
|
||||
*lib:
|
||||
|
||||
|
||||
*libgcc:
|
||||
-lgcc
|
||||
|
||||
*startfile:
|
||||
|
||||
|
||||
*switches_need_spaces:
|
||||
|
||||
|
||||
*signed_char:
|
||||
%{funsigned-char:-D__CHAR_UNSIGNED__}
|
||||
|
||||
*predefines:
|
||||
-Di386 -D_WIN32 -DWIN32 -D__WIN32__ -D__MINGW32__ -DWINNT -D_X86_=1 -D__STDC__=1 -D__stdcall=__attribute__((__stdcall__)) -D_stdcall=__attribute__((__stdcall__)) -D__cdecl=__attribute__((__cdecl__)) -D__declspec(x)=__attribute__((x)) -Asystem(winnt) -Acpu(i386) -Amachine(i386)
|
||||
|
||||
*cross_compile:
|
||||
1
|
||||
|
||||
*version:
|
||||
egcs-2.91.57
|
||||
|
||||
*multilib:
|
||||
. ;
|
||||
|
||||
*multilib_defaults:
|
||||
|
||||
|
||||
*multilib_extra:
|
||||
|
||||
|
||||
*multilib_matches:
|
||||
|
||||
|
||||
*linker:
|
||||
collect2
|
||||
|
||||
*cpp_486:
|
||||
%{!ansi:-Di486} -D__i486 -D__i486__
|
||||
|
||||
*cpp_586:
|
||||
%{!ansi:-Di586 -Dpentium} -D__i586 -D__i586__ -D__pentium -D__pentium__
|
||||
|
||||
*cpp_686:
|
||||
%{!ansi:-Di686 -Dpentiumpro} -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__
|
||||
|
||||
*cpp_cpu_default:
|
||||
%(cpp_586)
|
||||
|
||||
*cpp_cpu:
|
||||
-Acpu(i386) -Amachine(i386) %{!ansi:-Di386} -D__i386 -D__i386__ %{mcpu=i486:%(cpp_486)} %{m486:%(cpp_486)} %{mpentium:%(cpp_586)} %{mcpu=pentium:%(cpp_586)} %{mpentiumpro:%(cpp_686)} %{mcpu=pentiumpro:%(cpp_686)} %{!mcpu*:%{!m486:%{!mpentium*:%(cpp_cpu_default)}}}
|
||||
|
||||
*cc1_cpu:
|
||||
%{!mcpu*: %{m386:-mcpu=i386 -march=i386} %{mno-486:-mcpu=i386 -march=i386} %{m486:-mcpu=i486 -march=i486} %{mno-386:-mcpu=i486 -march=i486} %{mno-pentium:-mcpu=i486 -march=i486} %{mpentium:-mcpu=pentium} %{mno-pentiumpro:-mcpu=pentium} %{mpentiumpro:-mcpu=pentiumpro}}
|
||||
|
Loading…
Reference in a new issue