ReactOS  0.4.14-dev-115-g4576127
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 136 of file rpc_async.c.

137 {
138  FIXME("(%p, %d/0x%x): stub\n", pAsync, ExceptionCode, ExceptionCode);
140 }
_Inout_ PIRP _In_ NTSTATUS ExceptionCode
Definition: cdprocs.h:1782
#define FIXME(fmt,...)
Definition: debug.h:110
#define RPC_S_INVALID_ASYNC_HANDLE
Definition: winerror.h:1156

◆ RpcAsyncCancelCall()

RPC_STATUS WINAPI RpcAsyncCancelCall ( PRPC_ASYNC_STATE  pAsync,
BOOL  fAbortCall 
)

Definition at line 156 of file rpc_async.c.

157 {
158  FIXME("(%p, %s): stub\n", pAsync, fAbortCall ? "TRUE" : "FALSE");
160 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define RPC_S_INVALID_ASYNC_HANDLE
Definition: winerror.h:1156

◆ RpcAsyncCompleteCall()

RPC_STATUS WINAPI RpcAsyncCompleteCall ( PRPC_ASYNC_STATE  pAsync,
void Reply 
)

Definition at line 111 of file rpc_async.c.

112 {
113  TRACE("(%p, %p)\n", pAsync, Reply);
114 
115  if (!valid_async_handle(pAsync))
117 
118  /* FIXME: check completed */
119 
120  return NdrpCompleteAsyncClientCall(pAsync, Reply);
121 }
RPC_STATUS NdrpCompleteAsyncClientCall(RPC_ASYNC_STATE *pAsync, void *Reply)
#define TRACE(s)
Definition: solgame.cpp:4
#define RPC_S_INVALID_ASYNC_HANDLE
Definition: winerror.h:1156
static BOOL valid_async_handle(PRPC_ASYNC_STATE pAsync)
Definition: rpc_async.c:38

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define RPC_S_INVALID_ASYNC_HANDLE
Definition: winerror.h:1156

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 ERROR_INVALID_PARAMETER
Definition: compat.h:91
#define RPC_ASYNC_SIGNATURE
Definition: rpc_async.c:36
LONG_PTR Reserved[4]
Definition: rpcasync.h:156
void * RuntimeInfo
Definition: rpcasync.h:152
void * StubInfo
Definition: rpcasync.h:150
smooth NULL
Definition: ftsmooth.c:416
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
#define TRACE(s)
Definition: solgame.cpp:4
unsigned int Size
Definition: rpcasync.h:146
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
#define ERR(fmt,...)
Definition: debug.h:109
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
#define memset(x, y, z)
Definition: compat.h:39
#define RPC_S_OK
Definition: rpcnterr.h:22

Referenced by 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 }
#define RPC_ASYNC_SIGNATURE
Definition: rpc_async.c:36

Referenced by RpcAsyncCompleteCall().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( rpc  )