ReactOS  0.4.13-dev-241-g63286c6
server.c File Reference
#include <windows.h>
#include <ole2.h>
#include <oleauto.h>
#include <secext.h>
#include <rpcdce.h>
#include <netfw.h>
#include "wine/test.h"
#include "server_s.h"
#include "server_defines.h"
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for server.c:

Go to the source code of this file.

Macros

#define COBJMACROS
 
#define PORT   "4114"
 
#define PIPE   "\\pipe\\wine_rpcrt4_test"
 
#define INT_CODE   4198
 
#define test_is_server_listening(a, b)   _test_is_server_listening(__LINE__,a,b)
 
#define test_is_server_listening2(a, b, c)   _test_is_server_listening2(__LINE__,a,b,c)
 

Enumerations

enum  firewall_op {
  APP_ADD, APP_REMOVE, APP_ADD, APP_REMOVE,
  APP_ADD, APP_REMOVE
}
 

Functions

static void (WINAPI *pNDRSContextMarshall2)(RPC_BINDING_HANDLE
 
static NDR_SCONTEXT (WINAPI *pNDRSContextUnmarshall2)(RPC_BINDING_HANDLE
 
static RPC_STATUS (WINAPI *pRpcServerRegisterIfEx)(RPC_IF_HANDLE
 
static void InitFunctionPointers (void)
 
void __RPC_FAR *__RPC_USER midl_user_allocate (SIZE_T n)
 
void __RPC_USER midl_user_free (void __RPC_FAR *p)
 
static charxstrdup (const char *s)
 
int __cdecl s_int_return (void)
 
int __cdecl s_square (int x)
 
int __cdecl s_sum (int x, int y)
 
signed char __cdecl s_sum_char (signed char x, signed char y)
 
short __cdecl s_sum_short (short x, short y)
 
int __cdecl s_sum_float (float x, float y)
 
int __cdecl s_sum_double_int (int x, double y)
 
hyper __cdecl s_sum_hyper (hyper x, hyper y)
 
int __cdecl s_sum_hyper_int (hyper x, hyper y)
 
int __cdecl s_sum_char_hyper (signed char x, hyper y)
 
void __cdecl s_square_out (int x, int *y)
 
void __cdecl s_square_ref (int *x)
 
int __cdecl s_str_length (const char *s)
 
int __cdecl s_str_t_length (str_t s)
 
int __cdecl s_cstr_length (const char *s, int n)
 
int __cdecl s_dot_self (vector_t *v)
 
double __cdecl s_square_half (double x, double *y)
 
float __cdecl s_square_half_float (float x, float *y)
 
LONG __cdecl s_square_half_long (LONG x, LONG *y)
 
int __cdecl s_sum_fixed_array (int a[5])
 
int __cdecl s_pints_sum (pints_t *pints)
 
double __cdecl s_ptypes_sum (ptypes_t *pt)
 
int __cdecl s_dot_pvectors (pvectors_t *p)
 
int __cdecl s_sum_sp (sp_t *sp)
 
double __cdecl s_square_sun (sun_t *su)
 
int __cdecl s_test_list_length (test_list_t *list)
 
int __cdecl s_sum_fixed_int_3d (int m[2][3][4])
 
int __cdecl s_sum_conf_array (int x[], int n)
 
int __cdecl s_sum_conf_ptr_by_conf_ptr (int n1, int *n2_then_x1, int *x2)
 
int __cdecl s_sum_unique_conf_array (int x[], int n)
 
int __cdecl s_sum_unique_conf_ptr (int *x, int n)
 
int __cdecl s_sum_var_array (int x[20], int n)
 
int __cdecl s_sum_complex_array (int n, refpint_t pi[])
 
int __cdecl s_dot_two_vectors (vector_t vs[2])
 
void __cdecl s_get_number_array (int x[20], int *n)
 
int __cdecl s_sum_cs (cs_t *cs)
 
int __cdecl s_sum_cps (cps_t *cps)
 
int __cdecl s_sum_cpsc (cpsc_t *cpsc)
 
int __cdecl s_get_cpsc (int n, cpsc_t *cpsc)
 
int __cdecl s_square_puint (puint_t p)
 
int __cdecl s_sum_puints (puints_t *p)
 
int __cdecl s_sum_cpuints (cpuints_t *p)
 
int __cdecl s_dot_copy_vectors (vector_t u, vector_t v)
 
int __cdecl s_square_test_us (test_us_t *tus)
 
double __cdecl s_square_encu (encu_t *eu)
 
double __cdecl s_square_unencu (int t, unencu_t *eu)
 
void __cdecl s_check_se2 (se_t *s)
 
int __cdecl s_sum_parr (int *a[3])
 
int __cdecl s_sum_pcarr (int *a[], int n)
 
int __cdecl s_enum_ord (e_t e)
 
double __cdecl s_square_encue (encue_t *eue)
 
int __cdecl s_sum_toplev_conf_2n (int *x, int n)
 
int __cdecl s_sum_toplev_conf_cond (int *x, int a, int b, int c)
 
double __cdecl s_sum_aligns (aligns_t *a)
 
int __cdecl s_sum_padded (padded_t *p)
 
int __cdecl s_sum_padded2 (padded_t ps[2])
 
int __cdecl s_sum_padded_conf (padded_t *ps, int n)
 
int __cdecl s_sum_bogus (bogus_t *b)
 
void __cdecl s_check_null (int *null)
 
int __cdecl s_str_struct_len (str_struct_t *s)
 
int __cdecl s_wstr_struct_len (wstr_struct_t *s)
 
int __cdecl s_sum_doub_carr (doub_carr_t *dc)
 
void __cdecl s_make_pyramid_doub_carr (unsigned char n, doub_carr_t **dc)
 
unsigned __cdecl s_hash_bstr (bstr_t b)
 
void __cdecl s_get_a_bstr (bstr_t *b)
 
void __cdecl s_get_name (name_t *name)
 
void __cdecl s_get_names (int *n, str_array_t *names)
 
void __cdecl s_get_namesw (int *n, wstr_array_t *names)
 
int __cdecl s_sum_pcarr2 (int n, int **pa)
 
int __cdecl s_sum_L1_norms (int n, vector_t *vs)
 
s123_t *__cdecl s_get_s123 (void)
 
str_t __cdecl s_get_filename (void)
 
int __cdecl s_echo_ranged_int (int i, int j, int k)
 
int __cdecl s_echo_ranged_int2 (int i)
 
void __cdecl s_get_ranged_enum (renum_t *re)
 
void __cdecl s_context_handle_test (void)
 
void __cdecl s_get_numbers (int length, int size, pints_t n[])
 
void __cdecl s_get_numbers_struct (numbers_struct_t **ns)
 
void __cdecl s_full_pointer_test (int *a, int *b)
 
void __cdecl s_full_pointer_null_test (int *a, int *b)
 
void __cdecl s_stop (void)
 
void __cdecl s_stop_autolisten (void)
 
void __cdecl s_ip_test (ipu_t *a)
 
int __cdecl s_sum_ptr_array (int *a[2])
 
int __cdecl s_sum_array_ptr (int(*a)[2])
 
static void make_cmdline (char buffer[MAX_PATH], const char *test)
 
static void run_client (const char *test)
 
static void basic_tests (void)
 
static void union_tests (void)
 
static test_list_t * null_list (void)
 
static test_list_t * make_list (test_list_t *tail)
 
static void free_list (test_list_t *list)
 
ULONG __RPC_USER puint_t_UserSize (ULONG *flags, ULONG start, puint_t *p)
 
unsigned char *__RPC_USER puint_t_UserMarshal (ULONG *flags, unsigned char *buffer, puint_t *p)
 
unsigned char *__RPC_USER puint_t_UserUnmarshal (ULONG *flags, unsigned char *buffer, puint_t *p)
 
void __RPC_USER puint_t_UserFree (ULONG *flags, puint_t *p)
 
ULONG __RPC_USER us_t_UserSize (ULONG *flags, ULONG start, us_t *pus)
 
unsigned char *__RPC_USER us_t_UserMarshal (ULONG *flags, unsigned char *buffer, us_t *pus)
 
unsigned char *__RPC_USER us_t_UserUnmarshal (ULONG *flags, unsigned char *buffer, us_t *pus)
 
void __RPC_USER us_t_UserFree (ULONG *flags, us_t *pus)
 
ULONG __RPC_USER bstr_t_UserSize (ULONG *flags, ULONG start, bstr_t *b)
 
unsigned char *__RPC_USER bstr_t_UserMarshal (ULONG *flags, unsigned char *buffer, bstr_t *b)
 
unsigned char *__RPC_USER bstr_t_UserUnmarshal (ULONG *flags, unsigned char *buffer, bstr_t *b)
 
void __RPC_USER bstr_t_UserFree (ULONG *flags, bstr_t *b)
 
static void pointer_tests (void)
 
static int check_pyramid_doub_carr (doub_carr_t *dc)
 
static void free_pyramid_doub_carr (doub_carr_t *dc)
 
static void array_tests (void)
 
void __cdecl s_authinfo_test (unsigned int protseq, int secure)
 
static void run_tests (void)
 
static void set_auth_info (RPC_BINDING_HANDLE handle)
 
static void _test_is_server_listening (unsigned line, RPC_BINDING_HANDLE binding, RPC_STATUS expected_status)
 
static void _test_is_server_listening2 (unsigned line, RPC_BINDING_HANDLE binding, RPC_STATUS expected_status, RPC_STATUS expected_status2)
 
static void client (const char *test)
 
static void server (void)
 
static DWORD WINAPI listen_test_client_thread (void *binding)
 
static DWORD WINAPI wait_listen_proc (void *arg)
 
static void test_stop_wait_for_call (unsigned char *binding)
 
static void test_server_listening (void)
 
static HANDLE create_server_process (void)
 
static void run_server (HANDLE ready_event)
 
static DWORD WINAPI basic_tests_thread (void *arg)
 
static void test_reconnect (void)
 
static BOOL is_process_elevated (void)
 
static BOOL is_firewall_enabled (void)
 
static HRESULT set_firewall (enum firewall_op op)
 
 START_TEST (server)
 

Variables

static const charprogname
 
static BOOL old_windows_version
 
static HANDLE stop_event
 
static HANDLE stop_wait_event
 
static NDR_SCONTEXT
 
static void NDR_RUNDOWN
 
static void void ULONG
 
static UUID RPC_MGR_EPV unsigned int
 
static UUID RPC_MGR_EPV unsigned unsigned RPC_IF_CALLBACK_FN *static RPC_CSTR
 
static UUID RPC_MGR_EPV unsigned unsigned RPC_IF_CALLBACK_FN *static RPC_AUTH_IDENTITY_HANDLE
 
static UUID RPC_MGR_EPV unsigned unsigned RPC_IF_CALLBACK_FN *static RPC_SECURITY_QOS *static RPC_AUTH_KEY_RETRIEVAL_FN
 
static UUID RPC_MGR_EPV unsigned unsigned RPC_IF_CALLBACK_FN *static RPC_SECURITY_QOS *static LPVOID
 
static chardomain_and_user
 
fnprintfp_printf = printf
 
static const WCHAR helloW [] = { 'H','e','l','l','o',0 }
 
static const WCHAR worldW [] = { 'W','o','r','l','d','!',0 }
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 21 of file server.c.

◆ INT_CODE

#define INT_CODE   4198

Definition at line 39 of file server.c.

◆ PIPE

#define PIPE   "\\pipe\\wine_rpcrt4_test"

Definition at line 37 of file server.c.

◆ PORT

#define PORT   "4114"

Definition at line 36 of file server.c.

◆ test_is_server_listening

#define test_is_server_listening (   a,
  b 
)    _test_is_server_listening(__LINE__,a,b)

Definition at line 1635 of file server.c.

◆ test_is_server_listening2

#define test_is_server_listening2 (   a,
  b,
  c 
)    _test_is_server_listening2(__LINE__,a,b,c)

Definition at line 1644 of file server.c.

Enumeration Type Documentation

◆ firewall_op

Enumerator
APP_ADD 
APP_REMOVE 
APP_ADD 
APP_REMOVE 
APP_ADD 
APP_REMOVE 

Definition at line 2137 of file server.c.

2138 {
2139  APP_ADD,
2140  APP_REMOVE
2141 };

Function Documentation

◆ _test_is_server_listening()

static void _test_is_server_listening ( unsigned  line,
RPC_BINDING_HANDLE  binding,
RPC_STATUS  expected_status 
)
static

Definition at line 1636 of file server.c.

1637 {
1639  status = RpcMgmtIsServerListening(binding);
1640  ok_(__FILE__,line)(status == expected_status, "RpcMgmtIsServerListening returned %u, expected %u\n",
1641  status, expected_status);
1642 }
#define ok_(x1, x2)
long RPC_STATUS
Definition: rpc.h:52
Definition: parser.c:48
RPC_STATUS WINAPI RpcMgmtIsServerListening(RPC_BINDING_HANDLE Binding)
Definition: rpc_server.c:1707
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

◆ _test_is_server_listening2()

static void _test_is_server_listening2 ( unsigned  line,
RPC_BINDING_HANDLE  binding,
RPC_STATUS  expected_status,
RPC_STATUS  expected_status2 
)
static

Definition at line 1645 of file server.c.

1647 {
1649  status = RpcMgmtIsServerListening(binding);
1650  ok_(__FILE__,line)(status == expected_status || status == expected_status2,
1651  "RpcMgmtIsServerListening returned %u, expected %u or %u\n",
1652  status, expected_status, expected_status2);
1653 }
#define ok_(x1, x2)
long RPC_STATUS
Definition: rpc.h:52
Definition: parser.c:48
RPC_STATUS WINAPI RpcMgmtIsServerListening(RPC_BINDING_HANDLE Binding)
Definition: rpc_server.c:1707
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

◆ array_tests()

static void array_tests ( void  )
static

Definition at line 1379 of file server.c.

1380 {
1381  int m[2][3][4] =
1382  {
1383  {{1, 2, 3, 4}, {-1, -3, -5, -7}, {0, 2, 4, 6}},
1384  {{1, -2, 3, -4}, {2, 3, 5, 7}, {-4, -1, -14, 4114}}
1385  };
1386  int c[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
1387  int c2[] = {10, 100, 200};
1388  int c3[20];
1389  vector_t vs[2] = {{1, -2, 3}, {4, -5, -6}};
1390  cps_t cps;
1391  cpsc_t cpsc;
1392  cs_t *cs;
1393  int n;
1394  int ca[5] = {1, -2, 3, -4, 5};
1395  int tmp[10];
1396  doub_carr_t *dc;
1397  int *pi;
1398  pints_t api[5];
1399  numbers_struct_t *ns;
1400  refpint_t rpi[5];
1401  int i0 = 1, i1 = 2, *ptr_array[2] = {&i0, &i1}, array[2] = {3, 4};
1402 
1403  if (!old_windows_version)
1404  {
1405  const char str1[25] = "Hello";
1406  ok(cstr_length(str1, sizeof str1) == strlen(str1), "RPC cstr_length\n");
1407  }
1408 
1409  ok(sum_fixed_int_3d(m) == 4116, "RPC sum_fixed_int_3d\n");
1410 
1411  ok(sum_conf_array(c, 10) == 45, "RPC sum_conf_array\n");
1412  ok(sum_conf_array(&c[5], 2) == 11, "RPC sum_conf_array\n");
1413  ok(sum_conf_array(&c[7], 1) == 7, "RPC sum_conf_array\n");
1414  ok(sum_conf_array(&c[2], 0) == 0, "RPC sum_conf_array\n");
1415 
1416  ok(sum_conf_ptr_by_conf_ptr(1, c2, c) == 45, "RPC sum_conf_ptr_by_conf_ptr\n");
1417  ok(sum_conf_ptr_by_conf_ptr(3, c2, c) == 345, "RPC sum_conf_ptr_by_conf_ptr\n");
1418  c2[0] = 0;
1419  ok(sum_conf_ptr_by_conf_ptr(3, c2, c) == 300, "RPC sum_conf_ptr_by_conf_ptr\n");
1420 
1421  ok(sum_unique_conf_array(ca, 4) == -2, "RPC sum_unique_conf_array\n");
1422  ok(sum_unique_conf_ptr(ca, 5) == 3, "RPC sum_unique_conf_array\n");
1423  ok(sum_unique_conf_ptr(NULL, 10) == 0, "RPC sum_unique_conf_array\n");
1424 
1425  get_number_array(c3, &n);
1426  ok(n == 10, "RPC get_num_array\n");
1427  for (; n > 0; n--)
1428  ok(c3[n-1] == c[n-1], "get_num_array returned wrong value %d @ %d\n",
1429  c3[n-1], n);
1430  ok(sum_var_array(c, 10) == 45, "RPC sum_conf_array\n");
1431  ok(sum_var_array(&c[5], 2) == 11, "RPC sum_conf_array\n");
1432  ok(sum_var_array(&c[7], 1) == 7, "RPC sum_conf_array\n");
1433  ok(sum_var_array(&c[2], 0) == 0, "RPC sum_conf_array\n");
1434 
1435  ok(dot_two_vectors(vs) == -4, "RPC dot_two_vectors\n");
1436  cs = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(cs_t, ca[5]));
1437  cs->n = 5;
1438  cs->ca[0] = 3;
1439  cs->ca[1] = 5;
1440  cs->ca[2] = -2;
1441  cs->ca[3] = -1;
1442  cs->ca[4] = -4;
1443  ok(sum_cs(cs) == 1, "RPC sum_cs\n");
1444  HeapFree(GetProcessHeap(), 0, cs);
1445 
1446  n = 5;
1447  cps.pn = &n;
1448  cps.ca1 = &c[2];
1449  cps.n = 3;
1450  cps.ca2 = &c[3];
1451  ok(sum_cps(&cps) == 53, "RPC sum_cps\n");
1452 
1453  cpsc.a = 4;
1454  cpsc.b = 5;
1455  cpsc.c = 1;
1456  cpsc.ca = c;
1457  ok(sum_cpsc(&cpsc) == 6, "RPC sum_cpsc\n");
1458  cpsc.a = 4;
1459  cpsc.b = 5;
1460  cpsc.c = 0;
1461  cpsc.ca = c;
1462  ok(sum_cpsc(&cpsc) == 10, "RPC sum_cpsc\n");
1463 
1464  cpsc.ca = NULL;
1465  ok(get_cpsc(5, &cpsc) == 45, "RPC sum_cpsc\n");
1466  ok( cpsc.a == 10, "RPC get_cpsc %u\n", cpsc.a );
1467  for (n = 0; n < 10; n++) ok( cpsc.ca[n] == n, "RPC get_cpsc[%d] = %d\n", n, cpsc.ca[n] );
1468 
1469  memset( tmp, 0x33, sizeof(tmp) );
1470  cpsc.ca = tmp;
1471  ok(get_cpsc(4, &cpsc) == 28, "RPC sum_cpsc\n");
1472  ok( cpsc.a == 8, "RPC get_cpsc %u\n", cpsc.a );
1473  ok( cpsc.ca == tmp, "RPC get_cpsc %p/%p\n", cpsc.ca, tmp );
1474  for (n = 0; n < 8; n++) ok( cpsc.ca[n] == n, "RPC get_cpsc[%d] = %d\n", n, cpsc.ca[n] );
1475 
1476  ok(sum_toplev_conf_2n(c, 3) == 15, "RPC sum_toplev_conf_2n\n");
1477  ok(sum_toplev_conf_cond(c, 5, 6, 1) == 10, "RPC sum_toplev_conf_cond\n");
1478  ok(sum_toplev_conf_cond(c, 5, 6, 0) == 15, "RPC sum_toplev_conf_cond\n");
1479 
1480  dc = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(doub_carr_t, a[2]));
1481  dc->n = 2;
1482  dc->a[0] = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(doub_carr_1_t, a[3]));
1483  dc->a[0]->n = 3;
1484  dc->a[0]->a[0] = 5;
1485  dc->a[0]->a[1] = 1;
1486  dc->a[0]->a[2] = 8;
1487  dc->a[1] = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(doub_carr_1_t, a[2]));
1488  dc->a[1]->n = 2;
1489  dc->a[1]->a[0] = 2;
1490  dc->a[1]->a[1] = 3;
1491  ok(sum_doub_carr(dc) == 19, "RPC sum_doub_carr\n");
1492  HeapFree(GetProcessHeap(), 0, dc->a[0]);
1493  HeapFree(GetProcessHeap(), 0, dc->a[1]);
1494  HeapFree(GetProcessHeap(), 0, dc);
1495 
1496  dc = NULL;
1497  make_pyramid_doub_carr(4, &dc);
1498  ok(check_pyramid_doub_carr(dc), "RPC make_pyramid_doub_carr\n");
1500 
1501  ok(sum_L1_norms(2, vs) == 21, "RPC sum_L1_norms\n");
1502 
1503  memset(api, 0, sizeof(api));
1504  pi = HeapAlloc(GetProcessHeap(), 0, sizeof(*pi));
1505  *pi = -1;
1506  api[0].pi = pi;
1507  get_numbers(1, 1, api);
1508  ok(api[0].pi == pi, "RPC conformant varying array [out] pointer changed from %p to %p\n", pi, api[0].pi);
1509  ok(*api[0].pi == 0, "pi unmarshalled incorrectly %d\n", *api[0].pi);
1510 
1511  if (!old_windows_version)
1512  {
1513  ns = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, FIELD_OFFSET(numbers_struct_t, numbers[5]));
1514  ns->length = 5;
1515  ns->size = 5;
1516  ns->numbers[0].pi = pi;
1517  get_numbers_struct(&ns);
1518  ok(ns->numbers[0].pi == pi, "RPC conformant varying struct embedded pointer changed from %p to %p\n", pi, ns->numbers[0].pi);
1519  ok(*ns->numbers[0].pi == 5, "pi unmarshalled incorrectly %d\n", *ns->numbers[0].pi);
1520  HeapFree(GetProcessHeap(), 0, ns);
1521  }
1522  HeapFree(GetProcessHeap(), 0, pi);
1523 
1524  pi = HeapAlloc(GetProcessHeap(), 0, 5 * sizeof(*pi));
1525  pi[0] = 3; rpi[0] = &pi[0];
1526  pi[1] = 5; rpi[1] = &pi[1];
1527  pi[2] = -2; rpi[2] = &pi[2];
1528  pi[3] = -1; rpi[3] = &pi[3];
1529  pi[4] = -4; rpi[4] = &pi[4];
1530  ok(sum_complex_array(5, rpi) == 1, "RPC sum_complex_array\n");
1531  HeapFree(GetProcessHeap(), 0, pi);
1532 
1533  ok(sum_ptr_array(ptr_array) == 3, "RPC sum_ptr_array\n");
1534  ok(sum_array_ptr(&array) == 7, "RPC sum_array_ptr\n");
1535 }
api
Definition: notification.c:37
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
GLdouble n
Definition: glext.h:7729
HDC dc
Definition: cylfrac.c:34
const GLfloat * m
Definition: glext.h:10848
uint32_t cs
Definition: isohybrid.c:75
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
const GLubyte * c
Definition: glext.h:8905
static DWORD pi
Definition: protocol.c:150
Definition: mxnamespace.c:44
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
#define c
Definition: ke_i.h:80
static void free_pyramid_doub_carr(doub_carr_t *dc)
Definition: server.c:1370
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
static const WCHAR ca[]
Definition: main.c:457
static BOOL old_windows_version
Definition: server.c:42
#define memset(x, y, z)
Definition: compat.h:39
#define HeapFree(x, y, z)
Definition: compat.h:394
static int check_pyramid_doub_carr(doub_carr_t *dc)
Definition: server.c:1359

