ReactOS 0.4.15-dev-8119-g4fb2fdb
rpc_async.c File Reference
#include <stdarg.h>
#include "rpc.h"
#include "rpcndr.h"
#include "rpcasync.h"
#include "wine/debug.h"
#include "rpc_binding.h"
#include "rpc_message.h"
#include "ndr_stubless.h"
Include dependency graph for rpc_async.c:

Go to the source code of this file.

Macros

#define RPC_ASYNC_SIGNATURE   0x43595341
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (rpc)
 
static BOOL valid_async_handle (PRPC_ASYNC_STATE pAsync)
 
RPC_STATUS WINAPI RpcAsyncInitializeHandle (PRPC_ASYNC_STATE pAsync, unsigned int Size)
 
RPC_STATUS WINAPI RpcAsyncGetCallStatus (PRPC_ASYNC_STATE pAsync)
 
RPC_STATUS WINAPI RpcAsyncCompleteCall (PRPC_ASYNC_STATE pAsync, void *Reply)
 
RPC_STATUS WINAPI RpcAsyncAbortCall (PRPC_ASYNC_STATE pAsync, ULONG ExceptionCode)
 
RPC_STATUS WINAPI RpcAsyncCancelCall (PRPC_ASYNC_STATE pAsync, BOOL fAbortCall)
 

Macro Definition Documentation

◆ RPC_ASYNC_SIGNATURE

#define RPC_ASYNC_SIGNATURE   0x43595341

Definition at line 36 of file rpc_async.c.

Function Documentation

◆ RpcAsyncAbortCall()

RPC_STATUS WINAPI RpcAsyncAbortCall ( PRPC_ASYNC_STATE  pAsync,
ULONG  ExceptionCode 
)

Definition at line 144 of file rpc_async.c.

145{
146 FIXME("(%p, %d/0x%x): stub\n", pAsync, ExceptionCode, ExceptionCode);
148}
#define FIXME(fmt,...)
Definition: debug.h:114
_Inout_ PIRP _In_ NTSTATUS ExceptionCode
Definition: cdprocs.h:1774
#define RPC_S_INVALID_ASYNC_HANDLE
Definition: winerror.h:1156

◆ RpcAsyncCancelCall()

RPC_STATUS WINAPI RpcAsyncCancelCall ( PRPC_ASYNC_STATE  pAsync,
BOOL  fAbortCall 
)

Definition at line 164 of file rpc_async.c.

165{
166 FIXME("(%p, %s): stub\n", pAsync, fAbortCall ? "TRUE" : "FALSE");
168}

◆ RpcAsyncCompleteCall()

RPC_STATUS WINAPI RpcAsyncCompleteCall ( PRPC_ASYNC_STATE  pAsync,
void Reply 
)

Definition at line 111 of file rpc_async.c.

112{
113 struct async_call_data *data;
114
115 TRACE("(%p, %p)\n", pAsync, Reply);
116
117 if (!valid_async_handle(pAsync))
119
120 /* FIXME: check completed */
121
122 TRACE("pAsync %p, pAsync->StubInfo %p\n", pAsync, pAsync->StubInfo);
123
124 data = pAsync->StubInfo;
125 if (data->pStubMsg->IsClient)
126 return NdrpCompleteAsyncClientCall(pAsync, Reply);
127
128 return NdrpCompleteAsyncServerCall(pAsync, Reply);
129}
static BOOL valid_async_handle(PRPC_ASYNC_STATE pAsync)
Definition: rpc_async.c:38
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
RPC_STATUS NdrpCompleteAsyncClientCall(RPC_ASYNC_STATE *pAsync, void *Reply)
RPC_STATUS NdrpCompleteAsyncServerCall(RPC_ASYNC_STATE *pAsync, void *Reply)
#define TRACE(s)
Definition: solgame.cpp:4
void * StubInfo
Definition: rpcasync.h:150

◆ RpcAsyncGetCallStatus()

RPC_STATUS WINAPI RpcAsyncGetCallStatus ( PRPC_ASYNC_STATE  pAsync)

Definition at line 92 of file rpc_async.c.

93{
94 FIXME("(%p): stub\n", pAsync);
96}

Referenced by test_RpcAsyncGetCallStatus().

◆ RpcAsyncInitializeHandle()

RPC_STATUS WINAPI RpcAsyncInitializeHandle ( PRPC_ASYNC_STATE  pAsync,
unsigned int  Size 
)

Definition at line 57 of file rpc_async.c.

58{
59 TRACE("(%p, %d)\n", pAsync, Size);
60
61 if (Size != sizeof(*pAsync))
62 {
63 ERR("invalid Size %d\n", Size);
65 }
66
67 pAsync->Size = sizeof(*pAsync);
69 pAsync->Lock = 0;
70 pAsync->Flags = 0;
71 pAsync->StubInfo = NULL;
72 pAsync->RuntimeInfo = NULL;
73 memset(pAsync->Reserved, 0, sizeof(*pAsync) - FIELD_OFFSET(RPC_ASYNC_STATE, Reserved));
74
75 return RPC_S_OK;
76}
#define ERR(fmt,...)
Definition: debug.h:113
#define NULL
Definition: types.h:112
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define RPC_ASYNC_SIGNATURE
Definition: rpc_async.c:36
#define RPC_S_OK
Definition: rpcnterr.h:22
#define memset(x, y, z)
Definition: compat.h:39
LONG_PTR Reserved[4]
Definition: rpcasync.h:156
unsigned int Size
Definition: rpcasync.h:146
void * RuntimeInfo
Definition: rpcasync.h:152
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_Reserved_ PVOID Reserved
Definition: winddi.h:3974

Referenced by NdrAsyncServerCall(), test_RpcAsyncGetCallStatus(), and test_RpcAsyncInitializeHandle().

◆ valid_async_handle()

static BOOL valid_async_handle ( PRPC_ASYNC_STATE  pAsync)
inlinestatic

Definition at line 38 of file rpc_async.c.

39{
40 return pAsync->Signature == RPC_ASYNC_SIGNATURE;
41}

Referenced by RpcAsyncCompleteCall().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( rpc  )