ReactOS 0.4.15-dev-7842-g558ab78
sputil.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS WinSock 2 API
4 * FILE: dll/win32/ws2_32/src/sputil.c
5 * PURPOSE: Transport Service Provider Utility Functions
6 * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
7 */
8
9/* INCLUDES ******************************************************************/
10
11#include <ws2_32.h>
12
13#define NDEBUG
14#include <debug.h>
15
16/* FUNCTIONS *****************************************************************/
17
18/*
19 * @unimplemented
20 */
21INT
25 IN DWORD dwError,
26 IN DWORD cbTransferred,
27 OUT LPINT lpErrno)
28{
30 return 0;
31}
32
33/*
34 * @unimplemented
35 */
36BOOL
39 OUT LPINT lpErrno)
40{
42 return FALSE;
43}
44
45/*
46 * @unimplemented
47 */
48INT
51 OUT LPINT lpErrno)
52{
54 return 0;
55}
56
57/*
58 * @unimplemented
59 */
63{
65 return (WSAEVENT)0;
66}
67
68/*
69 * @unimplemented
70 */
71INT
74 OUT LPINT lpErrno)
75{
77 return 0;
78}
79
80/*
81 * @implemented
82 */
83BOOL
86 IN UINT Msg,
89{
90 /* Make sure we have a post routine */
92
93 /* Call it */
95}
96
97/*
98 * @implemented
99 */
100INT
101WSPAPI
103 OUT LPBLOCKINGCALLBACK FAR* lplpfnCallback,
104 OUT PDWORD_PTR lpdwContext,
105 OUT LPINT lpErrno)
106{
109 PTCATALOG Catalog;
111 INT Status;
112 LPBLOCKINGCALLBACK Callback = NULL;
114 DWORD_PTR Context = 0;
115 DPRINT("WPUQueryBlockingCallback: %lx \n", dwCatalogEntryId);
116
117 /* Enter prolog */
119 {
120 /* Get the callback function */
121 Callback = Thread->BlockingCallback;
122
123 /* Check if there is one */
124 if (Callback)
125 {
126 /* Get the catalog */
127 Catalog = WsProcGetTCatalog(Process);
128
129 /* Find the entry for this ID */
131 dwCatalogEntryId,
132 &Entry);
133
134 /* Check for success */
136 {
137 /* Get the context */
138 Context = (DWORD_PTR)Entry->Provider->Service.lpWSPCancelBlockingCall;
139
140 /* Dereference the entry */
142 }
143 }
144 }
145
146 /* Check error code */
148 {
149 /* Return success as well */
151 }
152 else
153 {
154 /* Return expected value and no callback */
156 Callback = NULL;
157 }
158
159 /* Return the settings */
160 *lpdwContext = Context;
161 *lpErrno = ErrorCode;
162 *lplpfnCallback = Callback;
163
164 /* Return to caller */
165 return Status;
166}
167
168/*
169 * @unimplemented
170 */
171INT
172WSPAPI
174 IN LPWSAUSERAPC lpfnUserApc,
175 IN DWORD_PTR dwContext,
176 OUT LPINT lpErrno)
177{
179 return 0;
180}
181
182/*
183 * @unimplemented
184 */
185BOOL
186WSPAPI
188 OUT LPINT lpErrno)
189{
191 return FALSE;
192}
193
194/*
195 * @unimplemented
196 */
197BOOL
198WSPAPI
200 OUT LPINT lpErrno)
201{
203 return FALSE;
204}
HWND hWnd
Definition: settings.c:17
ULONG_PTR * PDWORD_PTR
Definition: basetsd.h:182
#define UNIMPLEMENTED
Definition: debug.h:115
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
struct @1627 Msg[]
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define FAR
Definition: zlib.h:34
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:223
Status
Definition: gdiplustypes.h:25
GLdouble s
Definition: gl.h:2039
static HANDLE hEvent
Definition: comm.c:54
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED lpOverlapped
Definition: mswsock.h:93
unsigned int UINT
Definition: ndis.h:50
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4436
#define DPRINT
Definition: sndvol32.h:71
INT WSPAPI WPUCloseThread(IN LPWSATHREADID lpThreadId, OUT LPINT lpErrno)
Definition: sputil.c:50
INT WSPAPI WPUQueryBlockingCallback(IN DWORD dwCatalogEntryId, OUT LPBLOCKINGCALLBACK FAR *lplpfnCallback, OUT PDWORD_PTR lpdwContext, OUT LPINT lpErrno)
Definition: sputil.c:102
WSAEVENT WSPAPI WPUCreateEvent(OUT LPINT lpErrno)
Definition: sputil.c:62
INT WSPAPI WPUOpenCurrentThread(OUT LPWSATHREADID lpThreadId, OUT LPINT lpErrno)
Definition: sputil.c:73
INT WSPAPI WPUQueueApc(IN LPWSATHREADID lpThreadId, IN LPWSAUSERAPC lpfnUserApc, IN DWORD_PTR dwContext, OUT LPINT lpErrno)
Definition: sputil.c:173
BOOL WSPAPI WPUResetEvent(IN WSAEVENT hEvent, OUT LPINT lpErrno)
Definition: sputil.c:187
BOOL WSPAPI WPUCloseEvent(IN WSAEVENT hEvent, OUT LPINT lpErrno)
Definition: sputil.c:38
INT WSPAPI WPUCompleteOverlappedRequest(IN SOCKET s, IN LPWSAOVERLAPPED lpOverlapped, IN DWORD dwError, IN DWORD cbTransferred, OUT LPINT lpErrno)
Definition: sputil.c:23
BOOL WSPAPI WPUSetEvent(IN WSAEVENT hEvent, OUT LPINT lpErrno)
Definition: sputil.c:199
BOOL WSPAPI WPUPostMessage(IN HWND hWnd, IN UINT Msg, IN WPARAM wParam, IN LPARAM lParam)
Definition: sputil.c:85
base of all file and directory entries
Definition: entries.h:83
Definition: ws2_32p.h:86
#define DWORD_PTR
Definition: treelist.c:76
uint32_t DWORD_PTR
Definition: typedefs.h:65
int32_t INT
Definition: typedefs.h:58
#define IN
Definition: typedefs.h:39
#define OUT
Definition: typedefs.h:40
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
Definition: wdfinterrupt.h:458
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
int * LPINT
Definition: windef.h:178
DWORD WSAEVENT
Definition: winsock2.h:606
UINT_PTR SOCKET
Definition: winsock.h:47
#define SOCKET_ERROR
Definition: winsock.h:333
#define PostMessage
Definition: winuser.h:5832
VOID WSAAPI WsTcEntryDereference(IN PTCATALOG_ENTRY CatalogEntry)
Definition: dcatitem.c:51
DWORD WSAAPI WsTcGetEntryFromCatalogEntryId(IN PTCATALOG TCatalog, IN DWORD CatalogEntryId, IN PTCATALOG_ENTRY *CatalogEntry)
Definition: dcatalog.c:455
PTCATALOG WSAAPI WsProcGetTCatalog(IN PWSPROCESS Process)
Definition: dprocess.c:150
INT WSAAPI WsApiProlog(OUT PWSPROCESS *Process, OUT PWSTHREAD *Thread)
Definition: wsautil.c:91
PWS_SOCK_POST_ROUTINE WsSockPostRoutine
Definition: startup.c:18
#define WSPAPI
Definition: ws2spi.h:39