Referenced by run_tests().

◆ basic_tests()

static void basic_tests ( void  )
static

Definition at line 898 of file server.c.

899 {
900  char string[] = "I am a string";
901  WCHAR wstring[] = {'I',' ','a','m',' ','a',' ','w','s','t','r','i','n','g', 0};
902  int f[5] = {1, 3, 0, -2, -4};
903  vector_t a = {1, 3, 7};
904  vector_t vec1 = {4, -2, 1}, vec2 = {-5, 2, 3}, *pvec2 = &vec2;
905  pvectors_t pvecs = {&vec1, &pvec2};
906  sp_inner_t spi = {42};
907  sp_t sp = {-13, &spi};
908  aligns_t aligns;
909  pints_t pints;
910  ptypes_t ptypes;
911  padded_t padded;
912  padded_t padded2[2];
913  bogus_t bogus;
914  int i1, i2, i3, *pi2, *pi3, **ppi3;
915  double u, v;
916  float s, t;
917  LONG q, r;
918  short h;
919  char c;
920  int x;
921  hyper y;
922  str_struct_t ss = {string};
923  wstr_struct_t ws = {wstring};
924  str_t str;
925  se_t se;
926  renum_t re;
927 
928  ok(int_return() == INT_CODE, "RPC int_return\n");
929 
930  ok(square(7) == 49, "RPC square\n");
931  x = sum(23, -4);
932  ok(x == 19, "RPC sum got %d\n", x);
933  c = sum_char(-23, 50);
934  ok(c == 27, "RPC sum_char got %d\n", (int)c);
935  h = sum_short(1122, -344);
936  ok(h == 778, "RPC sum_short got %d\n", (int)h);
937  x = sum_float(123.45, -32.2);
938  ok(x == 91, "RPC sum_float got %d\n", x);
939  x = sum_double_int(-78, 148.46);
940  ok(x == 70, "RPC sum_double_int got %d\n", x);
941  y = sum_hyper((hyper)0x12345678 << 16, (hyper)0x33557799 << 16);
942  ok(y == (hyper)0x4589ce11 << 16, "RPC hyper got %s\n", wine_dbgstr_longlong(y));
943  x = sum_hyper_int((hyper)0x24242424 << 16, -((hyper)0x24241212 << 16));
944  ok(x == 0x12120000, "RPC hyper_int got 0x%x\n", x);
945  x = sum_char_hyper( 12, ((hyper)0x42424242 << 32) | 0x33334444 );
946  ok(x == 0x33334450, "RPC char_hyper got 0x%x\n", x);
947 
948  x = 0;
949  square_out(11, &x);
950  ok(x == 121, "RPC square_out\n");
951 
952  x = 5;
953  square_ref(&x);
954  ok(x == 25, "RPC square_ref\n");
955 
956  ok(str_length(string) == strlen(string), "RPC str_length\n");
957  ok(str_t_length(string) == strlen(string), "RPC str_length\n");
958  ok(dot_self(&a) == 59, "RPC dot_self\n");
959 
960  ok(str_struct_len(&ss) == lstrlenA(string), "RPC str_struct_len\n");
961  ok(wstr_struct_len(&ws) == lstrlenW(wstring), "RPC str_struct_len\n");
962 
963  v = 0.0;
964  u = square_half(3.0, &v);
965  ok(u == 9.0, "RPC square_half\n");
966  ok(v == 1.5, "RPC square_half\n");
967 
968  t = 0.0f;
969  s = square_half_float(3.0f, &t);
970  ok(s == 9.0f, "RPC square_half_float\n");
971  ok(t == 1.5f, "RPC square_half_float\n");
972 
973  r = 0;
974  q = square_half_long(3, &r);
975  ok(q == 9, "RPC square_half_long\n");
976  ok(r == 1, "RPC square_half_long\n");
977 
978  i1 = 19;
979  i2 = -3;
980  i3 = -29;
981  pi2 = &i2;
982  pi3 = &i3;
983  ppi3 = &pi3;
984  pints.pi = &i1;
985  pints.ppi = &pi2;
986  pints.pppi = &ppi3;
987  ok(pints_sum(&pints) == -13, "RPC pints_sum\n");
988 
989  c = 10;
990  h = 3;
991  q = 14;
992  s = -5.0f;
993  u = 11.0;
994  ptypes.pc = &c;
995  ptypes.ps = &h;
996  ptypes.pl = &q;
997  ptypes.pf = &s;
998  ptypes.pd = &u;
999  ok(ptypes_sum(&ptypes) == 33.0, "RPC ptypes_sum\n");
1000 
1001  ok(dot_pvectors(&pvecs) == -21, "RPC dot_pvectors\n");
1002  ok(dot_copy_vectors(vec1, vec2) == -21, "RPC dot_copy_vectors\n");
1003  ok(sum_fixed_array(f) == -2, "RPC sum_fixed_array\n");
1004  ok(sum_sp(&sp) == 29, "RPC sum_sp\n");
1005 
1006  ok(enum_ord(E1) == 1, "RPC enum_ord\n");
1007  ok(enum_ord(E2) == 2, "RPC enum_ord\n");
1008  ok(enum_ord(E3) == 3, "RPC enum_ord\n");
1009  ok(enum_ord(E4) == 4, "RPC enum_ord\n");
1010 
1011  se.f = E2;
1012  check_se2(&se);
1013 
1014  memset(&aligns, 0, sizeof(aligns));
1015  aligns.c = 3;
1016  aligns.i = 4;
1017  aligns.s = 5;
1018  aligns.d = 6.0;
1019  ok(sum_aligns(&aligns) == 18.0, "RPC sum_aligns\n");
1020 
1021  padded.i = -3;
1022  padded.c = 8;
1023  ok(sum_padded(&padded) == 5, "RPC sum_padded\n");
1024  padded2[0].i = -5;
1025  padded2[0].c = 1;
1026  padded2[1].i = 3;
1027  padded2[1].c = 7;
1028  ok(sum_padded2(padded2) == 6, "RPC sum_padded2\n");
1029  padded2[0].i = -5;
1030  padded2[0].c = 1;
1031  padded2[1].i = 3;
1032  padded2[1].c = 7;
1033  ok(sum_padded_conf(padded2, 2) == 6, "RPC sum_padded_conf\n");
1034 
1035  i1 = 14;
1036  i2 = -7;
1037  i3 = -4;
1038  bogus.h.p1 = &i1;
1039  bogus.p2 = &i2;
1040  bogus.p3 = &i3;
1041  bogus.c = 9;
1042  ok(sum_bogus(&bogus) == 12, "RPC sum_bogus\n");
1043 
1044  check_null(NULL);
1045 
1046  str = get_filename();
1047  ok(!strcmp(str, __FILE__), "get_filename() returned %s instead of %s\n", str, __FILE__);
1049 
1050  x = echo_ranged_int(0,0,0);
1051  ok(x == 0, "echo_ranged_int() returned %d instead of 0\n", x);
1052  x = echo_ranged_int(10,20,100);
1053  ok(x == 100, "echo_ranged_int() returned %d instead of 100\n", x);
1054  x = echo_ranged_int2(40);
1055  ok(x == 40, "echo_ranged_int() returned %d instead of 40\n", x);
1056 
1057  if (!old_windows_version)
1058  {
1059  re = 0xdeadbeef;
1060  get_ranged_enum(&re);
1061  ok(re == RE3 ||
1062  broken(re == MAKELONG(re, 0xdead)), /* Win 8, Win 10 */
1063  "get_ranged_enum() returned %x instead of RE3\n", re);
1064  }
1065 }
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 * u
Definition: glfuncs.h:240
const char * ws
Definition: skip_ws.cpp:7
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLdouble GLdouble t
Definition: gl.h:2047
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define lstrlenW
Definition: compat.h:407
INT64 hyper
Definition: rpcndr.h:117
#define INT_CODE
Definition: server.c:39
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
long LONG
Definition: pedump.c:60
static const WCHAR * get_filename(const WCHAR *name, const WCHAR *endptr)
Definition: module.c:68
#define ok(value,...)
const WCHAR * str
#define MAKELONG(a, b)
Definition: typedefs.h:248
smooth NULL
Definition: ftsmooth.c:416
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35
GLfloat f
Definition: glext.h:7540
__wchar_t WCHAR
Definition: xmlstorage.h:180
const GLubyte * c
Definition: glext.h:8905
GLdouble GLdouble GLdouble GLdouble q
Definition: gl.h:2063
GLdouble s
Definition: gl.h:2039
#define broken(x)
Definition: _sntprintf.h:21
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
const GLdouble * v
Definition: gl.h:2040
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
#define c
Definition: ke_i.h:80
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
static const WCHAR sp[]
Definition: suminfo.c:288
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
#define ss
Definition: i386-dis.c:432
static BOOL old_windows_version
Definition: server.c:42
#define memset(x, y, z)
Definition: compat.h:39
void __RPC_USER midl_user_free(void __RPC_FAR *ptr)
Definition: server.c:75

