ReactOS  0.4.14-dev-342-gdc047f9
rpc_async.c File Reference
#include <stdarg.h>
#include "wine/test.h"
#include <rpc.h>
#include <rpcasync.h>
Include dependency graph for rpc_async.c:

Go to the source code of this file.

Functions

static void test_RpcAsyncInitializeHandle (void)
 
static void test_RpcAsyncGetCallStatus (void)
 
 START_TEST (rpc_async)
 

Function Documentation

◆ START_TEST()

START_TEST ( rpc_async  )

Definition at line 78 of file rpc_async.c.

79 {
82 }
static void test_RpcAsyncInitializeHandle(void)
Definition: rpc_async.c:28
static void test_RpcAsyncGetCallStatus(void)
Definition: rpc_async.c:60

◆ test_RpcAsyncGetCallStatus()

static void test_RpcAsyncGetCallStatus ( void  )
static

Definition at line 60 of file rpc_async.c.

61 {
62  RPC_ASYNC_STATE async;
64 
65  status = RpcAsyncInitializeHandle(&async, sizeof(async));
66  ok(status == RPC_S_OK, "RpcAsyncInitializeHandle failed with error %d\n", status);
67 
68  status = RpcAsyncGetCallStatus(&async);
69  todo_wine
70  ok(status == RPC_S_INVALID_BINDING, "RpcAsyncGetCallStatus should have returned RPC_S_INVALID_BINDING instead of %d\n", status);
71 
72  memset(&async, 0, sizeof(async));
73  status = RpcAsyncGetCallStatus(&async);
74  todo_wine
75  ok(status == RPC_S_INVALID_BINDING, "RpcAsyncGetCallStatus should have returned RPC_S_INVALID_BINDING instead of %d\n", status);
76 }
RPC_STATUS WINAPI RpcAsyncGetCallStatus(PRPC_ASYNC_STATE pAsync)
Definition: rpc_async.c:92
long RPC_STATUS
Definition: rpc.h:52
RPC_STATUS WINAPI RpcAsyncInitializeHandle(PRPC_ASYNC_STATE pAsync, unsigned int Size)
Definition: rpc_async.c:57
#define RPC_S_INVALID_BINDING
Definition: winerror.h:1013
#define todo_wine
Definition: test.h:154
#define ok(value,...)
Definition: atltest.h:57
#define memset(x, y, z)
Definition: compat.h:39
static SERVICE_STATUS status
Definition: service.c:31
#define RPC_S_OK
Definition: rpcnterr.h:22
Definition: ps.c:97

Referenced by START_TEST().

◆ test_RpcAsyncInitializeHandle()

static void test_RpcAsyncInitializeHandle ( void  )
static

Definition at line 28 of file rpc_async.c.

29 {
30  char buffer[256];
31  RPC_ASYNC_STATE async;
33  int i;
34  void *unset_ptr;
35 
37  ok(status == ERROR_INVALID_PARAMETER, "RpcAsyncInitializeHandle with large Size should have returned ERROR_INVALID_PARAMETER instead of %d\n", status);
38 
39  status = RpcAsyncInitializeHandle(&async, sizeof(async) - 1);
40  ok(status == ERROR_INVALID_PARAMETER, "RpcAsyncInitializeHandle with small Size should have returned ERROR_INVALID_PARAMETER instead of %d\n", status);
41 
42  memset(&async, 0xcc, sizeof(async));
43  memset(&unset_ptr, 0xcc, sizeof(unset_ptr));
44  status = RpcAsyncInitializeHandle(&async, sizeof(async));
45  ok(status == RPC_S_OK, "RpcAsyncInitializeHandle failed with error %d\n", status);
46 
47  ok(async.Size == sizeof(async), "async.Size wrong: %d\n", async.Size);
48  ok(async.Signature == 0x43595341, "async.Signature should be 0x43595341, but is 0x%x instead\n", async.Signature);
49  ok(async.Lock == 0, "async.Lock should be 0, but is %d instead\n", async.Lock);
50  ok(async.Flags == 0, "async.Flags should be 0, but is %d instead\n", async.Flags);
51  ok(async.StubInfo == NULL, "async.StubInfo should be NULL, not %p\n", async.StubInfo);
52  ok(async.UserInfo == unset_ptr, "async.UserInfo should be unset, not %p\n", async.UserInfo);
53  ok(async.RuntimeInfo == NULL, "async.RuntimeInfo should be NULL, not %p\n", async.RuntimeInfo);
54  ok(async.Event == 0xcccccccc, "async.Event should be unset, not %d\n", async.Event);
55  ok(async.NotificationType == 0xcccccccc, "async.NotificationType should be unset, not %d\n", async.NotificationType);
56  for (i = 0; i < 4; i++)
57  ok(async.Reserved[i] == 0x0, "async.Reserved[%d] should be 0x0, not 0x%lx\n", i, async.Reserved[i]);
58 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
RPC_NOTIFICATION_TYPES NotificationType
Definition: rpcasync.h:154
GLint x0
Definition: linetemp.h:95
LONG_PTR Reserved[4]
Definition: rpcasync.h:156
GLuint buffer
Definition: glext.h:5915
void * RuntimeInfo
Definition: rpcasync.h:152
long RPC_STATUS
Definition: rpc.h:52
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
RPC_STATUS WINAPI RpcAsyncInitializeHandle(PRPC_ASYNC_STATE pAsync, unsigned int Size)
Definition: rpc_async.c:57
void * StubInfo
Definition: rpcasync.h:150
smooth NULL
Definition: ftsmooth.c:416
unsigned int Size
Definition: rpcasync.h:146
#define ok(value,...)
Definition: atltest.h:57
RPC_ASYNC_EVENT Event
Definition: rpcasync.h:153
#define memset(x, y, z)
Definition: compat.h:39
static SERVICE_STATUS status
Definition: service.c:31
#define RPC_S_OK
Definition: rpcnterr.h:22
void * UserInfo
Definition: rpcasync.h:151
Definition: ps.c:97

Referenced by START_TEST().