ReactOS  0.4.14-dev-297-g23e575c
sputil.c File Reference
#include <ws2_32.h>
#include <debug.h>
Include dependency graph for sputil.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

INT WSPAPI WPUCompleteOverlappedRequest (IN SOCKET s, IN LPWSAOVERLAPPED lpOverlapped, IN DWORD dwError, IN DWORD cbTransferred, OUT LPINT lpErrno)
 
BOOL WSPAPI WPUCloseEvent (IN WSAEVENT hEvent, OUT LPINT lpErrno)
 
INT WSPAPI WPUCloseThread (IN LPWSATHREADID lpThreadId, OUT LPINT lpErrno)
 
WSAEVENT WSPAPI WPUCreateEvent (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 PDWORD_PTR lpdwContext, OUT LPINT lpErrno)
 
INT WSPAPI WPUQueueApc (IN LPWSATHREADID lpThreadId, IN LPWSAUSERAPC lpfnUserApc, IN DWORD_PTR dwContext, OUT LPINT lpErrno)
 
BOOL WSPAPI WPUResetEvent (IN WSAEVENT hEvent, OUT LPINT lpErrno)
 
BOOL WSPAPI WPUSetEvent (IN WSAEVENT hEvent, OUT LPINT lpErrno)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 13 of file sputil.c.

Function Documentation

◆ WPUCloseEvent()

BOOL WSPAPI WPUCloseEvent ( IN WSAEVENT  hEvent,
OUT LPINT  lpErrno 
)

Definition at line 38 of file sputil.c.

40 {
42  return FALSE;
43 }
#define UNIMPLEMENTED
Definition: debug.h:114

Referenced by WsTpInitialize().

◆ WPUCloseThread()

INT WSPAPI WPUCloseThread ( IN LPWSATHREADID  lpThreadId,
OUT LPINT  lpErrno 
)

Definition at line 50 of file sputil.c.

52 {
54  return 0;
55 }
#define UNIMPLEMENTED
Definition: debug.h:114

Referenced by WsTpInitialize().

◆ WPUCompleteOverlappedRequest()

INT WSPAPI WPUCompleteOverlappedRequest ( IN SOCKET  s,
IN LPWSAOVERLAPPED  lpOverlapped,
IN DWORD  dwError,
IN DWORD  cbTransferred,
OUT LPINT  lpErrno 
)

Definition at line 23 of file sputil.c.

28 {
30  return 0;
31 }
#define UNIMPLEMENTED
Definition: debug.h:114

◆ WPUCreateEvent()

WSAEVENT WSPAPI WPUCreateEvent ( OUT LPINT  lpErrno)

Definition at line 62 of file sputil.c.

63 {
65  return (WSAEVENT)0;
66 }
#define WSAEVENT
Definition: winsock2.h:585
#define UNIMPLEMENTED
Definition: debug.h:114

Referenced by WsTpInitialize().

◆ WPUOpenCurrentThread()

INT WSPAPI WPUOpenCurrentThread ( OUT LPWSATHREADID  lpThreadId,
OUT LPINT  lpErrno 
)

Definition at line 73 of file sputil.c.

75 {
77  return 0;
78 }
#define UNIMPLEMENTED
Definition: debug.h:114

Referenced by WsTpInitialize().

◆ WPUPostMessage()

BOOL WSPAPI WPUPostMessage ( IN HWND  hWnd,
IN UINT  Msg,
IN WPARAM  wParam,
IN LPARAM  lParam 
)

Definition at line 85 of file sputil.c.

89 {
90  /* Make sure we have a post routine */
92 
93  /* Call it */
95 }
PWS_SOCK_POST_ROUTINE WsSockPostRoutine
Definition: startup.c:18
struct @1591 Msg[]
HWND hWnd
Definition: settings.c:17
WPARAM wParam
Definition: combotst.c:138
#define PostMessage
Definition: winuser.h:5733
LPARAM lParam
Definition: combotst.c:139

Referenced by WsAsyncGetHost(), WsAsyncGetProto(), WsAsyncGetServ(), and WsTpInitialize().

◆ WPUQueryBlockingCallback()

INT WSPAPI WPUQueryBlockingCallback ( IN DWORD  dwCatalogEntryId,
OUT LPBLOCKINGCALLBACK FAR lplpfnCallback,
OUT PDWORD_PTR  lpdwContext,
OUT LPINT  lpErrno 
)

Definition at line 102 of file sputil.c.

106 {
109  PTCATALOG Catalog;
110  INT ErrorCode;
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 */
135  if (ErrorCode == ERROR_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 */
147  if (ErrorCode == ERROR_SUCCESS)
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 }
#define SOCKET_ERROR
Definition: winsock.h:333
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4436
Definition: ws2_32p.h:85
#define ERROR_SUCCESS
Definition: deptool.c:10
#define DWORD_PTR
Definition: treelist.c:76
struct _Entry Entry
Definition: kefuncs.h:640
DWORD WSAAPI WsTcGetEntryFromCatalogEntryId(IN PTCATALOG TCatalog, IN DWORD CatalogEntryId, IN PTCATALOG_ENTRY *CatalogEntry)
Definition: dcatalog.c:434
int32_t INT
Definition: typedefs.h:56
smooth NULL
Definition: ftsmooth.c:416
void DPRINT(...)
Definition: polytest.cpp:61
VOID WSAAPI WsTcEntryDereference(IN PTCATALOG_ENTRY CatalogEntry)
Definition: dcatitem.c:51
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
INT WSAAPI WsApiProlog(OUT PWSPROCESS *Process, OUT PWSTHREAD *Thread)
Definition: wsautil.c:91
uint32_t DWORD_PTR
Definition: typedefs.h:63
Status
Definition: gdiplustypes.h:24
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:219
struct tagContext Context
Definition: acpixf.h:1024
LPFNPSPCALLBACK Callback
Definition: desk.c:111
base of all file and directory entries
Definition: entries.h:82
PTCATALOG WSAAPI WsProcGetTCatalog(IN PWSPROCESS Process)
Definition: dprocess.c:150

Referenced by WsTpInitialize().

◆ WPUQueueApc()

INT WSPAPI WPUQueueApc ( IN LPWSATHREADID  lpThreadId,
IN LPWSAUSERAPC  lpfnUserApc,
IN DWORD_PTR  dwContext,
OUT LPINT  lpErrno 
)

Definition at line 173 of file sputil.c.

177 {
179  return 0;
180 }
#define UNIMPLEMENTED
Definition: debug.h:114

Referenced by WsTpInitialize().

◆ WPUResetEvent()

BOOL WSPAPI WPUResetEvent ( IN WSAEVENT  hEvent,
OUT LPINT  lpErrno 
)

Definition at line 187 of file sputil.c.

189 {
191  return FALSE;
192 }
#define UNIMPLEMENTED
Definition: debug.h:114

Referenced by WsTpInitialize().

◆ WPUSetEvent()

BOOL WSPAPI WPUSetEvent ( IN WSAEVENT  hEvent,
OUT LPINT  lpErrno 
)

Definition at line 199 of file sputil.c.

201 {
203  return FALSE;
204 }
#define UNIMPLEMENTED
Definition: debug.h:114

Referenced by WsTpInitialize().