Referenced by basic_tests_thread(), run_tests(), and test_reconnect().

◆ basic_tests_thread()

static DWORD WINAPI basic_tests_thread ( void arg)
static

Definition at line 2035 of file server.c.

2036 {
2037  basic_tests();
2038  return 0;
2039 }
static void basic_tests(void)
Definition: server.c:898

Referenced by test_reconnect().

◆ bstr_t_UserFree()

void __RPC_USER bstr_t_UserFree ( ULONG flags,
bstr_t b 
)

Definition at line 1241 of file server.c.

1242 {
1243  HeapFree(GetProcessHeap(), 0, &((*b)[-1]));
1244 }
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define GetProcessHeap()
Definition: compat.h:395
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ bstr_t_UserMarshal()

unsigned char* __RPC_USER bstr_t_UserMarshal ( ULONG flags,
unsigned char buffer,
bstr_t b 
)

Definition at line 1221 of file server.c.

1222 {
1223  wire_bstr_t wb = (wire_bstr_t) buffer;
1224  wb->n = (*b)[-1];
1225  memcpy(&wb->data, *b, wb->n * sizeof wb->data[0]);
1226  return buffer + FIELD_OFFSET(user_bstr_t, data[wb->n]);
1227 }
GLuint buffer
Definition: glext.h:5915
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254

◆ bstr_t_UserSize()

ULONG __RPC_USER bstr_t_UserSize ( ULONG flags,
ULONG  start,
bstr_t b 
)

Definition at line 1215 of file server.c.

1216 {
1217  return start + FIELD_OFFSET(user_bstr_t, data[(*b)[-1]]);
1218 }
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLuint start
Definition: gl.h:1545
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254

◆ bstr_t_UserUnmarshal()

unsigned char* __RPC_USER bstr_t_UserUnmarshal ( ULONG flags,
unsigned char buffer,
bstr_t b 
)

Definition at line 1230 of file server.c.

1231 {
1232  wire_bstr_t wb = (wire_bstr_t) buffer;
1233  short *data = HeapAlloc(GetProcessHeap(), 0, (wb->n + 1) * sizeof *data);
1234  data[0] = wb->n;
1235  memcpy(&data[1], wb->data, wb->n * sizeof data[1]);
1236  *b = &data[1];
1237  return buffer + FIELD_OFFSET(user_bstr_t, data[wb->n]);
1238 }
GLuint buffer
Definition: glext.h:5915
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254

◆ check_pyramid_doub_carr()

static int check_pyramid_doub_carr ( doub_carr_t *  dc)
static

Definition at line 1359 of file server.c.

1360 {
1361  int i, j;
1362  for (i = 0; i < dc->n; ++i)
1363  for (j = 0; j < dc->a[i]->n; ++j)
1364  if (dc->a[i]->a[j] != j + 1)
1365  return FALSE;
1366  return TRUE;
1367 }
#define TRUE
Definition: types.h:120
HDC dc
Definition: cylfrac.c:34
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
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 GLint GLint j
Definition: glfuncs.h:250

Referenced by array_tests().

◆ client()

static void client ( const char test)
static

Definition at line 1656 of file server.c.

1657 {
1658  static unsigned char iptcp[] = "ncacn_ip_tcp";
1659  static unsigned char np[] = "ncacn_np";
1660  static unsigned char ncalrpc[] = "ncalrpc";
1661  static unsigned char address[] = "127.0.0.1";
1662  static unsigned char address_np[] = "\\\\.";
1663  static unsigned char port[] = PORT;
1664  static unsigned char pipe[] = PIPE;
1665  static unsigned char guid[] = "00000000-4114-0704-2301-000000000000";
1666 
1667  unsigned char *binding;
1668 
1669  if (strcmp(test, "tcp_basic") == 0)
1670  {
1671  ok(RPC_S_OK == RpcStringBindingComposeA(NULL, iptcp, address, port, NULL, &binding), "RpcStringBindingCompose\n");
1672  ok(RPC_S_OK == RpcBindingFromStringBindingA(binding, &IServer_IfHandle), "RpcBindingFromStringBinding\n");
1673 
1674  run_tests();
1675  authinfo_test(RPC_PROTSEQ_TCP, 0);
1677 
1678  ok(RPC_S_OK == RpcStringFreeA(&binding), "RpcStringFree\n");
1679  ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n");
1680  }
1681  else if (strcmp(test, "tcp_secure") == 0)
1682  {
1683  ok(RPC_S_OK == RpcStringBindingComposeA(NULL, iptcp, address, port, NULL, &binding), "RpcStringBindingCompose\n");
1684  ok(RPC_S_OK == RpcBindingFromStringBindingA(binding, &IServer_IfHandle), "RpcBindingFromStringBinding\n");
1685 
1686  set_auth_info(IServer_IfHandle);
1687  authinfo_test(RPC_PROTSEQ_TCP, 1);
1688  test_is_server_listening(IServer_IfHandle, RPC_S_ACCESS_DENIED);
1689 
1690  ok(RPC_S_OK == RpcStringFreeA(&binding), "RpcStringFree\n");
1691  ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n");
1692  }
1693  else if (strcmp(test, "ncalrpc_basic") == 0)
1694  {
1695  ok(RPC_S_OK == RpcStringBindingComposeA(NULL, ncalrpc, NULL, guid, NULL, &binding), "RpcStringBindingCompose\n");
1696  ok(RPC_S_OK == RpcBindingFromStringBindingA(binding, &IServer_IfHandle), "RpcBindingFromStringBinding\n");
1697 
1698  run_tests(); /* can cause RPC_X_BAD_STUB_DATA exception */
1699  authinfo_test(RPC_PROTSEQ_LRPC, 0);
1700  test_is_server_listening(IServer_IfHandle, RPC_S_OK);
1701 
1702  ok(RPC_S_OK == RpcStringFreeA(&binding), "RpcStringFree\n");
1703  ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n");
1704  }
1705  else if (strcmp(test, "ncalrpc_autolisten") == 0)
1706  {
1707  ok(RPC_S_OK == RpcStringBindingComposeA(NULL, ncalrpc, NULL, guid, NULL, &binding), "RpcStringBindingCompose\n");
1708  ok(RPC_S_OK == RpcBindingFromStringBindingA(binding, &IServer_IfHandle), "RpcBindingFromStringBinding\n");
1709 
1710  run_tests();
1711  authinfo_test(RPC_PROTSEQ_LRPC, 0);
1712 todo_wine
1713  test_is_server_listening(IServer_IfHandle, RPC_S_NOT_LISTENING);
1714 
1715  stop_autolisten();
1716  ok(int_return() == INT_CODE, "RPC int_return\n");
1717 
1718  ok(RPC_S_OK == RpcStringFreeA(&binding), "RpcStringFree\n");
1719  ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n");
1720  }
1721  else if (strcmp(test, "ncalrpc_secure") == 0)
1722  {
1723  ok(RPC_S_OK == RpcStringBindingComposeA(NULL, ncalrpc, NULL, guid, NULL, &binding), "RpcStringBindingCompose\n");
1724  ok(RPC_S_OK == RpcBindingFromStringBindingA(binding, &IServer_IfHandle), "RpcBindingFromStringBinding\n");
1725 
1726  set_auth_info(IServer_IfHandle);
1727  authinfo_test(RPC_PROTSEQ_LRPC, 1);
1728  test_is_server_listening(IServer_IfHandle, RPC_S_OK);
1729 
1730  ok(RPC_S_OK == RpcStringFreeA(&binding), "RpcStringFree\n");
1731  ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n");
1732  }
1733  else if (strcmp(test, "np_basic") == 0)
1734  {
1735  ok(RPC_S_OK == RpcStringBindingComposeA(NULL, np, address_np, pipe, NULL, &binding), "RpcStringBindingCompose\n");
1736  ok(RPC_S_OK == RpcBindingFromStringBindingA(binding, &IServer_IfHandle), "RpcBindingFromStringBinding\n");
1737 
1738  test_is_server_listening(IServer_IfHandle, RPC_S_OK);
1739  run_tests();
1740  authinfo_test(RPC_PROTSEQ_NMP, 0);
1741  test_is_server_listening(IServer_IfHandle, RPC_S_OK);
1742  stop();
1743  test_is_server_listening(IServer_IfHandle, RPC_S_NOT_LISTENING);
1744 
1745  ok(RPC_S_OK == RpcStringFreeA(&binding), "RpcStringFree\n");
1746  ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n");
1747  }
1748 }
RPC_STATUS WINAPI RpcBindingFree(RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:784
#define test_is_server_listening(a, b)
Definition: server.c:1635
RPC_STATUS WINAPI RpcStringBindingComposeA(RPC_CSTR ObjUuid, RPC_CSTR Protseq, RPC_CSTR NetworkAddr, RPC_CSTR Endpoint, RPC_CSTR Options, RPC_CSTR *StringBinding)
Definition: rpc_binding.c:458
#define test
Definition: rosglue.h:37
#define RPC_PROTSEQ_LRPC
Definition: rpcdce.h:127
RPC_STATUS WINAPI RpcStringFreeA(RPC_CSTR *String)
Definition: rpcrt4_main.c:161
#define INT_CODE
Definition: server.c:39
#define RPC_S_ACCESS_DENIED
Definition: rpcnterr.h:29
#define test_is_server_listening2(a, b, c)
Definition: server.c:1644
const GUID * guid
#define PORT
Definition: server.c:36
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
#define PIPE
Definition: server.c:37
#define RPC_S_NOT_LISTENING
Definition: winerror.h:1026
RPC_STATUS WINAPI RpcBindingFromStringBindingA(RPC_CSTR StringBinding, RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:837
static void set_auth_info(RPC_BINDING_HANDLE handle)
Definition: server.c:1620
GLuint address
Definition: glext.h:9393
#define todo_wine
Definition: test.h:154
static void run_tests(void)
Definition: server.c:1610
#define RPC_PROTSEQ_TCP
Definition: rpcdce.h:125
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
USHORT port
Definition: uri.c:227
#define RPC_PROTSEQ_NMP
Definition: rpcdce.h:126
#define RPC_S_OK
Definition: rpcnterr.h:22

Referenced by START_TEST().

◆ create_server_process()

static HANDLE create_server_process ( void  )
static

Definition at line 1976 of file server.c.

1977 {
1978  SECURITY_ATTRIBUTES sec_attr = { sizeof(sec_attr), NULL, TRUE };
1979  HANDLE ready_event;
1980  char cmdline[MAX_PATH];
1983  DWORD ret;
1984 
1985  memset(&startup, 0, sizeof startup);
1986  startup.cb = sizeof startup;
1987 
1988  ready_event = CreateEventW(&sec_attr, TRUE, FALSE, NULL);
1989  ok(ready_event != NULL, "CreateEvent failed: %u\n", GetLastError());
1990 
1991  sprintf(cmdline, "%s server run %lx", progname, (UINT_PTR)ready_event);
1992  trace("running server process...\n");
1993  ok(CreateProcessA(NULL, cmdline, NULL, NULL, TRUE, 0L, NULL, NULL, &startup, &info), "CreateProcess\n");
1994  ret = WaitForSingleObject(ready_event, 10000);
1995  ok(WAIT_OBJECT_0 == ret, "WaitForSingleObject\n");
1996 
1997  ok(CloseHandle(info.hThread), "CloseHandle\n");
1998  ok(CloseHandle(ready_event), "CloseHandle\n");
1999  return info.hProcess;
2000 }
#define trace(...)
Definition: kmt_test.h:217
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:398
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
int startup(int argc, const char *argv[])
Definition: startup.c:430
TCHAR * cmdline
Definition: stretchblt.cpp:32
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:597
struct _test_info info[]
Definition: SetCursorPos.c:19
#define sprintf(buf, format,...)
Definition: sprintf.c:55
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
static const char * progname
Definition: server.c:41
#define WAIT_OBJECT_0
Definition: winbase.h:387
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(LPCSTR lpApplicationName, LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
Definition: proc.c:4772
#define MAX_PATH
Definition: compat.h:26
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
int ret
static const WCHAR L[]
Definition: oid.c:1250
#define memset(x, y, z)
Definition: compat.h:39

Referenced by test_reconnect().

◆ free_list()

static void free_list ( test_list_t *  list)
static

Definition at line 1146 of file server.c.

1147 {
1148  if (list->t == TL_LIST)
1149  free_list(list->u.tail);
1150  HeapFree(GetProcessHeap(), 0, list);
1151 }
static void free_list(test_list_t *list)
Definition: server.c:1146
#define GetProcessHeap()
Definition: compat.h:395
#define TL_LIST
Definition: _list.h:228
#define HeapFree(x, y, z)
Definition: compat.h:394

Referenced by pointer_tests().

◆ free_pyramid_doub_carr()

static void free_pyramid_doub_carr ( doub_carr_t *  dc)
static

Definition at line 1370 of file server.c.

1371 {
1372  int i;
1373  for (i = 0; i < dc->n; ++i)
1374  MIDL_user_free(dc->a[i]);
1375  MIDL_user_free(dc);
1376 }
HDC dc
Definition: cylfrac.c:34
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
void __RPC_USER MIDL_user_free(void *p)
Definition: irotp.c:376

Referenced by array_tests().

◆ InitFunctionPointers()

static void InitFunctionPointers ( void  )
static

Definition at line 62 of file server.c.

63 {
64  HMODULE hrpcrt4 = GetModuleHandleA("rpcrt4.dll");
65 
66  pNDRSContextMarshall2 = (void *)GetProcAddress(hrpcrt4, "NDRSContextMarshall2");
67  pNDRSContextUnmarshall2 = (void *)GetProcAddress(hrpcrt4, "NDRSContextUnmarshall2");
68  pRpcServerRegisterIfEx = (void *)GetProcAddress(hrpcrt4, "RpcServerRegisterIfEx");
69  pRpcBindingSetAuthInfoExA = (void *)GetProcAddress(hrpcrt4, "RpcBindingSetAuthInfoExA");
70  pRpcServerRegisterAuthInfoA = (void *)GetProcAddress(hrpcrt4, "RpcServerRegisterAuthInfoA");
71 
72  if (!pNDRSContextMarshall2) old_windows_version = TRUE;
73 }
#define TRUE
Definition: types.h:120
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:819
#define GetProcAddress(x, y)
Definition: compat.h:410
static BOOL old_windows_version
Definition: server.c:42

Referenced by START_TEST().

◆ is_firewall_enabled()

static BOOL is_firewall_enabled ( void  )
static

Definition at line 2104 of file server.c.

2105 {
2106  HRESULT hr, init;
2107  INetFwMgr *mgr = NULL;
2108  INetFwPolicy *policy = NULL;
2110  VARIANT_BOOL enabled = VARIANT_FALSE;
2111 
2113 
2114  hr = CoCreateInstance( &CLSID_NetFwMgr, NULL, CLSCTX_INPROC_SERVER, &IID_INetFwMgr,
2115  (void **)&mgr );
2116  ok( hr == S_OK, "got %08x\n", hr );
2117  if (hr != S_OK) goto done;
2118 
2119  hr = INetFwMgr_get_LocalPolicy( mgr, &policy );
2120  ok( hr == S_OK, "got %08x\n", hr );
2121  if (hr != S_OK) goto done;
2122 
2123  hr = INetFwPolicy_get_CurrentProfile( policy, &profile );
2124  if (hr != S_OK) goto done;
2125 
2126  hr = INetFwProfile_get_FirewallEnabled( profile, &enabled );
2127  ok( hr == S_OK, "got %08x\n", hr );
2128 
2129 done:
2130  if (policy) INetFwPolicy_Release( policy );
2131  if (profile) INetFwProfile_Release( profile );
2132  if (mgr) INetFwMgr_Release( mgr );
2133  if (SUCCEEDED( init )) CoUninitialize();
2134  return (enabled == VARIANT_TRUE);
2135 }
HRESULT hr
Definition: shlfolder.c:183
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: glext.h:7750
short VARIANT_BOOL
Definition: compat.h:1931
static int init
Definition: wintirpc.c:33
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:77
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3234
#define S_OK
Definition: intsafe.h:59
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:1991
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
Definition: compobj.c:1935
#define profile
Definition: kernel32.h:12
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by START_TEST().

◆ is_process_elevated()

static BOOL is_process_elevated ( void  )
static

Definition at line 2088 of file server.c.

2089 {
2090  HANDLE token;
2092  {
2094  DWORD size;
2095  BOOL ret;
2096 
2098  CloseHandle( token );
2099  return (ret && type == TokenElevationTypeFull);
2100  }
2101  return FALSE;
2102 }
enum _TOKEN_ELEVATION_TYPE TOKEN_ELEVATION_TYPE
#define CloseHandle
Definition: compat.h:398
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
unsigned int BOOL
Definition: ntddk_ex.h:94
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 token
Definition: glfuncs.h:210
GLsizeiptr size
Definition: glext.h:5919
#define TOKEN_QUERY
Definition: setypes.h:874
HANDLE WINAPI GetCurrentProcess(VOID)
Definition: proc.c:1168
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
Definition: security.c:296
BOOL WINAPI GetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength, PDWORD ReturnLength)
Definition: security.c:413

Referenced by START_TEST().

◆ listen_test_client_thread()

static DWORD WINAPI listen_test_client_thread ( void binding)
static

Definition at line 1847 of file server.c.

1848 {
1850 
1851  status = RpcBindingFromStringBindingA(binding, &IServer_IfHandle);
1852  ok(status == RPC_S_OK, "RpcBindingFromStringBinding\n");
1853 
1854  test_is_server_listening(IServer_IfHandle, RPC_S_OK);
1855  stop();
1856  trace("stopped\n");
1857 
1858  status = RpcBindingFree(&IServer_IfHandle);
1859  ok(status == RPC_S_OK, "RpcBindingFree\n");
1860  return 0;
1861 }
#define trace(...)
Definition: kmt_test.h:217
RPC_STATUS WINAPI RpcBindingFree(RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:784
#define test_is_server_listening(a, b)
Definition: server.c:1635
long RPC_STATUS
Definition: rpc.h:52
#define ok(value,...)
RPC_STATUS WINAPI RpcBindingFromStringBindingA(RPC_CSTR StringBinding, RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:837
static SERVICE_STATUS status
Definition: service.c:31
#define RPC_S_OK
Definition: rpcnterr.h:22
Definition: ps.c:97

Referenced by test_stop_wait_for_call().

◆ make_cmdline()

static void make_cmdline ( char  buffer[MAX_PATH],
const char test 
)
static

Definition at line 875 of file server.c.

876 {
877  sprintf(buffer, "%s server %s", progname, test);
878 }
GLuint buffer
Definition: glext.h:5915
#define test
Definition: rosglue.h:37
#define sprintf(buf, format,...)
Definition: sprintf.c:55
static const char * progname
Definition: server.c:41

Referenced by run_client().

◆ make_list()

static test_list_t* make_list ( test_list_t *  tail)
static

Definition at line 1137 of file server.c.

1138 {
1139  test_list_t *n = HeapAlloc(GetProcessHeap(), 0, sizeof *n);
1140  n->t = TL_LIST;
1141  n->u.tail = tail;
1142  return n;
1143 }
struct outqueuenode * tail
Definition: adnsresfilter.c:66
GLdouble n
Definition: glext.h:7729
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define TL_LIST

Referenced by pointer_tests().

◆ midl_user_allocate()

void __RPC_FAR* __RPC_USER midl_user_allocate ( SIZE_T  n)

Definition at line 76 of file server.c.

77 {
78  return HeapAlloc(GetProcessHeap(), 0, n);
79 }
GLdouble n
Definition: glext.h:7729
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)

◆ midl_user_free()

void __RPC_USER midl_user_free ( void __RPC_FAR p)

Definition at line 82 of file server.c.

83 {
84  HeapFree(GetProcessHeap(), 0, p);
85 }
#define GetProcessHeap()
Definition: compat.h:395
GLfloat GLfloat p
Definition: glext.h:8902
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ NDR_SCONTEXT()

static NDR_SCONTEXT ( WINAPI pNDRSContextUnmarshall2)
static

◆ null_list()

static test_list_t* null_list ( void  )
static

Definition at line 1128 of file server.c.

1129 {
1130  test_list_t *n = HeapAlloc(GetProcessHeap(), 0, sizeof *n);
1131  n->t = TL_NULL;
1132  n->u.x = 0;
1133  return n;
1134 }
GLdouble n
Definition: glext.h:7729
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define TL_NULL

Referenced by pointer_tests().

◆ pointer_tests()

static void pointer_tests ( void  )
static

Definition at line 1247 of file server.c.

1248 {
1249  int a[] = {1, 2, 3, 4};
1250  char p1[] = "11";
1251  test_list_t *list = make_list(make_list(make_list(null_list())));
1252  test_us_t tus = {{p1}};
1253  int *pa[4];
1254  puints_t pus;
1255  cpuints_t cpus;
1256  short bstr_data[] = { 5, 'H', 'e', 'l', 'l', 'o' };
1257  bstr_t bstr = &bstr_data[1], bstr2;
1258  name_t name;
1259  void *buffer;
1260  int *pa2;
1261  s123_t *s123;
1262  int val = 42;
1263 
1264  ok(test_list_length(list) == 3, "RPC test_list_length\n");
1265  ok(square_puint(p1) == 121, "RPC square_puint\n");
1266  pus.n = 4;
1267  pus.ps = HeapAlloc(GetProcessHeap(), 0, pus.n * sizeof pus.ps[0]);
1268  pus.ps[0] = xstrdup("5");
1269  pus.ps[1] = xstrdup("6");
1270  pus.ps[2] = xstrdup("7");
1271  pus.ps[3] = xstrdup("8");
1272  ok(sum_puints(&pus) == 26, "RPC sum_puints\n");
1273  HeapFree(GetProcessHeap(), 0, pus.ps[0]);
1274  HeapFree(GetProcessHeap(), 0, pus.ps[1]);
1275  HeapFree(GetProcessHeap(), 0, pus.ps[2]);
1276  HeapFree(GetProcessHeap(), 0, pus.ps[3]);
1277  HeapFree(GetProcessHeap(), 0, pus.ps);
1278  cpus.n = 4;
1279  cpus.ps = HeapAlloc(GetProcessHeap(), 0, cpus.n * sizeof cpus.ps[0]);
1280  cpus.ps[0] = xstrdup("5");
1281  cpus.ps[1] = xstrdup("6");
1282  cpus.ps[2] = xstrdup("7");
1283  cpus.ps[3] = xstrdup("8");
1284  ok(sum_cpuints(&cpus) == 26, "RPC sum_puints\n");
1285  HeapFree(GetProcessHeap(), 0, cpus.ps[0]);
1286  HeapFree(GetProcessHeap(), 0, cpus.ps[1]);
1287  HeapFree(GetProcessHeap(), 0, cpus.ps[2]);
1288  HeapFree(GetProcessHeap(), 0, cpus.ps[3]);
1289  HeapFree(GetProcessHeap(), 0, cpus.ps);
1290  ok(square_test_us(&tus) == 121, "RPC square_test_us\n");
1291 
1292  pa[0] = &a[0];
1293  pa[1] = &a[1];
1294  pa[2] = &a[2];
1295  ok(sum_parr(pa) == 6, "RPC sum_parr\n");
1296 
1297  pa[0] = &a[0];
1298  pa[1] = &a[1];
1299  pa[2] = &a[2];
1300  pa[3] = &a[3];
1301  ok(sum_pcarr(pa, 4) == 10, "RPC sum_pcarr\n");
1302 
1303  ok(hash_bstr(bstr) == s_hash_bstr(bstr), "RPC hash_bstr_data\n");
1304 
1305  get_a_bstr(&bstr);
1306  s_get_a_bstr(&bstr2);
1307  ok(!lstrcmpW((LPCWSTR)bstr, (LPCWSTR)bstr2), "bstr mismatch\n");
1308  HeapFree(GetProcessHeap(), 0, bstr - 1);
1309  HeapFree(GetProcessHeap(), 0, bstr2 - 1);
1310 
1311  free_list(list);
1312 
1313  if (!old_windows_version)
1314  {
1315  int n;
1316  str_array_t names;
1317  wstr_array_t namesw;
1318 
1319  name.size = 10;
1321  get_name(&name);
1322  ok(name.name == buffer, "[in,out] pointer should have stayed as %p but instead changed to %p\n", name.name, buffer);
1323  ok(!strcmp(name.name, "Jeremy Wh"), "name didn't unmarshall properly, expected \"Jeremy Wh\", but got \"%s\"\n", name.name);
1325 
1326  n = -1;
1327  names = NULL;
1328  get_names(&n, &names);
1329  ok(n == 2, "expected 2, got %d\n", n);
1330  ok(!strcmp(names[0], "Hello"), "expected Hello, got %s\n", names[0]);
1331  ok(!strcmp(names[1], "World!"), "expected World!, got %s\n", names[1]);
1332  MIDL_user_free(names[0]);
1333  MIDL_user_free(names[1]);
1335 
1336  n = -1;
1337  namesw = NULL;
1338  get_namesw(&n, &namesw);
1339  ok(n == 2, "expected 2, got %d\n", n);
1340  ok(!lstrcmpW(namesw[0], helloW), "expected Hello, got %s\n", wine_dbgstr_w(namesw[0]));
1341  ok(!lstrcmpW(namesw[1], worldW), "expected World!, got %s\n", wine_dbgstr_w(namesw[1]));
1342  MIDL_user_free(namesw[0]);
1343  MIDL_user_free(namesw[1]);
1344  MIDL_user_free(namesw);
1345  }
1346 
1347  pa2 = a;
1348  ok(sum_pcarr2(4, &pa2) == 10, "RPC sum_pcarr2\n");
1349 
1350  s123 = get_s123();
1351  ok(s123->f1 == 1 && s123->f2 == 2 && s123->f3 == 3, "RPC get_s123\n");
1352  MIDL_user_free(s123);
1353 
1354  full_pointer_test(&val, &val);
1355  full_pointer_null_test(&val, NULL);
1356 }
static const WCHAR helloW[]
Definition: server.c:59
void __cdecl s_get_a_bstr(bstr_t *b)
Definition: server.c:560
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:170
#define wine_dbgstr_w
Definition: kernel32.h:34
GLdouble n
Definition: glext.h:7729
GLuint buffer
Definition: glext.h:5915
static test_list_t * null_list(void)
Definition: server.c:1128
static test_list_t * make_list(test_list_t *tail)
Definition: server.c:1137
GLuint GLuint * names
Definition: glext.h:11545
#define a
Definition: ke_i.h:78
#define ok(value,...)
int get_name(unsigned char **pos, uint32_t *remaining, const char **out_name)
Definition: util.c:55
static void free_list(test_list_t *list)
Definition: server.c:1146
Definition: oleaut.c:87
smooth NULL
Definition: ftsmooth.c:416
GLuint GLfloat * val
Definition: glext.h:7180
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static char * xstrdup(const char *s)
Definition: server.c:88
unsigned __cdecl s_hash_bstr(bstr_t b)
Definition: server.c:549
Definition: _list.h:228
static const WCHAR worldW[]
Definition: server.c:60
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
Definition: name.c:36
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
static BOOL old_windows_version
Definition: server.c:42
void __RPC_USER MIDL_user_free(void *p)
Definition: irotp.c:376
#define HeapFree(x, y, z)
Definition: compat.h:394
WCHAR * name
Definition: name.c:40
GLuint const GLchar * name
Definition: glext.h:6031

Referenced by run_tests().

◆ puint_t_UserFree()

void __RPC_USER puint_t_UserFree ( ULONG flags,
puint_t *  p 
)

Definition at line 1178 of file server.c.

1179 {
1180  HeapFree(GetProcessHeap(), 0, *p);
1181 }
#define GetProcessHeap()
Definition: compat.h:395
GLfloat GLfloat p
Definition: glext.h:8902
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ puint_t_UserMarshal()

unsigned char* __RPC_USER puint_t_UserMarshal ( ULONG flags,
unsigned char buffer,
puint_t *  p 
)

Definition at line 1160 of file server.c.

1161 {
1162  int n = atoi(*p);
1163  memcpy(buffer, &n, sizeof n);
1164  return buffer + sizeof n;
1165 }
GLdouble n
Definition: glext.h:7729
GLuint buffer
Definition: glext.h:5915
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
GLfloat GLfloat p
Definition: glext.h:8902

◆ puint_t_UserSize()

ULONG __RPC_USER puint_t_UserSize ( ULONG flags,
ULONG  start,
puint_t *  p 
)

Definition at line 1154 of file server.c.

1155 {
1156  return start + sizeof(int);
1157 }
GLuint start
Definition: gl.h:1545
static UUID RPC_MGR_EPV unsigned int
Definition: server.c:48

◆ puint_t_UserUnmarshal()

unsigned char* __RPC_USER puint_t_UserUnmarshal ( ULONG flags,
unsigned char buffer,
puint_t *  p 
)

Definition at line 1168 of file server.c.

1169 {
1170  int n;
1171  memcpy(&n, buffer, sizeof n);
1172  *p = HeapAlloc(GetProcessHeap(), 0, 10);
1173  sprintf(*p, "%d", n);
1174  return buffer + sizeof n;
1175 }
GLdouble n
Definition: glext.h:7729
GLuint buffer
Definition: glext.h:5915
#define sprintf(buf, format,...)
Definition: sprintf.c:55
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLfloat GLfloat p
Definition: glext.h:8902

◆ RPC_STATUS()

static RPC_STATUS ( WINAPI pRpcServerRegisterIfEx)
static

◆ run_client()

static void run_client ( const char test)
static

Definition at line 881 of file server.c.

882 {
883  char cmdline[MAX_PATH];
886 
887  memset(&startup, 0, sizeof startup);
888  startup.cb = sizeof startup;
889 
891  ok(CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info), "CreateProcess\n");
892  winetest_wait_child_process( info.hProcess );
893  ok(CloseHandle(info.hProcess), "CloseHandle\n");
894  ok(CloseHandle(info.hThread), "CloseHandle\n");
895 }
#define CloseHandle
Definition: compat.h:398
int startup(int argc, const char *argv[])
Definition: startup.c:430
#define test
Definition: rosglue.h:37
TCHAR * cmdline
Definition: stretchblt.cpp:32
struct _test_info info[]
Definition: SetCursorPos.c:19
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(LPCSTR lpApplicationName, LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
Definition: proc.c:4772
#define MAX_PATH
Definition: compat.h:26
static const WCHAR L[]
Definition: oid.c:1250
void winetest_wait_child_process(HANDLE process)
static void make_cmdline(char buffer[MAX_PATH], const char *test)
Definition: server.c:875
#define memset(x, y, z)
Definition: compat.h:39

Referenced by server(), and START_TEST().

◆ run_server()

static void run_server ( HANDLE  ready_event)
static

Definition at line 2002 of file server.c.

2003 {
2004  static unsigned char np[] = "ncacn_np";
2005  static unsigned char pipe[] = PIPE "term_test";
2007  BOOL ret;
2008 
2009  status = RpcServerUseProtseqEpA(np, 0, pipe, NULL);
2010  ok(status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_np) failed with status %d\n", status);
2011 
2012  status = RpcServerRegisterIf(s_IServer_v0_0_s_ifspec, NULL, NULL);
2013  ok(status == RPC_S_OK, "RpcServerRegisterIf failed with status %d\n", status);
2014 
2016  status = RpcServerListen(1, 20, TRUE);
2017  ok(status == RPC_S_OK, "RpcServerListen failed with status %d\n", status);
2018 
2020  ok(stop_event != NULL, "CreateEvent failed with error %d\n", GetLastError());
2021 
2022  ret = SetEvent(ready_event);
2023  ok(ret, "SetEvent failed: %u\n", GetLastError());
2024 
2026  ok(WAIT_OBJECT_0 == ret, "WaitForSingleObject\n");
2027 
2029  ok(status == RPC_S_OK, "RpcMgmtWaitServerListening failed with status %d\n", status);
2030 
2032  stop_event = NULL;
2033 }
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:398
#define test_is_server_listening(a, b)
Definition: server.c:1635
static HANDLE stop_event
Definition: server.c:44
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:679
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:597
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
long RPC_STATUS
Definition: rpc.h:52
unsigned int BOOL
Definition: ntddk_ex.h:94
RPC_STATUS WINAPI RpcServerListen(UINT MinimumCallThreads, UINT MaxCalls, UINT DontWait)
Definition: rpc_server.c:1527
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
#define PIPE
Definition: server.c:37
#define RPC_S_NOT_LISTENING
Definition: winerror.h:1026
#define WAIT_OBJECT_0
Definition: winbase.h:387
RPC_STATUS WINAPI RpcServerUseProtseqEpA(RPC_CSTR Protseq, UINT MaxCalls, RPC_CSTR Endpoint, LPVOID SecurityDescriptor)
Definition: rpc_server.c:917
RPC_STATUS WINAPI RpcServerRegisterIf(RPC_IF_HANDLE IfSpec, UUID *MgrTypeUuid, RPC_MGR_EPV *MgrEpv)
Definition: rpc_server.c:1123
int ret
RPC_STATUS WINAPI RpcMgmtWaitServerListen(void)
Definition: rpc_server.c:1546
static SERVICE_STATUS status
Definition: service.c:31
#define RPC_S_OK
Definition: rpcnterr.h:22
Definition: ps.c:97

Referenced by START_TEST().

◆ run_tests()

static void run_tests ( void  )
static

Definition at line 1610 of file server.c.

1611 {
1612  basic_tests();
1613  union_tests();
1614  pointer_tests();
1615  array_tests();
1616  context_handle_test();
1617 }
static void union_tests(void)
Definition: server.c:1068
static void array_tests(void)
Definition: server.c:1379
static void basic_tests(void)
Definition: server.c:898
static void pointer_tests(void)
Definition: server.c:1247

Referenced by client().

◆ s_authinfo_test()

void __cdecl s_authinfo_test ( unsigned int  protseq,
int  secure 
)

Definition at line 1537 of file server.c.

1538 {
1539  RPC_BINDING_HANDLE binding;
1541  ULONG level, authnsvc;
1542  RPC_AUTHZ_HANDLE privs;
1543  unsigned char *principal;
1544 
1545  binding = I_RpcGetCurrentCallHandle();
1546  ok(binding != NULL, "I_RpcGetCurrentCallHandle returned NULL\n");
1547 
1548  level = authnsvc = 0xdeadbeef;
1549  privs = (RPC_AUTHZ_HANDLE)0xdeadbeef;
1550  principal = (unsigned char *)0xdeadbeef;
1551 
1552  if (secure || protseq == RPC_PROTSEQ_LRPC)
1553  {
1554  status = RpcBindingInqAuthClientA(binding, &privs, &principal, &level, &authnsvc, NULL);
1556  {
1557  win_skip("RpcBindingInqAuthClientA not supported\n");
1558  return;
1559  }
1560  ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status);
1561  ok(privs != (RPC_AUTHZ_HANDLE)0xdeadbeef, "privs unchanged\n");
1562  ok(principal != (unsigned char *)0xdeadbeef, "principal unchanged\n");
1563  if (protseq != RPC_PROTSEQ_LRPC)
1564  {
1565  todo_wine
1566  ok(principal != NULL, "NULL principal\n");
1567  }
1568  if (protseq == RPC_PROTSEQ_LRPC && principal)
1569  {
1570  int len;
1571  char *spn;
1572 
1573  len = WideCharToMultiByte(CP_ACP, 0, (const WCHAR *)privs, -1, NULL, 0, NULL, NULL);
1574  spn = HeapAlloc( GetProcessHeap(), 0, len );
1575  WideCharToMultiByte(CP_ACP, 0, (const WCHAR *)privs, -1, spn, len, NULL, NULL);
1576 
1577  ok(!strcmp(domain_and_user, spn), "expected %s got %s\n", domain_and_user, spn);
1578  HeapFree( GetProcessHeap(), 0, spn );
1579  }
1580  ok(level == RPC_C_AUTHN_LEVEL_PKT_PRIVACY, "level unchanged\n");
1581  ok(authnsvc == RPC_C_AUTHN_WINNT, "authnsvc unchanged\n");
1582  RpcStringFreeA(&principal);
1583 
1584  status = RpcBindingInqAuthClientA(NULL, &privs, &principal, &level, &authnsvc, NULL);
1585  ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status);
1586  RpcStringFreeA(&principal);
1587 
1588  status = RpcBindingInqAuthClientExA(NULL, &privs, &principal, &level, &authnsvc, NULL, 0);
1589  ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status);
1590  RpcStringFreeA(&principal);
1591 
1593  ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status);
1594  status = RpcRevertToSelf();
1595  ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status);
1596 
1597  }
1598  else
1599  {
1600  status = RpcBindingInqAuthClientA(binding, &privs, &principal, &level, &authnsvc, NULL);
1601  ok(status == RPC_S_BINDING_HAS_NO_AUTH, "expected RPC_S_BINDING_HAS_NO_AUTH got %u\n", status);
1602  ok(privs == (RPC_AUTHZ_HANDLE)0xdeadbeef, "got %p\n", privs);
1603  ok(principal == (unsigned char *)0xdeadbeef, "got %s\n", principal);
1604  ok(level == 0xdeadbeef, "got %u\n", level);
1605  ok(authnsvc == 0xdeadbeef, "got %u\n", authnsvc);
1606  }
1607 }
GLint level
Definition: gl.h:1546
#define RPC_C_AUTHN_WINNT
Definition: rpcdce.h:158
#define WideCharToMultiByte
Definition: compat.h:101
#define CP_ACP
Definition: compat.h:99
void * RPC_AUTHZ_HANDLE
Definition: rpcdce.h:48
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqAuthClientA(RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE *Privs, RPC_CSTR *ServerPrincName, ULONG *AuthnLevel, ULONG *AuthnSvc, ULONG *AuthzSvc)
Definition: rpc_binding.c:1569
#define RPC_PROTSEQ_LRPC
Definition: rpcdce.h:127
RPC_STATUS WINAPI RpcStringFreeA(RPC_CSTR *String)
Definition: rpcrt4_main.c:161
long RPC_STATUS
Definition: rpc.h:52
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
static char * domain_and_user
Definition: server.c:54
#define RPC_S_CANNOT_SUPPORT
Definition: winerror.h:1072
RPC_STATUS WINAPI RpcRevertToSelf(void)
Definition: rpc_binding.c:1460
#define RPC_C_AUTHN_LEVEL_PKT_PRIVACY
Definition: rpcdce.h:151
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define todo_wine
Definition: test.h:154
GLenum GLsizei len
Definition: glext.h:6722
RPC_BINDING_HANDLE WINAPI I_RpcGetCurrentCallHandle(void)
Definition: rpc_server.c:1746
#define RPC_S_BINDING_HAS_NO_AUTH
Definition: winerror.h:1054
RPC_STATUS WINAPI RpcImpersonateClient(RPC_BINDING_HANDLE BindingHandle)
Definition: rpc_binding.c:1053
unsigned int ULONG
Definition: retypes.h:1
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
static SERVICE_STATUS status
Definition: service.c:31
#define win_skip
Definition: test.h:141
#define HeapFree(x, y, z)
Definition: compat.h:394
#define RPC_S_OK
Definition: rpcnterr.h:22
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingInqAuthClientExA(RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE *Privs, RPC_CSTR *ServerPrincName, ULONG *AuthnLevel, ULONG *AuthnSvc, ULONG *AuthzSvc, ULONG Flags)
Definition: rpc_binding.c:1593
Definition: ps.c:97

◆ s_check_null()

void __cdecl s_check_null ( int null)

Definition at line 507 of file server.c.

508 {
509  ok(!null, "RPC check_null\n");
510 }
#define ok(value,...)

◆ s_check_se2()

void __cdecl s_check_se2 ( se_t *  s)

Definition at line 417 of file server.c.

418 {
419  ok(s->f == E2, "check_se2\n");
420 }
#define ok(value,...)
GLdouble s
Definition: gl.h:2039

◆ s_context_handle_test()

void __cdecl s_context_handle_test ( void  )

Definition at line 649 of file server.c.

650 {
651  NDR_SCONTEXT h;
652  RPC_BINDING_HANDLE binding;
654  unsigned char buf[20];
655  static RPC_SERVER_INTERFACE server_if =
656  {
657  sizeof(RPC_SERVER_INTERFACE),
658  {{0x00000000,0x4114,0x0704,{0x23,0x01,0x00,0x00,0x00,0x00,0x00,0x00}},{1,0}},
659  {{0x8a885d04,0x1ceb,0x11c9,{0x9f,0xe8,0x08,0x00,0x2b,0x10,0x48,0x60}},{2,0}},
660  NULL,
661  0,
662  0,
663  0,
664  0,
665  0,
666  };
667 
668  binding = I_RpcGetCurrentCallHandle();
669  ok(binding != NULL, "I_RpcGetCurrentCallHandle returned NULL\n");
670 
671  if (!pNDRSContextMarshall2 || !pNDRSContextUnmarshall2)
672  {
673  win_skip("NDRSContextMarshall2 or NDRSContextUnmarshall2 not exported from rpcrt4.dll\n");
674  return;
675  }
676 
677  h = pNDRSContextUnmarshall2(binding, NULL, NDR_LOCAL_DATA_REPRESENTATION, NULL, 0);
678  ok(h != NULL, "NDRSContextUnmarshall2 returned NULL\n");
679 
680  /* marshal a context handle with NULL userContext */
681  memset(buf, 0xcc, sizeof(buf));
682  pNDRSContextMarshall2(binding, h, buf, NULL, NULL, 0);
683  ok(*(ULONG *)buf == 0, "attributes should have been set to 0 instead of 0x%x\n", *(ULONG *)buf);
684  ok(UuidIsNil((UUID *)&buf[4], &status), "uuid should have been nil\n");
685 
686  h = pNDRSContextUnmarshall2(binding, NULL, NDR_LOCAL_DATA_REPRESENTATION, NULL, 0);
687  ok(h != NULL, "NDRSContextUnmarshall2 returned NULL\n");
688 
689  /* marshal a context handle with non-NULL userContext */
690  memset(buf, 0xcc, sizeof(buf));
691  h->userContext = (void *)0xdeadbeef;
692  pNDRSContextMarshall2(binding, h, buf, NULL, NULL, 0);
693  ok(*(ULONG *)buf == 0, "attributes should have been set to 0 instead of 0x%x\n", *(ULONG *)buf);
694  ok(!UuidIsNil((UUID *)&buf[4], &status), "uuid should not have been nil\n");
695 
696  /* raises ERROR_INVALID_HANDLE exception on Vista upwards */
697  if (0)
698  {
699  h = pNDRSContextUnmarshall2(binding, buf, NDR_LOCAL_DATA_REPRESENTATION, NULL, 0);
700  ok(h != NULL, "NDRSContextUnmarshall2 returned NULL\n");
701  ok(h->userContext == (void *)0xdeadbeef, "userContext of interface didn't unmarshal properly: %p\n", h->userContext);
702 
703  /* marshal a context handle with an interface specified */
704  h = pNDRSContextUnmarshall2(binding, NULL, NDR_LOCAL_DATA_REPRESENTATION, &server_if.InterfaceId, 0);
705  ok(h != NULL, "NDRSContextUnmarshall2 returned NULL\n");
706 
707  memset(buf, 0xcc, sizeof(buf));
708  h->userContext = (void *)0xcafebabe;
709  pNDRSContextMarshall2(binding, h, buf, NULL, &server_if.InterfaceId, 0);
710  ok(*(ULONG *)buf == 0, "attributes should have been set to 0 instead of 0x%x\n", *(ULONG *)buf);
711  ok(!UuidIsNil((UUID *)&buf[4], &status), "uuid should not have been nil\n");
712 
713  h = pNDRSContextUnmarshall2(binding, buf, NDR_LOCAL_DATA_REPRESENTATION, &server_if.InterfaceId, 0);
714  ok(h != NULL, "NDRSContextUnmarshall2 returned NULL\n");
715  ok(h->userContext == (void *)0xcafebabe, "userContext of interface didn't unmarshal properly: %p\n", h->userContext);
716  }
717 
718  /* test same interface data, but different pointer */
719  /* raises ERROR_INVALID_HANDLE exception */
720  if (0)
721  {
722  RPC_SERVER_INTERFACE server_if_clone = server_if;
723 
724  pNDRSContextUnmarshall2(binding, buf, NDR_LOCAL_DATA_REPRESENTATION, &server_if_clone.InterfaceId, 0);
725  }
726 
727  /* test different interface data, but different pointer */
728  /* raises ERROR_INVALID_HANDLE exception */
729  if (0)
730  {
731  static RPC_SERVER_INTERFACE server_if2 =
732  {
733  sizeof(RPC_SERVER_INTERFACE),
734  {{0x00000000,0x4114,0x0704,{0x23,0x01,0x00,0x00,0x00,0x00,0x00,0x00}},{1,0}},
735  {{0x8a885d04,0x1ceb,0x11c9,{0x9f,0xe8,0x08,0x00,0x2b,0x10,0x48,0x60}},{2,0}},
736  NULL,
737  0,
738  0,
739  0,
740  0,
741  0,
742  };
743  pNDRSContextMarshall2(binding, h, buf, NULL, &server_if.InterfaceId, 0);
744 
745  pNDRSContextUnmarshall2(binding, buf, NDR_LOCAL_DATA_REPRESENTATION, &server_if2.InterfaceId, 0);
746  }
747 
748  binding = NULL;
750 
751  ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status);
752  ok(binding != NULL, "binding is NULL\n");
753 
754  if (status == RPC_S_OK && binding != NULL)
755  {
756  unsigned char* string_binding = NULL;
757  unsigned char* object_uuid = NULL;
758  unsigned char* protseq = NULL;
759  unsigned char* network_address = NULL;
760  unsigned char* endpoint = NULL;
761  unsigned char* network_options = NULL;
762 
763  status = RpcBindingToStringBindingA(binding, &string_binding);
764  ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status);
765  ok(string_binding != NULL, "string_binding is NULL\n");
766 
767  status = RpcStringBindingParseA(string_binding, &object_uuid, &protseq, &network_address, &endpoint, &network_options);
768  ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status);
769  ok(protseq != NULL && *protseq != '\0', "protseq is %s\n", protseq);
770  ok(network_address != NULL && *network_address != '\0', "network_address is %s\n", network_address);
771 
772  todo_wine
773  {
774  ok(object_uuid != NULL && *object_uuid == '\0', "object_uuid is %s\n", object_uuid);
775  ok(endpoint != NULL && *endpoint == '\0', "endpoint is %s\n", endpoint);
776  ok(network_options != NULL && *network_options == '\0', "network_options is %s\n", network_options);
777  }
778 
779  RpcStringFreeA(&string_binding);
780  RpcStringFreeA(&object_uuid);
781  RpcStringFreeA(&protseq);
782  RpcStringFreeA(&network_address);
784  RpcStringFreeA(&network_options);
785  RpcBindingFree(&binding);
786  }
787 }
RPC_STATUS WINAPI RpcBindingFree(RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:784
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
RPC_STATUS WINAPI RpcStringBindingParseA(RPC_CSTR StringBinding, RPC_CSTR *ObjUuid, RPC_CSTR *Protseq, RPC_CSTR *NetworkAddr, RPC_CSTR *Endpoint, RPC_CSTR *Options)
Definition: rpc_binding.c:565
RPC_STATUS WINAPI RpcStringFreeA(RPC_CSTR *String)
Definition: rpcrt4_main.c:161
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
RPC_SYNTAX_IDENTIFIER InterfaceId
Definition: rpcdcep.h:104
int WINAPI UuidIsNil(UUID *Uuid, RPC_STATUS *Status)
Definition: rpcrt4_main.c:269
long RPC_STATUS
Definition: rpc.h:52
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingServerFromClient(RPC_BINDING_HANDLE ClientBinding, RPC_BINDING_HANDLE *ServerBinding)
Definition: rpc_binding.c:1643
RPC_STATUS WINAPI RpcBindingToStringBindingA(RPC_BINDING_HANDLE Binding, RPC_CSTR *StringBinding)
Definition: rpc_binding.c:917
struct _RPC_SERVER_INTERFACE RPC_SERVER_INTERFACE
#define todo_wine
Definition: test.h:154
RPC_BINDING_HANDLE WINAPI I_RpcGetCurrentCallHandle(void)
Definition: rpc_server.c:1746
Definition: nis.h:10
#define NDR_LOCAL_DATA_REPRESENTATION
Definition: rpcndr.h:107
unsigned int ULONG
Definition: retypes.h:1
#define memset(x, y, z)
Definition: compat.h:39
static SERVICE_STATUS status
Definition: service.c:31
#define win_skip
Definition: test.h:141
#define RPC_S_OK
Definition: rpcnterr.h:22
Definition: ps.c:97

◆ s_cstr_length()

int __cdecl s_cstr_length ( const char s,
int  n 
)

Definition at line 165 of file server.c.

166 {
167  int len = 0;
168  while (0 < n-- && *s++)
169  ++len;
170  return len;
171 }
GLdouble n
Definition: glext.h:7729
GLenum GLsizei len
Definition: glext.h:6722
GLdouble s
Definition: gl.h:2039

◆ s_dot_copy_vectors()

int __cdecl s_dot_copy_vectors ( vector_t  u,
vector_t  v 
)

Definition at line 384 of file server.c.

385 {
386  return u.x * v.x + u.y * v.y + u.z * v.z;
387 }
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 * u
Definition: glfuncs.h:240
const GLdouble * v
Definition: gl.h:2040

◆ s_dot_pvectors()

int __cdecl s_dot_pvectors ( pvectors_t *  p)

Definition at line 211 of file server.c.

212 {
213  return p->pu->x * (*p->pv)->x + p->pu->y * (*p->pv)->y + p->pu->z * (*p->pv)->z;
214 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLdouble GLdouble z
Definition: glext.h:5874
GLfloat GLfloat p
Definition: glext.h:8902

◆ s_dot_self()

int __cdecl s_dot_self ( vector_t v)

Definition at line 173 of file server.c.

174 {
175  return s_square(v->x) + s_square(v->y) + s_square(v->z);
176 }
int __cdecl s_square(int x)
Definition: server.c:100
const GLdouble * v
Definition: gl.h:2040

◆ s_dot_two_vectors()

int __cdecl s_dot_two_vectors ( vector_t  vs[2])

Definition at line 307 of file server.c.

308 {
309  return vs[0].x * vs[1].x + vs[0].y * vs[1].y + vs[0].z * vs[1].z;
310 }

◆ s_echo_ranged_int()

int __cdecl s_echo_ranged_int ( int  i,
int  j,
int  k 
)

Definition at line 634 of file server.c.

635 {
636  return min( 100, i + j + k );
637 }
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
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 GLint GLint j
Definition: glfuncs.h:250
#define min(a, b)
Definition: monoChain.cc:55
int k
Definition: mpi.c:3369

◆ s_echo_ranged_int2()

int __cdecl s_echo_ranged_int2 ( int  i)

Definition at line 639 of file server.c.

640 {
641  return i;
642 }
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

◆ s_enum_ord()

int __cdecl s_enum_ord ( e_t  e)

Definition at line 435 of file server.c.

436 {
437  switch (e)
438  {
439  case E1: return 1;
440  case E2: return 2;
441  case E3: return 3;
442  case E4: return 4;
443  default:
444  return 0;
445  }
446 }
#define e
Definition: ke_i.h:82

◆ s_full_pointer_null_test()

void __cdecl s_full_pointer_null_test ( int a,
int b 
)

Definition at line 825 of file server.c.

826 {
827  ok(*a == 42, "Expected *a to be 42 instead of %d\n", *a);
828  ok(b == NULL, "Expected b to be NULL instead of %p\n", b);
829 }
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

◆ s_full_pointer_test()

void __cdecl s_full_pointer_test ( int a,
int b 
)

Definition at line 818 of file server.c.

819 {
820  ok(*a == 42, "Expected *a to be 42 instead of %d\n", *a);
821  ok(*b == 42, "Expected *b to be 42 instead of %d\n", *a);
822  ok(a == b, "Expected a (%p) to point to the same memory as b (%p)\n", a, b);
823 }
#define ok(value,...)
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

◆ s_get_a_bstr()

void __cdecl s_get_a_bstr ( bstr_t b)

Definition at line 560 of file server.c.

561 {
562  bstr_t bstr;
563  short str[] = {5, 'W', 'i', 'n', 'e', 0};
564  bstr = HeapAlloc(GetProcessHeap(), 0, sizeof(str));
565  memcpy(bstr, str, sizeof(str));
566  *b = bstr + 1;
567 }
Definition: oleaut.c:87
const WCHAR * str
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878

Referenced by pointer_tests().

◆ s_get_cpsc()

int __cdecl s_get_cpsc ( int  n,
cpsc_t *  cpsc 
)

Definition at line 347 of file server.c.

348 {
349  int i, ret;
350 
351  cpsc->a = 2 * n;
352  cpsc->b = 2;
353  cpsc->c = 1;
354  cpsc->ca = MIDL_user_allocate( cpsc->a * sizeof(int) );
355  for (i = ret = 0; i < cpsc->a; i++) cpsc->ca[i] = i;
356  for (i = ret = 0; i < cpsc->a; i++) ret += cpsc->ca[i];
357  return ret;
358 }
GLdouble n
Definition: glext.h:7729
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
#define for
Definition: utility.h:88
int ret
void *__RPC_USER MIDL_user_allocate(SIZE_T size)
Definition: irotp.c:371

◆ s_get_filename()

str_t __cdecl s_get_filename ( void  )

Definition at line 629 of file server.c.

630 {
631  return (char *)__FILE__;
632 }

◆ s_get_name()

void __cdecl s_get_name ( name_t *  name)

Definition at line 569 of file server.c.

570 {
571  const char bossman[] = "Jeremy White";
572  memcpy(name->name, bossman, min(name->size, sizeof(bossman)));
573  /* ensure nul-termination */
574  if (name->size < sizeof(bossman))
575  name->name[name->size - 1] = 0;
576 }
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define min(a, b)
Definition: monoChain.cc:55
Definition: name.c:36
WCHAR * name
Definition: name.c:40

◆ s_get_names()

void __cdecl s_get_names ( int n,
str_array_t *  names 
)

Definition at line 578 of file server.c.

579 {
580  str_array_t list;
581 
582  list = MIDL_user_allocate(2 * sizeof(list[0]));
583  list[0] = MIDL_user_allocate(6);
584  strcpy(list[0], "Hello");
585  list[1] = MIDL_user_allocate(7);
586  strcpy(list[1], "World!");
587 
588  *names = list;
589  *n = 2;
590 }
GLdouble n
Definition: glext.h:7729
GLuint GLuint * names
Definition: glext.h:11545
Definition: _list.h:228
#define list
Definition: rosglue.h:35
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
void *__RPC_USER MIDL_user_allocate(SIZE_T size)
Definition: irotp.c:371

◆ s_get_namesw()

void __cdecl s_get_namesw ( int n,
wstr_array_t *  names 
)

Definition at line 592 of file server.c.

593 {
594  wstr_array_t list;
595 
596  list = MIDL_user_allocate(2 * sizeof(list[0]));
597  list[0] = MIDL_user_allocate(sizeof(helloW));
598  lstrcpyW(list[0], helloW);
599  list[1] = MIDL_user_allocate(sizeof(worldW));
600  lstrcpyW(list[1], worldW);
601 
602  *names = list;
603  *n = 2;
604 }
static const WCHAR helloW[]
Definition: server.c:59
GLdouble n
Definition: glext.h:7729
GLuint GLuint * names
Definition: glext.h:11545
Definition: _list.h:228
static const WCHAR worldW[]
Definition: server.c:60
#define lstrcpyW
Definition: compat.h:406
#define list
Definition: rosglue.h:35
void *__RPC_USER MIDL_user_allocate(SIZE_T size)
Definition: irotp.c:371

◆ s_get_number_array()

void __cdecl s_get_number_array ( int  x[20],
int n 
)

Definition at line 312 of file server.c.

313 {
314  int c[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
315  memcpy(x, c, sizeof(c));
316  *n = ARRAY_SIZE(c);
317 }
GLdouble n
Definition: glext.h:7729
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
const GLubyte * c
Definition: glext.h:8905
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define ARRAY_SIZE(a)
Definition: main.h:24

◆ s_get_numbers()

void __cdecl s_get_numbers ( int  length,
int  size,
pints_t  n[] 
)

Definition at line 789 of file server.c.

790 {
791  int i;
792  for (i = 0; i < length; i++)
793  {
794  n[i].pi = midl_user_allocate(sizeof(*n[i].pi));
795  *n[i].pi = i;
796  n[i].ppi = NULL;
797  n[i].pppi = NULL;
798  }
799 }
GLdouble n
Definition: glext.h:7729
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
smooth NULL
Definition: ftsmooth.c:416
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
void __RPC_FAR *__RPC_USER midl_user_allocate(size_t len)
Definition: server.c:70
static DWORD pi
Definition: protocol.c:150

◆ s_get_numbers_struct()

void __cdecl s_get_numbers_struct ( numbers_struct_t **  ns)

Definition at line 801 of file server.c.

802 {
803  int i;
804  *ns = midl_user_allocate(FIELD_OFFSET(numbers_struct_t, numbers[5]));
805  if (!*ns) return;
806  (*ns)->length = 5;
807  (*ns)->size = 5;
808  for (i = 0; i < (*ns)->length; i++)
809  {
810  (*ns)->numbers[i].pi = NULL;
811  (*ns)->numbers[i].ppi = NULL;
812  (*ns)->numbers[i].pppi = NULL;
813  }
814  (*ns)->numbers[0].pi = midl_user_allocate(sizeof(*(*ns)->numbers[i].pi));
815  *(*ns)->numbers[0].pi = 5;
816 }
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
smooth NULL
Definition: ftsmooth.c:416
void __RPC_FAR *__RPC_USER midl_user_allocate(size_t len)
Definition: server.c:70
Definition: mxnamespace.c:44
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254

◆ s_get_ranged_enum()

void __cdecl s_get_ranged_enum ( renum_t *  re)

Definition at line 644 of file server.c.

645 {
646  *re = RE3;
647 }

◆ s_get_s123()

s123_t* __cdecl s_get_s123 ( void  )

Definition at line 620 of file server.c.

621 {
622  s123_t *s = MIDL_user_allocate(sizeof *s);
623  s->f1 = 1;
624  s->f2 = 2;
625  s->f3 = 3;
626  return s;
627 }
GLdouble s
Definition: gl.h:2039
void *__RPC_USER MIDL_user_allocate(SIZE_T size)
Definition: irotp.c:371

◆ s_hash_bstr()

unsigned __cdecl s_hash_bstr ( bstr_t  b)

Definition at line 549 of file server.c.

550 {
551  short n = b[-1];
552  short *s = b;
553  unsigned hash = 0;
554  short i;
555  for (i = 0; i < n; ++i)
556  hash = 5 * hash + (unsigned) s[i];
557  return hash;
558 }
GLdouble n
Definition: glext.h:7729
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
int hash
Definition: main.c:58
#define b
Definition: ke_i.h:79
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLdouble s
Definition: gl.h:2039
Definition: _hash_fun.h:40

Referenced by pointer_tests().

◆ s_int_return()

int __cdecl s_int_return ( void  )

Definition at line 95 of file server.c.

96 {
97  return INT_CODE;
98 }
#define INT_CODE
Definition: server.c:39

◆ s_ip_test()

void __cdecl s_ip_test ( ipu_t *  a)

Definition at line 855 of file server.c.

856 {
857  STATSTG st;
858  HRESULT hr;
859 
860  hr = IStream_Stat(a->tagged_union.stream, &st, STATFLAG_NONAME);
861  ok(hr == S_OK, "got %#x\n", hr);
862 }
HRESULT hr
Definition: shlfolder.c:183
#define ok(value,...)
LONG HRESULT
Definition: typedefs.h:77
#define S_OK
Definition: intsafe.h:59
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

◆ s_make_pyramid_doub_carr()

void __cdecl s_make_pyramid_doub_carr ( unsigned char  n,
doub_carr_t **  dc 
)

Definition at line 532 of file server.c.

533 {
534  doub_carr_t *t;
535  int i, j;
536  t = MIDL_user_allocate(FIELD_OFFSET(doub_carr_t, a[n]));
537  t->n = n;
538  for (i = 0; i < n; ++i)
539  {
540  int v = i + 1;
541  t->a[i] = MIDL_user_allocate(FIELD_OFFSET(doub_carr_1_t, a[v]));
542  t->a[i]->n = v;
543  for (j = 0; j < v; ++j)
544  t->a[i]->a[j] = j + 1;
545  }
546  *dc = t;
547 }
GLdouble n
Definition: glext.h:7729
GLdouble GLdouble t
Definition: gl.h:2047
HDC dc
Definition: cylfrac.c:34
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
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 GLint GLint j
Definition: glfuncs.h:250
const GLdouble * v
Definition: gl.h:2040
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
void *__RPC_USER MIDL_user_allocate(SIZE_T size)
Definition: irotp.c:371
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

◆ s_pints_sum()

int __cdecl s_pints_sum ( pints_t *  pints)

Definition at line 201 of file server.c.

202 {
203  return *pints->pi + **pints->ppi + ***pints->pppi;
204 }

◆ s_ptypes_sum()

double __cdecl s_ptypes_sum ( ptypes_t *  pt)

Definition at line 206 of file server.c.

207 {
208  return *pt->pc + *pt->ps + *pt->pl + *pt->pf + *pt->pd;
209 }
#define pt(x, y)
Definition: drawing.c:79

◆ s_square()

int __cdecl s_square ( int  x)

Definition at line 100 of file server.c.

101 {
102  return x * x;
103 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548

Referenced by s_dot_self(), s_square_out(), and s_square_ref().

◆ s_square_encu()

double __cdecl s_square_encu ( encu_t *  eu)

Definition at line 395 of file server.c.

396 {
397  switch (eu->t)
398  {
399  case ENCU_I: return eu->tagged_union.i * eu->tagged_union.i;
400  case ENCU_F: return eu->tagged_union.f * eu->tagged_union.f;
401  default:
402  return 0.0;
403  }
404 }
#define ENCU_F
#define ENCU_I

◆ s_square_encue()

double __cdecl s_square_encue ( encue_t *  eue)

Definition at line 448 of file server.c.

449 {
450  switch (eue->t)
451  {
452  case E1: return eue->tagged_union.i1 * eue->tagged_union.i1;
453  case E2: return eue->tagged_union.f2 * eue->tagged_union.f2;
454  default:
455  return 0.0;
456  }
457 }

◆ s_square_half()

double __cdecl s_square_half ( double  x,
double y 
)

Definition at line 178 of file server.c.

179 {
180  *y = x / 2.0;
181  return x * x;
182 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ s_square_half_float()

float __cdecl s_square_half_float ( float  x,
float *  y 
)

Definition at line 184 of file server.c.

185 {
186  *y = x / 2.0f;
187  return x * x;
188 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ s_square_half_long()

LONG __cdecl s_square_half_long ( LONG  x,
LONG y 
)

Definition at line 190 of file server.c.

191 {
192  *y = x / 2;
193  return x * x;
194 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ s_square_out()

void __cdecl s_square_out ( int  x,
int y 
)

Definition at line 145 of file server.c.

146 {
147  *y = s_square(x);
148 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
int __cdecl s_square(int x)
Definition: server.c:100
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ s_square_puint()

int __cdecl s_square_puint ( puint_t  p)

Definition at line 360 of file server.c.

361 {
362  int n = atoi(p);
363  return n * n;
364 }
GLdouble n
Definition: glext.h:7729
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
GLfloat GLfloat p
Definition: glext.h:8902

◆ s_square_ref()

void __cdecl s_square_ref ( int x)

Definition at line 150 of file server.c.

151 {
152  *x = s_square(*x);
153 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
int __cdecl s_square(int x)
Definition: server.c:100

◆ s_square_sun()

double __cdecl s_square_sun ( sun_t *  su)

Definition at line 221 of file server.c.

222 {
223  switch (su->s)
224  {
225  case SUN_I: return su->u.i * su->u.i;
226  case SUN_F1:
227  case SUN_F2: return su->u.f * su->u.f;
228  case SUN_PI: return (*su->u.pi) * (*su->u.pi);
229  default:
230  return 0.0;
231  }
232 }
#define SUN_PI
#define SUN_F2
#define SUN_I
#define SUN_F1

◆ s_square_test_us()

int __cdecl s_square_test_us ( test_us_t *  tus)

Definition at line 389 of file server.c.

390 {
391  int n = atoi(tus->us.x);
392  return n * n;
393 }
GLdouble n
Definition: glext.h:7729
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)

◆ s_square_unencu()

double __cdecl s_square_unencu ( int  t,
unencu_t *  eu 
)

Definition at line 406 of file server.c.

407 {
408  switch (t)
409  {
410  case ENCU_I: return eu->i * eu->i;
411  case ENCU_F: return eu->f * eu->f;
412  default:
413  return 0.0;
414  }
415 }
#define ENCU_F
GLdouble GLdouble t
Definition: gl.h:2047
#define ENCU_I

◆ s_stop()

void __cdecl s_stop ( void  )

Definition at line 831 of file server.c.

832 {
833  if (!stop_wait_event)
834  {
835  ok(RPC_S_OK == RpcMgmtStopServerListening(NULL), "RpcMgmtStopServerListening\n");
836  ok(RPC_S_OK == RpcServerUnregisterIf(NULL, NULL, FALSE), "RpcServerUnregisterIf\n");
837  }
838  ok(SetEvent(stop_event), "SetEvent\n");
839  if (stop_wait_event)
840  {
841  DWORD ret;
843  ok(WAIT_OBJECT_0 == ret, "WaitForSingleObject\n");
844  }
845 }
RPC_STATUS WINAPI RpcMgmtStopServerListening(RPC_BINDING_HANDLE Binding)
Definition: rpc_server.c:1599
static HANDLE stop_event
Definition: server.c:44
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:679
RPC_STATUS WINAPI RpcServerUnregisterIf(RPC_IF_HANDLE IfSpec, UUID *MgrTypeUuid, UINT WaitForCallsToComplete)
Definition: rpc_server.c:1209
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
static HANDLE stop_wait_event
Definition: server.c:44
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
#define WAIT_OBJECT_0
Definition: winbase.h:387
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
#define RPC_S_OK
Definition: rpcnterr.h:22

◆ s_stop_autolisten()

void __cdecl s_stop_autolisten ( void  )

Definition at line 847 of file server.c.

848 {
851 todo_wine
852  ok(status == RPC_S_UNKNOWN_MGR_TYPE, "got %u\n", status);
853 }
RPC_STATUS WINAPI RpcServerUnregisterIf(RPC_IF_HANDLE IfSpec, UUID *MgrTypeUuid, UINT WaitForCallsToComplete)
Definition: rpc_server.c:1209
long RPC_STATUS
Definition: rpc.h:52
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
#define RPC_S_UNKNOWN_MGR_TYPE
Definition: winerror.h:1027
#define todo_wine
Definition: test.h:154
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

◆ s_str_length()

int __cdecl s_str_length ( const char s)

Definition at line 155 of file server.c.

156 {
157  return strlen(s);
158 }
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
GLdouble s
Definition: gl.h:2039

◆ s_str_struct_len()

int __cdecl s_str_struct_len ( str_struct_t *  s)

Definition at line 512 of file server.c.

513 {
514  return lstrlenA(s->s);
515 }
GLdouble s
Definition: gl.h:2039
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145

◆ s_str_t_length()

int __cdecl s_str_t_length ( str_t  s)

Definition at line 160 of file server.c.

161 {
162  return strlen(s);
163 }
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
GLdouble s
Definition: gl.h:2039

◆ s_sum()

int __cdecl s_sum ( int  x,
int  y 
)

Definition at line 105 of file server.c.

106 {
107  return x + y;
108 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ s_sum_aligns()

double __cdecl s_sum_aligns ( aligns_t *  a)

Definition at line 478 of file server.c.

479 {
480  return a->c + a->i + a->s + a->d;
481 }
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

◆ s_sum_array_ptr()

int __cdecl s_sum_array_ptr ( int(*)  a[2])

Definition at line 869 of file server.c.

870 {
871  return (*a)[0] + (*a)[1];
872 }
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

◆ s_sum_bogus()

int __cdecl s_sum_bogus ( bogus_t *  b)

Definition at line 502 of file server.c.

503 {
504  return *b->h.p1 + *b->p2 + *b->p3 + b->c;
505 }
GLboolean GLboolean GLboolean b
Definition: glext.h:6204

◆ s_sum_char()

signed char __cdecl s_sum_char ( signed char  x,
signed char  y 
)

Definition at line 110 of file server.c.

111 {
112  return x + y;
113 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ s_sum_char_hyper()

int __cdecl s_sum_char_hyper ( signed char  x,
hyper  y 
)

Definition at line 140 of file server.c.

141 {
142  return x + y;
143 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ s_sum_complex_array()

int __cdecl s_sum_complex_array ( int  n,
refpint_t  pi[] 
)

Definition at line 299 of file server.c.

300 {
301  int total = 0;
302  for (; n > 0; n--)
303  total += *pi[n - 1];
304  return total;
305 }
GLdouble n
Definition: glext.h:7729
static DWORD pi
Definition: protocol.c:150

◆ s_sum_conf_array()

int __cdecl s_sum_conf_array ( int  x[],
int  n 
)

Definition at line 254 of file server.c.

255 {
256  int *p = x, *end = p + n;
257  int sum = 0;
258 
259  while (p < end)
260  sum += *p++;
261 
262  return sum;
263 }
GLdouble n
Definition: glext.h:7729
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLuint GLuint end
Definition: gl.h:1545
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by s_sum_cs(), s_sum_pcarr2(), s_sum_unique_conf_array(), s_sum_unique_conf_ptr(), and s_sum_var_array().

◆ s_sum_conf_ptr_by_conf_ptr()

int __cdecl s_sum_conf_ptr_by_conf_ptr ( int  n1,
int n2_then_x1,
int x2 
)

Definition at line 265 of file server.c.

266 {
267  int i;
268  int sum = 0;
269  if(n1 == 0)
270  return 0;
271 
272  for(i = 1; i < n1; ++i)
273  sum += n2_then_x1[i];
274 
275  for(i = 0; i < *n2_then_x1; ++i)
276  sum += x2[i];
277 
278  return sum;
279 }
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
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35
int n1
Definition: dwarfget.c:148
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
Definition: winddi.h:3706

◆ s_sum_cps()

int __cdecl s_sum_cps ( cps_t *  cps)

Definition at line 324 of file server.c.

325 {
326  int sum = 0;
327  int i;
328 
329  for (i = 0; i < *cps->pn; ++i)
330  sum += cps->ca1[i];
331 
332  for (i = 0; i < 2 * cps->n; ++i)
333  sum += cps->ca2[i];
334 
335  return sum;
336 }
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
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35
#define for
Definition: utility.h:88

◆ s_sum_cpsc()

int __cdecl s_sum_cpsc ( cpsc_t *  cpsc)

Definition at line 338 of file server.c.

339 {
340  int sum = 0;
341  int i;
342  for (i = 0; i < (cpsc->c ? cpsc->a : cpsc->b); ++i)
343  sum += cpsc->ca[i];
344  return sum;
345 }
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
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35

◆ s_sum_cpuints()

int __cdecl s_sum_cpuints ( cpuints_t *  p)

Definition at line 375 of file server.c.

376 {
377  int sum = 0;
378  int i;
379  for (i = 0; i < p->n; ++i)
380  sum += atoi(p->ps[i]);
381  return sum;
382 }
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
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
GLfloat GLfloat p
Definition: glext.h:8902

◆ s_sum_cs()

int __cdecl s_sum_cs ( cs_t *  cs)

Definition at line 319 of file server.c.

320 {
321  return s_sum_conf_array(cs->ca, cs->n);
322 }
uint32_t cs
Definition: isohybrid.c:75
int __cdecl s_sum_conf_array(int x[], int n)
Definition: server.c:254

◆ s_sum_doub_carr()

int __cdecl s_sum_doub_carr ( doub_carr_t *  dc)

Definition at line 522 of file server.c.

523 {
524  int i, j;
525  int sum = 0;
526  for (i = 0; i < dc->n; ++i)
527  for (j = 0; j < dc->a[i]->n; ++j)
528  sum += dc->a[i]->a[j];
529  return sum;
530 }
HDC dc
Definition: cylfrac.c:34
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
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35
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 GLint GLint j
Definition: glfuncs.h:250

◆ s_sum_double_int()

int __cdecl s_sum_double_int ( int  x,
double  y 
)

Definition at line 125 of file server.c.

126 {
127  return x + y;
128 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ s_sum_fixed_array()

int __cdecl s_sum_fixed_array ( int  a[5])

Definition at line 196 of file server.c.

197 {
198  return a[0] + a[1] + a[2] + a[3] + a[4];
199 }
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

◆ s_sum_fixed_int_3d()

int __cdecl s_sum_fixed_int_3d ( int  m[2][3][4])

Definition at line 241 of file server.c.

242 {
243  int i, j, k;
244  int sum = 0;
245 
246  for (i = 0; i < 2; ++i)
247  for (j = 0; j < 3; ++j)
248  for (k = 0; k < 4; ++k)
249  sum += m[i][j][k];
250 
251  return sum;
252 }
const GLfloat * m
Definition: glext.h:10848
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
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35
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 GLint GLint j
Definition: glfuncs.h:250
int k
Definition: mpi.c:3369

◆ s_sum_float()

int __cdecl s_sum_float ( float  x,
float  y 
)

Definition at line 120 of file server.c.

121 {
122  return x + y;
123 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ s_sum_hyper()

hyper __cdecl s_sum_hyper ( hyper  x,
hyper  y 
)

Definition at line 130 of file server.c.

131 {
132  return x + y;
133 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ s_sum_hyper_int()

int __cdecl s_sum_hyper_int ( hyper  x,
hyper  y 
)

Definition at line 135 of file server.c.

136 {
137  return x + y;
138 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ s_sum_L1_norms()

int __cdecl s_sum_L1_norms ( int  n,
vector_t vs 
)

Definition at line 611 of file server.c.

612 {
613  int i;
614  int sum = 0;
615  for (i = 0; i < n; ++i)
616  sum += abs(vs[i].x) + abs(vs[i].y) + abs(vs[i].z);
617  return sum;
618 }
#define abs(i)
Definition: fconv.c:206
GLdouble n
Definition: glext.h:7729
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
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
GLdouble GLdouble z
Definition: glext.h:5874
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ s_sum_padded()

int __cdecl s_sum_padded ( padded_t *  p)

Definition at line 483 of file server.c.

484 {
485  return p->i + p->c;
486 }
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by s_sum_padded2(), and s_sum_padded_conf().

◆ s_sum_padded2()

int __cdecl s_sum_padded2 ( padded_t  ps[2])

Definition at line 488 of file server.c.

489 {
490  return s_sum_padded(&ps[0]) + s_sum_padded(&ps[1]);
491 }
int __cdecl s_sum_padded(padded_t *p)
Definition: server.c:483

◆ s_sum_padded_conf()

int __cdecl s_sum_padded_conf ( padded_t *  ps,
int  n 
)

Definition at line 493 of file server.c.

494 {
495  int sum = 0;
496  int i;
497  for (i = 0; i < n; ++i)
498  sum += s_sum_padded(&ps[i]);
499  return sum;
500 }
int __cdecl s_sum_padded(padded_t *p)
Definition: server.c:483
GLdouble n
Definition: glext.h:7729
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
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35

◆ s_sum_parr()

int __cdecl s_sum_parr ( int a[3])

Definition at line 422 of file server.c.

423 {
424  return s_sum_pcarr(a, 3);
425 }
int __cdecl s_sum_pcarr(int *a[], int n)
Definition: server.c:427
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

◆ s_sum_pcarr()

int __cdecl s_sum_pcarr ( int a[],
int  n 
)

Definition at line 427 of file server.c.

428 {
429  int i, s = 0;
430  for (i = 0; i < n; ++i)
431  s += *a[i];
432  return s;
433 }
GLdouble n
Definition: glext.h:7729
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
GLdouble s
Definition: gl.h:2039
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

Referenced by s_sum_parr().

◆ s_sum_pcarr2()

int __cdecl s_sum_pcarr2 ( int  n,
int **  pa 
)

Definition at line 606 of file server.c.

607 {
608  return s_sum_conf_array(*pa, n);
609 }
GLdouble n
Definition: glext.h:7729
int __cdecl s_sum_conf_array(int x[], int n)
Definition: server.c:254

◆ s_sum_ptr_array()

int __cdecl s_sum_ptr_array ( int a[2])

Definition at line 864 of file server.c.

865 {
866  return *a[0] + *a[1];
867 }
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

◆ s_sum_puints()

int __cdecl s_sum_puints ( puints_t *  p)

Definition at line 366 of file server.c.

367 {
368  int sum = 0;
369  int i;
370  for (i = 0; i < p->n; ++i)
371  sum += atoi(p->ps[i]);
372  return sum;
373 }
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
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
GLfloat GLfloat p
Definition: glext.h:8902

◆ s_sum_short()

short __cdecl s_sum_short ( short  x,
short  y 
)

Definition at line 115 of file server.c.

116 {
117  return x + y;
118 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ s_sum_sp()

int __cdecl s_sum_sp ( sp_t *  sp)

Definition at line 216 of file server.c.

217 {
218  return sp->x + sp->s->x;
219 }
static const WCHAR sp[]
Definition: suminfo.c:288

◆ s_sum_toplev_conf_2n()

int __cdecl s_sum_toplev_conf_2n ( int x,
int  n 
)

Definition at line 459 of file server.c.

460 {
461  int sum = 0;
462  int i;
463  for (i = 0; i < 2 * n; ++i)
464  sum += x[i];
465  return sum;
466 }
GLdouble n
Definition: glext.h:7729
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
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
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35

◆ s_sum_toplev_conf_cond()

int __cdecl s_sum_toplev_conf_cond ( int x,
int  a,
int  b,
int  c 
)

Definition at line 468 of file server.c.

469 {
470  int sum = 0;
471  int n = c ? a : b;
472  int i;
473  for (i = 0; i < n; ++i)
474  sum += x[i];
475  return sum;
476 }
GLdouble n
Definition: glext.h:7729
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
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
#define a
Definition: ke_i.h:78
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35
#define b
Definition: ke_i.h:79
const GLubyte * c
Definition: glext.h:8905

◆ s_sum_unique_conf_array()

int __cdecl s_sum_unique_conf_array ( int  x[],
int  n 
)

Definition at line 281 of file server.c.

282 {
283  return s_sum_conf_array(x, n);
284 }
GLdouble n
Definition: glext.h:7729
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
int __cdecl s_sum_conf_array(int x[], int n)
Definition: server.c:254

◆ s_sum_unique_conf_ptr()

int __cdecl s_sum_unique_conf_ptr ( int x,
int  n 
)

Definition at line 286 of file server.c.

287 {
288  return x ? s_sum_conf_array(x, n) : 0;
289 }
GLdouble n
Definition: glext.h:7729
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
int __cdecl s_sum_conf_array(int x[], int n)
Definition: server.c:254

◆ s_sum_var_array()

int __cdecl s_sum_var_array ( int  x[20],
int  n 
)

Definition at line 291 of file server.c.

292 {
293  ok(0 <= n, "RPC sum_var_array\n");
294  ok(n <= 20, "RPC sum_var_array\n");
295 
296  return s_sum_conf_array(x, n);
297 }
GLdouble n
Definition: glext.h:7729
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define ok(value,...)
int __cdecl s_sum_conf_array(int x[], int n)
Definition: server.c:254

◆ s_test_list_length()

int __cdecl s_test_list_length ( test_list_t *  list)

Definition at line 234 of file server.c.

235 {
236  return (list->t == TL_LIST
237  ? 1 + s_test_list_length(list->u.tail)
238  : 0);
239 }
int __cdecl s_test_list_length(test_list_t *list)
Definition: server.c:234
#define TL_LIST
Definition: _list.h:228

◆ s_wstr_struct_len()

int __cdecl s_wstr_struct_len ( wstr_struct_t *  s)

Definition at line 517 of file server.c.

518 {
519  return lstrlenW(s->s);
520 }
#define lstrlenW
Definition: compat.h:407
GLdouble s
Definition: gl.h:2039

◆ server()

static void server ( void  )
static

Definition at line 1751 of file server.c.

1752 {
1753  static unsigned char iptcp[] = "ncacn_ip_tcp";
1754  static unsigned char port[] = PORT;
1755  static unsigned char np[] = "ncacn_np";
1756  static unsigned char pipe[] = PIPE;
1757  static unsigned char ncalrpc[] = "ncalrpc";
1758  static unsigned char guid[] = "00000000-4114-0704-2301-000000000000";
1759  RPC_STATUS status, iptcp_status, np_status, ncalrpc_status;
1760  DWORD ret;
1761 
1762  /* needed for tests involving interface pointers */
1764 
1765  iptcp_status = RpcServerUseProtseqEpA(iptcp, 20, port, NULL);
1766  ok(iptcp_status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_ip_tcp) failed with status %d\n", iptcp_status);
1767 
1768  ncalrpc_status = RpcServerUseProtseqEpA(ncalrpc, 0, guid, NULL);
1769  ok(ncalrpc_status == RPC_S_OK, "RpcServerUseProtseqEp(ncalrpc) failed with status %d\n", ncalrpc_status);
1770 
1771  np_status = RpcServerUseProtseqEpA(np, 0, pipe, NULL);
1772  if (np_status == RPC_S_PROTSEQ_NOT_SUPPORTED)
1773  skip("Protocol sequence ncacn_np is not supported\n");
1774  else
1775  ok(np_status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_np) failed with status %d\n", np_status);
1776 
1777  if (pRpcServerRegisterIfEx)
1778  {
1779  trace("Using RpcServerRegisterIfEx\n");
1780  status = pRpcServerRegisterIfEx(s_IServer_v0_0_s_ifspec, NULL, NULL,
1783  }
1784  else
1785  status = RpcServerRegisterIf(s_IServer_v0_0_s_ifspec, NULL, NULL);
1786  ok(status == RPC_S_OK, "RpcServerRegisterIf failed with status %d\n", status);
1788  status = RpcServerListen(1, 20, TRUE);
1789  ok(status == RPC_S_OK, "RpcServerListen failed with status %d\n", status);
1792  ok(stop_event != NULL, "CreateEvent failed with error %d\n", GetLastError());
1793 
1794  if (iptcp_status == RPC_S_OK)
1795  run_client("tcp_basic");
1796  else
1797  skip("tcp tests skipped due to earlier failure\n");
1798 
1799  if (ncalrpc_status == RPC_S_OK)
1800  {
1801  run_client("ncalrpc_basic");
1802 
1803  /* we don't need to register RPC_C_AUTHN_WINNT for ncalrpc */
1804  run_client("ncalrpc_secure");
1805  }
1806  else
1807  skip("lrpc tests skipped due to earlier failure\n");
1808 
1809  if (np_status == RPC_S_OK)
1810  run_client("np_basic");
1811  else
1812  {
1813  skip("np_basic tests skipped due to earlier failure\n");
1814  /* np client is what signals stop_event, so bail out if we didn't run do it */
1815  return;
1816  }
1817 
1819  ok(WAIT_OBJECT_0 == ret, "WaitForSingleObject\n");
1820  /* if the stop event didn't fire then RpcMgmtWaitServerListen will wait
1821  * forever, so don't bother calling it in this case */
1822  if (ret == WAIT_OBJECT_0)
1823  {
1825  ok(status == RPC_S_OK, "RpcMgmtWaitServerListening failed with status %d\n", status);
1826  }
1827 
1829  stop_event = NULL;
1830 
1831  if (pRpcServerRegisterIfEx)
1832  {
1833  status = pRpcServerRegisterIfEx(s_IServer_v0_0_s_ifspec, NULL, NULL,
1836  ok(status == RPC_S_OK, "RpcServerRegisterIf() failed: %u\n", status);
1837 
1838  run_client("ncalrpc_autolisten");
1839 
1840  status = RpcServerUnregisterIf(s_IServer_v0_0_s_ifspec, NULL, TRUE);
1841  ok(status == RPC_S_OK, "RpcServerUnregisterIf() failed: %u\n", status);
1842  }
1843 
1844  CoUninitialize();
1845 }
#define trace(...)
Definition: kmt_test.h:217
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:398
#define test_is_server_listening(a, b)
Definition: server.c:1635
static HANDLE stop_event
Definition: server.c:44
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define RPC_IF_AUTOLISTEN
Definition: rpcdce.h:313
RPC_STATUS WINAPI RpcServerUnregisterIf(RPC_IF_HANDLE IfSpec, UUID *MgrTypeUuid, UINT WaitForCallsToComplete)
Definition: rpc_server.c:1209
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:597
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
long RPC_STATUS
Definition: rpc.h:52
const GUID * guid
#define PORT
Definition: server.c:36
#define RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH
Definition: rpcdce.h:317
RPC_STATUS WINAPI RpcServerListen(UINT MinimumCallThreads, UINT MaxCalls, UINT DontWait)
Definition: rpc_server.c:1527
#define ok(value,...)
#define RPC_C_LISTEN_MAX_CALLS_DEFAULT
Definition: rpcdce.h:122
smooth NULL
Definition: ftsmooth.c:416
#define PIPE
Definition: server.c:37
#define RPC_S_NOT_LISTENING
Definition: winerror.h:1026
#define RPC_S_PROTSEQ_NOT_SUPPORTED
Definition: winerror.h:1014
#define WAIT_OBJECT_0
Definition: winbase.h:387
RPC_STATUS WINAPI RpcServerUseProtseqEpA(RPC_CSTR Protseq, UINT MaxCalls, RPC_CSTR Endpoint, LPVOID SecurityDescriptor)
Definition: rpc_server.c:917
unsigned long DWORD
Definition: ntddk_ex.h:95
RPC_STATUS WINAPI RpcServerRegisterIf(RPC_IF_HANDLE IfSpec, UUID *MgrTypeUuid, RPC_MGR_EPV *MgrEpv)
Definition: rpc_server.c:1123
int ret
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:1991
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
Definition: compobj.c:1935
#define skip(...)
RPC_STATUS WINAPI RpcMgmtWaitServerListen(void)
Definition: rpc_server.c:1546
static void run_client(const char *test)
Definition: server.c:881
USHORT port
Definition: uri.c:227
static SERVICE_STATUS status
Definition: service.c:31
#define RPC_S_OK
Definition: rpcnterr.h:22
Definition: ps.c:97

Referenced by START_TEST().

◆ set_auth_info()

static void set_auth_info ( RPC_BINDING_HANDLE  handle)
static

Definition at line 1620 of file server.c.

1621 {
1623  RPC_SECURITY_QOS qos;
1624 
1625  qos.Version = 1;
1629 
1630  status = pRpcBindingSetAuthInfoExA(handle, (RPC_CSTR)domain_and_user, RPC_C_AUTHN_LEVEL_PKT_PRIVACY,
1631  RPC_C_AUTHN_WINNT, NULL, 0, &qos);
1632  ok(status == RPC_S_OK, "RpcBindingSetAuthInfoExA failed %d\n", status);
1633 }
#define RPC_C_AUTHN_WINNT
Definition: rpcdce.h:158
ULONG ImpersonationType
Definition: rpcdce.h:267
#define RPC_C_IMP_LEVEL_IMPERSONATE
Definition: rpcdce.h:176
ULONG Capabilities
Definition: rpcdce.h:265
long RPC_STATUS
Definition: rpc.h:52
#define ok(value,...)
unsigned char * RPC_CSTR
Definition: rpcdce.h:45
smooth NULL
Definition: ftsmooth.c:416
static char * domain_and_user
Definition: server.c:54
ULONG IdentityTracking
Definition: rpcdce.h:266
#define RPC_C_AUTHN_LEVEL_PKT_PRIVACY
Definition: rpcdce.h:151
#define RPC_C_QOS_CAPABILITIES_MUTUAL_AUTH
Definition: rpcdce.h:185
#define RPC_C_QOS_IDENTITY_STATIC
Definition: rpcdce.h:180
static SERVICE_STATUS status
Definition: service.c:31
#define RPC_S_OK
Definition: rpcnterr.h:22
Definition: ps.c:97

Referenced by client().

◆ set_firewall()

static HRESULT set_firewall ( enum firewall_op  op)
static

Definition at line 2143 of file server.c.

2144 {
2145  static const WCHAR testW[] = {'r','p','c','r','t','4','_','t','e','s','t',0};
2146  HRESULT hr, init;
2147  INetFwMgr *mgr = NULL;
2148  INetFwPolicy *policy = NULL;
2153 
2155  {
2156  SysFreeString( image );
2157  return E_FAIL;
2158  }
2160 
2161  hr = CoCreateInstance( &CLSID_NetFwMgr, NULL, CLSCTX_INPROC_SERVER, &IID_INetFwMgr,
2162  (void **)&mgr );
2163  ok( hr == S_OK, "got %08x\n", hr );
2164  if (hr != S_OK) goto done;
2165 
2166  hr = INetFwMgr_get_LocalPolicy( mgr, &policy );
2167  ok( hr == S_OK, "got %08x\n", hr );
2168  if (hr != S_OK) goto done;
2169 
2170  hr = INetFwPolicy_get_CurrentProfile( policy, &profile );
2171  if (hr != S_OK) goto done;
2172 
2173  hr = INetFwProfile_get_AuthorizedApplications( profile, &apps );
2174  ok( hr == S_OK, "got %08x\n", hr );
2175  if (hr != S_OK) goto done;
2176 
2177  hr = CoCreateInstance( &CLSID_NetFwAuthorizedApplication, NULL, CLSCTX_INPROC_SERVER,
2178  &IID_INetFwAuthorizedApplication, (void **)&app );
2179  ok( hr == S_OK, "got %08x\n", hr );
2180  if (hr != S_OK) goto done;
2181 
2182  hr = INetFwAuthorizedApplication_put_ProcessImageFileName( app, image );
2183  if (hr != S_OK) goto done;
2184 
2185  name = SysAllocString( testW );
2186  hr = INetFwAuthorizedApplication_put_Name( app, name );
2187  SysFreeString( name );
2188  ok( hr == S_OK, "got %08x\n", hr );
2189  if (hr != S_OK) goto done;
2190 
2191  if (op == APP_ADD)
2192  hr = INetFwAuthorizedApplications_Add( apps, app );
2193  else if (op == APP_REMOVE)
2194  hr = INetFwAuthorizedApplications_Remove( apps, image );
2195  else
2196  hr = E_INVALIDARG;
2197 
2198 done:
2199  if (app) INetFwAuthorizedApplication_Release( app );
2200  if (apps) INetFwAuthorizedApplications_Release( apps );
2201  if (policy) INetFwPolicy_Release( policy );
2202  if (profile) INetFwProfile_Release( profile );
2203  if (mgr) INetFwMgr_Release( mgr );
2204  if (SUCCEEDED( init )) CoUninitialize();
2205  SysFreeString( image );
2206  return hr;
2207 }
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:607
HRESULT hr
Definition: shlfolder.c:183
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:342
OLECHAR * BSTR
Definition: compat.h:1934
#define E_FAIL
Definition: ddrawi.h:102
static int init
Definition: wintirpc.c:33
#define ok(value,...)
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:241
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
#define MAX_PATH
Definition: compat.h:26
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3234
#define S_OK
Definition: intsafe.h:59
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:1991
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
Definition: compobj.c:1935
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:274
Definition: name.c:36
#define profile
Definition: kernel32.h:12
UINT op
Definition: effect.c:223
static const WCHAR testW[]
Definition: jsregexp.c:44
#define SUCCEEDED(hr)
Definition: intsafe.h:57
GLuint const GLchar * name
Definition: glext.h:6031

Referenced by START_TEST().

◆ START_TEST()

START_TEST ( server  )

Definition at line 2209 of file server.c.

2210 {
2211  ULONG size = 0;
2212  int argc;