widl: Default to the cdecl calling convention in client/server functions.

This commit is contained in:
Alexandre Julliard 2011-06-10 13:40:05 +02:00
parent e8567110b3
commit 717bd66440
6 changed files with 170 additions and 262 deletions

View File

@ -88,85 +88,77 @@ xstrdup(const char *s)
return d; return d;
} }
int int __cdecl s_int_return(void)
s_int_return(void)
{ {
return INT_CODE; return INT_CODE;
} }
int int __cdecl s_square(int x)
s_square(int x)
{ {
return x * x; return x * x;
} }
int int __cdecl s_sum(int x, int y)
s_sum(int x, int y)
{ {
return x + y; return x + y;
} }
signed char s_sum_char(signed char x, signed char y) signed char __cdecl s_sum_char(signed char x, signed char y)
{ {
return x + y; return x + y;
} }
short s_sum_short(short x, short y) short __cdecl s_sum_short(short x, short y)
{ {
return x + y; return x + y;
} }
int s_sum_float(float x, float y) int __cdecl s_sum_float(float x, float y)
{ {
return x + y; return x + y;
} }
int s_sum_double_int(int x, double y) int __cdecl s_sum_double_int(int x, double y)
{ {
return x + y; return x + y;
} }
hyper s_sum_hyper(hyper x, hyper y) hyper __cdecl s_sum_hyper(hyper x, hyper y)
{ {
return x + y; return x + y;
} }
int s_sum_hyper_int(hyper x, hyper y) int __cdecl s_sum_hyper_int(hyper x, hyper y)
{ {
return x + y; return x + y;
} }
int s_sum_char_hyper(signed char x, hyper y) int __cdecl s_sum_char_hyper(signed char x, hyper y)
{ {
return x + y; return x + y;
} }
void void __cdecl s_square_out(int x, int *y)
s_square_out(int x, int *y)
{ {
*y = s_square(x); *y = s_square(x);
} }
void void __cdecl s_square_ref(int *x)
s_square_ref(int *x)
{ {
*x = s_square(*x); *x = s_square(*x);
} }
int int __cdecl s_str_length(const char *s)
s_str_length(const char *s)
{ {
return strlen(s); return strlen(s);
} }
int int __cdecl s_str_t_length(str_t s)
s_str_t_length(str_t s)
{ {
return strlen(s); return strlen(s);
} }
int int __cdecl s_cstr_length(const char *s, int n)
s_cstr_length(const char *s, int n)
{ {
int len = 0; int len = 0;
while (0 < n-- && *s++) while (0 < n-- && *s++)
@ -174,65 +166,55 @@ s_cstr_length(const char *s, int n)
return len; return len;
} }
int int __cdecl s_dot_self(vector_t *v)
s_dot_self(vector_t *v)
{ {
return s_square(v->x) + s_square(v->y) + s_square(v->z); return s_square(v->x) + s_square(v->y) + s_square(v->z);
} }
double double __cdecl s_square_half(double x, double *y)
s_square_half(double x, double *y)
{ {
*y = x / 2.0; *y = x / 2.0;
return x * x; return x * x;
} }
float float __cdecl s_square_half_float(float x, float *y)
s_square_half_float(float x, float *y)
{ {
*y = x / 2.0f; *y = x / 2.0f;
return x * x; return x * x;
} }
LONG LONG __cdecl s_square_half_long(LONG x, LONG *y)
s_square_half_long(LONG x, LONG *y)
{ {
*y = x / 2; *y = x / 2;
return x * x; return x * x;
} }
int int __cdecl s_sum_fixed_array(int a[5])
s_sum_fixed_array(int a[5])
{ {
return a[0] + a[1] + a[2] + a[3] + a[4]; return a[0] + a[1] + a[2] + a[3] + a[4];
} }
int int __cdecl s_pints_sum(pints_t *pints)
s_pints_sum(pints_t *pints)
{ {
return *pints->pi + **pints->ppi + ***pints->pppi; return *pints->pi + **pints->ppi + ***pints->pppi;
} }
double double __cdecl s_ptypes_sum(ptypes_t *pt)
s_ptypes_sum(ptypes_t *pt)
{ {
return *pt->pc + *pt->ps + *pt->pl + *pt->pf + *pt->pd; return *pt->pc + *pt->ps + *pt->pl + *pt->pf + *pt->pd;
} }
int int __cdecl s_dot_pvectors(pvectors_t *p)
s_dot_pvectors(pvectors_t *p)
{ {
return p->pu->x * (*p->pv)->x + p->pu->y * (*p->pv)->y + p->pu->z * (*p->pv)->z; return p->pu->x * (*p->pv)->x + p->pu->y * (*p->pv)->y + p->pu->z * (*p->pv)->z;
} }
int int __cdecl s_sum_sp(sp_t *sp)
s_sum_sp(sp_t *sp)
{ {
return sp->x + sp->s->x; return sp->x + sp->s->x;
} }
double double __cdecl s_square_sun(sun_t *su)
s_square_sun(sun_t *su)
{ {
switch (su->s) switch (su->s)
{ {
@ -245,16 +227,14 @@ s_square_sun(sun_t *su)
} }
} }
int int __cdecl s_test_list_length(test_list_t *list)
s_test_list_length(test_list_t *list)
{ {
return (list->t == TL_LIST return (list->t == TL_LIST
? 1 + s_test_list_length(list->u.tail) ? 1 + s_test_list_length(list->u.tail)
: 0); : 0);
} }
int int __cdecl s_sum_fixed_int_3d(int m[2][3][4])
s_sum_fixed_int_3d(int m[2][3][4])
{ {
int i, j, k; int i, j, k;
int sum = 0; int sum = 0;
@ -267,8 +247,7 @@ s_sum_fixed_int_3d(int m[2][3][4])
return sum; return sum;
} }
int int __cdecl s_sum_conf_array(int x[], int n)
s_sum_conf_array(int x[], int n)
{ {
int *p = x, *end = p + n; int *p = x, *end = p + n;
int sum = 0; int sum = 0;
@ -279,8 +258,7 @@ s_sum_conf_array(int x[], int n)
return sum; return sum;
} }
int int __cdecl s_sum_conf_ptr_by_conf_ptr(int n1, int *n2_then_x1, int *x2)
s_sum_conf_ptr_by_conf_ptr(int n1, int *n2_then_x1, int *x2)
{ {
int i; int i;
int sum = 0; int sum = 0;
@ -296,20 +274,17 @@ s_sum_conf_ptr_by_conf_ptr(int n1, int *n2_then_x1, int *x2)
return sum; return sum;
} }
int int __cdecl s_sum_unique_conf_array(int x[], int n)
s_sum_unique_conf_array(int x[], int n)
{ {
return s_sum_conf_array(x, n); return s_sum_conf_array(x, n);
} }
int int __cdecl s_sum_unique_conf_ptr(int *x, int n)
s_sum_unique_conf_ptr(int *x, int n)
{ {
return x ? s_sum_conf_array(x, n) : 0; return x ? s_sum_conf_array(x, n) : 0;
} }
int int __cdecl s_sum_var_array(int x[20], int n)
s_sum_var_array(int x[20], int n)
{ {
ok(0 <= n, "RPC sum_var_array\n"); ok(0 <= n, "RPC sum_var_array\n");
ok(n <= 20, "RPC sum_var_array\n"); ok(n <= 20, "RPC sum_var_array\n");
@ -317,8 +292,7 @@ s_sum_var_array(int x[20], int n)
return s_sum_conf_array(x, n); return s_sum_conf_array(x, n);
} }
int int __cdecl s_sum_complex_array(int n, refpint_t pi[])
s_sum_complex_array(int n, refpint_t pi[])
{ {
int total = 0; int total = 0;
for (; n > 0; n--) for (; n > 0; n--)
@ -326,28 +300,24 @@ s_sum_complex_array(int n, refpint_t pi[])
return total; return total;
} }
int int __cdecl s_dot_two_vectors(vector_t vs[2])
s_dot_two_vectors(vector_t vs[2])
{ {
return vs[0].x * vs[1].x + vs[0].y * vs[1].y + vs[0].z * vs[1].z; return vs[0].x * vs[1].x + vs[0].y * vs[1].y + vs[0].z * vs[1].z;
} }
void void __cdecl s_get_number_array(int x[20], int *n)
s_get_number_array(int x[20], int *n)
{ {
int c[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; int c[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
memcpy(x, c, sizeof(c)); memcpy(x, c, sizeof(c));
*n = sizeof(c)/sizeof(c[0]); *n = sizeof(c)/sizeof(c[0]);
} }
int int __cdecl s_sum_cs(cs_t *cs)
s_sum_cs(cs_t *cs)
{ {
return s_sum_conf_array(cs->ca, cs->n); return s_sum_conf_array(cs->ca, cs->n);
} }
int int __cdecl s_sum_cps(cps_t *cps)
s_sum_cps(cps_t *cps)
{ {
int sum = 0; int sum = 0;
int i; int i;
@ -361,8 +331,7 @@ s_sum_cps(cps_t *cps)
return sum; return sum;
} }
int int __cdecl s_sum_cpsc(cpsc_t *cpsc)
s_sum_cpsc(cpsc_t *cpsc)
{ {
int sum = 0; int sum = 0;
int i; int i;
@ -371,15 +340,13 @@ s_sum_cpsc(cpsc_t *cpsc)
return sum; return sum;
} }
int int __cdecl s_square_puint(puint_t p)
s_square_puint(puint_t p)
{ {
int n = atoi(p); int n = atoi(p);
return n * n; return n * n;
} }
int int __cdecl s_sum_puints(puints_t *p)
s_sum_puints(puints_t *p)
{ {
int sum = 0; int sum = 0;
int i; int i;
@ -388,8 +355,7 @@ s_sum_puints(puints_t *p)
return sum; return sum;
} }
int int __cdecl s_sum_cpuints(cpuints_t *p)
s_sum_cpuints(cpuints_t *p)
{ {
int sum = 0; int sum = 0;
int i; int i;
@ -398,21 +364,18 @@ s_sum_cpuints(cpuints_t *p)
return sum; return sum;
} }
int int __cdecl s_dot_copy_vectors(vector_t u, vector_t v)
s_dot_copy_vectors(vector_t u, vector_t v)
{ {
return u.x * v.x + u.y * v.y + u.z * v.z; return u.x * v.x + u.y * v.y + u.z * v.z;
} }
int int __cdecl s_square_test_us(test_us_t *tus)
s_square_test_us(test_us_t *tus)
{ {
int n = atoi(tus->us.x); int n = atoi(tus->us.x);
return n * n; return n * n;
} }
double double __cdecl s_square_encu(encu_t *eu)
s_square_encu(encu_t *eu)
{ {
switch (eu->t) switch (eu->t)
{ {
@ -423,8 +386,7 @@ s_square_encu(encu_t *eu)
} }
} }
double double __cdecl s_square_unencu(int t, unencu_t *eu)
s_square_unencu(int t, unencu_t *eu)
{ {
switch (t) switch (t)
{ {
@ -435,20 +397,17 @@ s_square_unencu(int t, unencu_t *eu)
} }
} }
void void __cdecl s_check_se2(se_t *s)
s_check_se2(se_t *s)
{ {
ok(s->f == E2, "check_se2\n"); ok(s->f == E2, "check_se2\n");
} }
int int __cdecl s_sum_parr(int *a[3])
s_sum_parr(int *a[3])
{ {
return s_sum_pcarr(a, 3); return s_sum_pcarr(a, 3);
} }
int int __cdecl s_sum_pcarr(int *a[], int n)
s_sum_pcarr(int *a[], int n)
{ {
int i, s = 0; int i, s = 0;
for (i = 0; i < n; ++i) for (i = 0; i < n; ++i)
@ -456,8 +415,7 @@ s_sum_pcarr(int *a[], int n)
return s; return s;
} }
int int __cdecl s_enum_ord(e_t e)
s_enum_ord(e_t e)
{ {
switch (e) switch (e)
{ {
@ -470,8 +428,7 @@ s_enum_ord(e_t e)
} }
} }
double double __cdecl s_square_encue(encue_t *eue)
s_square_encue(encue_t *eue)
{ {
switch (eue->t) switch (eue->t)
{ {
@ -482,8 +439,7 @@ s_square_encue(encue_t *eue)
} }
} }
int int __cdecl s_sum_toplev_conf_2n(int *x, int n)
s_sum_toplev_conf_2n(int *x, int n)
{ {
int sum = 0; int sum = 0;
int i; int i;
@ -492,8 +448,7 @@ s_sum_toplev_conf_2n(int *x, int n)
return sum; return sum;
} }
int int __cdecl s_sum_toplev_conf_cond(int *x, int a, int b, int c)
s_sum_toplev_conf_cond(int *x, int a, int b, int c)
{ {
int sum = 0; int sum = 0;
int n = c ? a : b; int n = c ? a : b;
@ -503,26 +458,22 @@ s_sum_toplev_conf_cond(int *x, int a, int b, int c)
return sum; return sum;
} }
double double __cdecl s_sum_aligns(aligns_t *a)
s_sum_aligns(aligns_t *a)
{ {
return a->c + a->i + a->s + a->d; return a->c + a->i + a->s + a->d;
} }
int int __cdecl s_sum_padded(padded_t *p)
s_sum_padded(padded_t *p)
{ {
return p->i + p->c; return p->i + p->c;
} }
int int __cdecl s_sum_padded2(padded_t ps[2])
s_sum_padded2(padded_t ps[2])
{ {
return s_sum_padded(&ps[0]) + s_sum_padded(&ps[1]); return s_sum_padded(&ps[0]) + s_sum_padded(&ps[1]);
} }
int int __cdecl s_sum_padded_conf(padded_t *ps, int n)
s_sum_padded_conf(padded_t *ps, int n)
{ {
int sum = 0; int sum = 0;
int i; int i;
@ -531,32 +482,27 @@ s_sum_padded_conf(padded_t *ps, int n)
return sum; return sum;
} }
int int __cdecl s_sum_bogus(bogus_t *b)
s_sum_bogus(bogus_t *b)
{ {
return *b->h.p1 + *b->p2 + *b->p3 + b->c; return *b->h.p1 + *b->p2 + *b->p3 + b->c;
} }
void void __cdecl s_check_null(int *null)
s_check_null(int *null)
{ {
ok(!null, "RPC check_null\n"); ok(!null, "RPC check_null\n");
} }
int int __cdecl s_str_struct_len(str_struct_t *s)
s_str_struct_len(str_struct_t *s)
{ {
return lstrlenA(s->s); return lstrlenA(s->s);
} }
int int __cdecl s_wstr_struct_len(wstr_struct_t *s)
s_wstr_struct_len(wstr_struct_t *s)
{ {
return lstrlenW(s->s); return lstrlenW(s->s);
} }
int int __cdecl s_sum_doub_carr(doub_carr_t *dc)
s_sum_doub_carr(doub_carr_t *dc)
{ {
int i, j; int i, j;
int sum = 0; int sum = 0;
@ -566,8 +512,7 @@ s_sum_doub_carr(doub_carr_t *dc)
return sum; return sum;
} }
void void __cdecl s_make_pyramid_doub_carr(unsigned char n, doub_carr_t **dc)
s_make_pyramid_doub_carr(unsigned char n, doub_carr_t **dc)
{ {
doub_carr_t *t; doub_carr_t *t;
int i, j; int i, j;
@ -584,8 +529,7 @@ s_make_pyramid_doub_carr(unsigned char n, doub_carr_t **dc)
*dc = t; *dc = t;
} }
unsigned unsigned __cdecl s_hash_bstr(bstr_t b)
s_hash_bstr(bstr_t b)
{ {
short n = b[-1]; short n = b[-1];
short *s = b; short *s = b;
@ -596,8 +540,7 @@ s_hash_bstr(bstr_t b)
return hash; return hash;
} }
void void __cdecl s_get_a_bstr(bstr_t *b)
s_get_a_bstr(bstr_t *b)
{ {
bstr_t bstr; bstr_t bstr;
short str[] = {5, 'W', 'i', 'n', 'e', 0}; short str[] = {5, 'W', 'i', 'n', 'e', 0};
@ -606,8 +549,7 @@ s_get_a_bstr(bstr_t *b)
*b = bstr + 1; *b = bstr + 1;
} }
void void __cdecl s_get_name(name_t *name)
s_get_name(name_t *name)
{ {
const char bossman[] = "Jeremy White"; const char bossman[] = "Jeremy White";
memcpy(name->name, bossman, min(name->size, sizeof(bossman))); memcpy(name->name, bossman, min(name->size, sizeof(bossman)));
@ -616,14 +558,12 @@ s_get_name(name_t *name)
name->name[name->size - 1] = 0; name->name[name->size - 1] = 0;
} }
int int __cdecl s_sum_pcarr2(int n, int **pa)
s_sum_pcarr2(int n, int **pa)
{ {
return s_sum_conf_array(*pa, n); return s_sum_conf_array(*pa, n);
} }
int int __cdecl s_sum_L1_norms(int n, vector_t *vs)
s_sum_L1_norms(int n, vector_t *vs)
{ {
int i; int i;
int sum = 0; int sum = 0;
@ -632,8 +572,7 @@ s_sum_L1_norms(int n, vector_t *vs)
return sum; return sum;
} }
s123_t * s123_t * __cdecl s_get_s123(void)
s_get_s123(void)
{ {
s123_t *s = MIDL_user_allocate(sizeof *s); s123_t *s = MIDL_user_allocate(sizeof *s);
s->f1 = 1; s->f1 = 1;
@ -642,24 +581,22 @@ s_get_s123(void)
return s; return s;
} }
str_t str_t __cdecl s_get_filename(void)
s_get_filename(void)
{ {
return (char *)__FILE__; return (char *)__FILE__;
} }
int s_echo_ranged_int(int n) int __cdecl s_echo_ranged_int(int n)
{ {
return n; return n;
} }
void s_get_ranged_enum(renum_t *re) void __cdecl s_get_ranged_enum(renum_t *re)
{ {
*re = RE3; *re = RE3;
} }
void void __cdecl s_context_handle_test(void)
s_context_handle_test(void)
{ {
NDR_SCONTEXT h; NDR_SCONTEXT h;
RPC_BINDING_HANDLE binding; RPC_BINDING_HANDLE binding;
@ -759,8 +696,7 @@ s_context_handle_test(void)
} }
} }
void void __cdecl s_get_numbers(int length, int size, pints_t n[])
s_get_numbers(int length, int size, pints_t n[])
{ {
int i; int i;
for (i = 0; i < length; i++) for (i = 0; i < length; i++)
@ -772,8 +708,7 @@ s_get_numbers(int length, int size, pints_t n[])
} }
} }
void void __cdecl s_get_numbers_struct(numbers_struct_t **ns)
s_get_numbers_struct(numbers_struct_t **ns)
{ {
int i; int i;
*ns = midl_user_allocate(FIELD_OFFSET(numbers_struct_t, numbers[5])); *ns = midl_user_allocate(FIELD_OFFSET(numbers_struct_t, numbers[5]));
@ -790,23 +725,20 @@ s_get_numbers_struct(numbers_struct_t **ns)
*(*ns)->numbers[0].pi = 5; *(*ns)->numbers[0].pi = 5;
} }
void void __cdecl s_full_pointer_test(int *a, int *b)
s_full_pointer_test(int *a, int *b)
{ {
ok(*a == 42, "Expected *a to be 42 instead of %d\n", *a); ok(*a == 42, "Expected *a to be 42 instead of %d\n", *a);
ok(*b == 42, "Expected *b to be 42 instead of %d\n", *a); ok(*b == 42, "Expected *b to be 42 instead of %d\n", *a);
ok(a == b, "Expected a (%p) to point to the same memory as b (%p)\n", a, b); ok(a == b, "Expected a (%p) to point to the same memory as b (%p)\n", a, b);
} }
void void __cdecl s_full_pointer_null_test(int *a, int *b)
s_full_pointer_null_test(int *a, int *b)
{ {
ok(*a == 42, "Expected *a to be 42 instead of %d\n", *a); ok(*a == 42, "Expected *a to be 42 instead of %d\n", *a);
ok(b == NULL, "Expected b to be NULL instead of %p\n", b); ok(b == NULL, "Expected b to be NULL instead of %p\n", b);
} }
void void __cdecl s_stop(void)
s_stop(void)
{ {
ok(RPC_S_OK == RpcMgmtStopServerListening(NULL), "RpcMgmtStopServerListening\n"); ok(RPC_S_OK == RpcMgmtStopServerListening(NULL), "RpcMgmtStopServerListening\n");
ok(RPC_S_OK == RpcServerUnregisterIf(NULL, NULL, FALSE), "RpcServerUnregisterIf\n"); ok(RPC_S_OK == RpcServerUnregisterIf(NULL, NULL, FALSE), "RpcServerUnregisterIf\n");
@ -1419,8 +1351,7 @@ array_tests(void)
HeapFree(GetProcessHeap(), 0, pi); HeapFree(GetProcessHeap(), 0, pi);
} }
void void __cdecl s_authinfo_test(unsigned int protseq, int secure)
s_authinfo_test(unsigned int protseq, int secure)
{ {
RPC_BINDING_HANDLE binding; RPC_BINDING_HANDLE binding;
RPC_STATUS status; RPC_STATUS status;

View File

@ -89,11 +89,11 @@ void __RPC_USER ept_lookup_handle_t_rundown(ept_lookup_handle_t entry_handle)
WINE_FIXME("%p\n", entry_handle); WINE_FIXME("%p\n", entry_handle);
} }
void ept_insert(handle_t h, void __cdecl ept_insert(handle_t h,
unsigned32 num_ents, unsigned32 num_ents,
ept_entry_t entries[], ept_entry_t entries[],
boolean32 replace, boolean32 replace,
error_status_t *status) error_status_t *status)
{ {
unsigned32 i; unsigned32 i;
RPC_STATUS rpc_status; RPC_STATUS rpc_status;
@ -139,10 +139,10 @@ void ept_insert(handle_t h,
LeaveCriticalSection(&csEpm); LeaveCriticalSection(&csEpm);
} }
void ept_delete(handle_t h, void __cdecl ept_delete(handle_t h,
unsigned32 num_ents, unsigned32 num_ents,
ept_entry_t entries[], ept_entry_t entries[],
error_status_t *status) error_status_t *status)
{ {
unsigned32 i; unsigned32 i;
RPC_STATUS rpc_status; RPC_STATUS rpc_status;
@ -180,30 +180,30 @@ void ept_delete(handle_t h,
LeaveCriticalSection(&csEpm); LeaveCriticalSection(&csEpm);
} }
void ept_lookup(handle_t h, void __cdecl ept_lookup(handle_t h,
unsigned32 inquiry_type, unsigned32 inquiry_type,
uuid_p_t object, uuid_p_t object,
rpc_if_id_p_t interface_id, rpc_if_id_p_t interface_id,
unsigned32 vers_option, unsigned32 vers_option,
ept_lookup_handle_t *entry_handle, ept_lookup_handle_t *entry_handle,
unsigned32 max_ents, unsigned32 max_ents,
unsigned32 *num_ents, unsigned32 *num_ents,
ept_entry_t entries[], ept_entry_t entries[],
error_status_t *status) error_status_t *status)
{ {
WINE_FIXME("(%p, %p, %p): stub\n", h, entry_handle, status); WINE_FIXME("(%p, %p, %p): stub\n", h, entry_handle, status);
*status = EPT_S_CANT_PERFORM_OP; *status = EPT_S_CANT_PERFORM_OP;
} }
void ept_map(handle_t h, void __cdecl ept_map(handle_t h,
uuid_p_t object, uuid_p_t object,
twr_p_t map_tower, twr_p_t map_tower,
ept_lookup_handle_t *entry_handle, ept_lookup_handle_t *entry_handle,
unsigned32 max_towers, unsigned32 max_towers,
unsigned32 *num_towers, unsigned32 *num_towers,
twr_p_t *towers, twr_p_t *towers,
error_status_t *status) error_status_t *status)
{ {
RPC_STATUS rpc_status; RPC_STATUS rpc_status;
RPC_SYNTAX_IDENTIFIER iface, syntax; RPC_SYNTAX_IDENTIFIER iface, syntax;
@ -254,29 +254,29 @@ void ept_map(handle_t h,
LeaveCriticalSection(&csEpm); LeaveCriticalSection(&csEpm);
} }
void ept_lookup_handle_free(handle_t h, void __cdecl ept_lookup_handle_free(handle_t h,
ept_lookup_handle_t *entry_handle, ept_lookup_handle_t *entry_handle,
error_status_t *status) error_status_t *status)
{ {
WINE_FIXME("(%p, %p, %p): stub\n", h, entry_handle, status); WINE_FIXME("(%p, %p, %p): stub\n", h, entry_handle, status);
*status = EPT_S_CANT_PERFORM_OP; *status = EPT_S_CANT_PERFORM_OP;
} }
void ept_inq_object(handle_t h, void __cdecl ept_inq_object(handle_t h,
GUID *ept_object, GUID *ept_object,
error_status_t *status) error_status_t *status)
{ {
WINE_FIXME("(%p, %p, %p): stub\n", h, ept_object, status); WINE_FIXME("(%p, %p, %p): stub\n", h, ept_object, status);
*status = EPT_S_CANT_PERFORM_OP; *status = EPT_S_CANT_PERFORM_OP;
} }
void ept_mgmt_delete(handle_t h, void __cdecl ept_mgmt_delete(handle_t h,
boolean32 object_speced, boolean32 object_speced,
uuid_p_t object, uuid_p_t object,
twr_p_t tower, twr_p_t tower,
error_status_t *status) error_status_t *status)
{ {
WINE_FIXME("(%p, %d, %p, %p, %p): stub\n", h, object_speced, object, tower, status); WINE_FIXME("(%p, %d, %p, %p, %p): stub\n", h, object_speced, object, tower, status);

View File

@ -68,7 +68,7 @@ static inline void rot_entry_release(struct rot_entry *rot_entry)
} }
} }
HRESULT IrotRegister( HRESULT __cdecl IrotRegister(
IrotHandle h, IrotHandle h,
const MonikerComparisonData *data, const MonikerComparisonData *data,
const InterfaceData *obj, const InterfaceData *obj,
@ -148,7 +148,7 @@ HRESULT IrotRegister(
return hr; return hr;
} }
HRESULT IrotRevoke( HRESULT __cdecl IrotRevoke(
IrotHandle h, IrotHandle h,
IrotCookie cookie, IrotCookie cookie,
IrotContextHandle *ctxt_handle, IrotContextHandle *ctxt_handle,
@ -195,7 +195,7 @@ HRESULT IrotRevoke(
return E_INVALIDARG; return E_INVALIDARG;
} }
HRESULT IrotIsRunning( HRESULT __cdecl IrotIsRunning(
IrotHandle h, IrotHandle h,
const MonikerComparisonData *data) const MonikerComparisonData *data)
{ {
@ -220,7 +220,7 @@ HRESULT IrotIsRunning(
return hr; return hr;
} }
HRESULT IrotGetObject( HRESULT __cdecl IrotGetObject(
IrotHandle h, IrotHandle h,
const MonikerComparisonData *moniker_data, const MonikerComparisonData *moniker_data,
PInterfaceData *obj, PInterfaceData *obj,
@ -262,7 +262,7 @@ HRESULT IrotGetObject(
return MK_E_UNAVAILABLE; return MK_E_UNAVAILABLE;
} }
HRESULT IrotNoteChangeTime( HRESULT __cdecl IrotNoteChangeTime(
IrotHandle h, IrotHandle h,
IrotCookie cookie, IrotCookie cookie,
const FILETIME *last_modified_time) const FILETIME *last_modified_time)
@ -286,7 +286,7 @@ HRESULT IrotNoteChangeTime(
return E_INVALIDARG; return E_INVALIDARG;
} }
HRESULT IrotGetTimeOfLastChange( HRESULT __cdecl IrotGetTimeOfLastChange(
IrotHandle h, IrotHandle h,
const MonikerComparisonData *moniker_data, const MonikerComparisonData *moniker_data,
FILETIME *time) FILETIME *time)
@ -314,7 +314,7 @@ HRESULT IrotGetTimeOfLastChange(
return hr; return hr;
} }
HRESULT IrotEnumRunning( HRESULT __cdecl IrotEnumRunning(
IrotHandle h, IrotHandle h,
PInterfaceList *list) PInterfaceList *list)
{ {

View File

@ -147,7 +147,7 @@ static DWORD validate_service_handle(SC_RPC_HANDLE handle, DWORD needed_access,
return err; return err;
} }
DWORD svcctl_OpenSCManagerW( DWORD __cdecl svcctl_OpenSCManagerW(
MACHINE_HANDLEW MachineName, /* Note: this parameter is ignored */ MACHINE_HANDLEW MachineName, /* Note: this parameter is ignored */
LPCWSTR DatabaseName, LPCWSTR DatabaseName,
DWORD dwAccessMask, DWORD dwAccessMask,
@ -204,7 +204,7 @@ static void SC_RPC_HANDLE_destroy(SC_RPC_HANDLE handle)
} }
} }
DWORD svcctl_GetServiceDisplayNameW( DWORD __cdecl svcctl_GetServiceDisplayNameW(
SC_RPC_HANDLE hSCManager, SC_RPC_HANDLE hSCManager,
LPCWSTR lpServiceName, LPCWSTR lpServiceName,
WCHAR *lpBuffer, WCHAR *lpBuffer,
@ -250,7 +250,7 @@ DWORD svcctl_GetServiceDisplayNameW(
return err; return err;
} }
DWORD svcctl_GetServiceKeyNameW( DWORD __cdecl svcctl_GetServiceKeyNameW(
SC_RPC_HANDLE hSCManager, SC_RPC_HANDLE hSCManager,
LPCWSTR lpServiceDisplayName, LPCWSTR lpServiceDisplayName,
WCHAR *lpBuffer, WCHAR *lpBuffer,
@ -315,7 +315,7 @@ static DWORD create_handle_for_service(struct service_entry *entry, DWORD dwDesi
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
DWORD svcctl_OpenServiceW( DWORD __cdecl svcctl_OpenServiceW(
SC_RPC_HANDLE hSCManager, SC_RPC_HANDLE hSCManager,
LPCWSTR lpServiceName, LPCWSTR lpServiceName,
DWORD dwDesiredAccess, DWORD dwDesiredAccess,
@ -416,7 +416,7 @@ static DWORD parse_dependencies(const WCHAR *dependencies, struct service_entry
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
DWORD svcctl_CreateServiceW( DWORD __cdecl svcctl_CreateServiceW(
SC_RPC_HANDLE hSCManager, SC_RPC_HANDLE hSCManager,
LPCWSTR lpServiceName, LPCWSTR lpServiceName,
LPCWSTR lpDisplayName, LPCWSTR lpDisplayName,
@ -510,7 +510,7 @@ DWORD svcctl_CreateServiceW(
return create_handle_for_service(entry, dwDesiredAccess, phService); return create_handle_for_service(entry, dwDesiredAccess, phService);
} }
DWORD svcctl_DeleteService( DWORD __cdecl svcctl_DeleteService(
SC_RPC_HANDLE hService) SC_RPC_HANDLE hService)
{ {
struct sc_service_handle *service; struct sc_service_handle *service;
@ -533,7 +533,7 @@ DWORD svcctl_DeleteService(
return err; return err;
} }
DWORD svcctl_QueryServiceConfigW( DWORD __cdecl svcctl_QueryServiceConfigW(
SC_RPC_HANDLE hService, SC_RPC_HANDLE hService,
QUERY_SERVICE_CONFIGW *config) QUERY_SERVICE_CONFIGW *config)
{ {
@ -560,7 +560,7 @@ DWORD svcctl_QueryServiceConfigW(
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
DWORD svcctl_ChangeServiceConfigW( DWORD __cdecl svcctl_ChangeServiceConfigW(
SC_RPC_HANDLE hService, SC_RPC_HANDLE hService,
DWORD dwServiceType, DWORD dwServiceType,
DWORD dwStartType, DWORD dwStartType,
@ -673,7 +673,7 @@ DWORD svcctl_ChangeServiceConfigW(
return err; return err;
} }
DWORD svcctl_SetServiceStatus( DWORD __cdecl svcctl_SetServiceStatus(
SC_RPC_HANDLE hServiceStatus, SC_RPC_HANDLE hServiceStatus,
LPSERVICE_STATUS lpServiceStatus) LPSERVICE_STATUS lpServiceStatus)
{ {
@ -703,7 +703,7 @@ DWORD svcctl_SetServiceStatus(
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
DWORD svcctl_ChangeServiceConfig2W( SC_RPC_HANDLE hService, DWORD level, SERVICE_CONFIG2W *config ) DWORD __cdecl svcctl_ChangeServiceConfig2W( SC_RPC_HANDLE hService, DWORD level, SERVICE_CONFIG2W *config )
{ {
struct sc_service_handle *service; struct sc_service_handle *service;
DWORD err; DWORD err;
@ -745,8 +745,8 @@ DWORD svcctl_ChangeServiceConfig2W( SC_RPC_HANDLE hService, DWORD level, SERVICE
return err; return err;
} }
DWORD svcctl_QueryServiceConfig2W( SC_RPC_HANDLE hService, DWORD level, DWORD __cdecl svcctl_QueryServiceConfig2W( SC_RPC_HANDLE hService, DWORD level,
BYTE *buffer, DWORD size, LPDWORD needed ) BYTE *buffer, DWORD size, LPDWORD needed )
{ {
struct sc_service_handle *service; struct sc_service_handle *service;
DWORD err; DWORD err;
@ -789,7 +789,7 @@ DWORD svcctl_QueryServiceConfig2W( SC_RPC_HANDLE hService, DWORD level,
return err; return err;
} }
DWORD svcctl_QueryServiceStatusEx( DWORD __cdecl svcctl_QueryServiceStatusEx(
SC_RPC_HANDLE hService, SC_RPC_HANDLE hService,
SC_STATUS_TYPE InfoLevel, SC_STATUS_TYPE InfoLevel,
BYTE *lpBuffer, BYTE *lpBuffer,
@ -948,7 +948,7 @@ static BOOL service_send_control(struct service_entry *service, HANDLE pipe, DWO
return r; return r;
} }
DWORD svcctl_StartServiceW( DWORD __cdecl svcctl_StartServiceW(
SC_RPC_HANDLE hService, SC_RPC_HANDLE hService,
DWORD dwNumServiceArgs, DWORD dwNumServiceArgs,
LPCWSTR *lpServiceArgVectors) LPCWSTR *lpServiceArgVectors)
@ -966,7 +966,7 @@ DWORD svcctl_StartServiceW(
return err; return err;
} }
DWORD svcctl_ControlService( DWORD __cdecl svcctl_ControlService(
SC_RPC_HANDLE hService, SC_RPC_HANDLE hService,
DWORD dwControl, DWORD dwControl,
SERVICE_STATUS *lpServiceStatus) SERVICE_STATUS *lpServiceStatus)
@ -1080,7 +1080,7 @@ DWORD svcctl_ControlService(
} }
} }
DWORD svcctl_CloseServiceHandle( DWORD __cdecl svcctl_CloseServiceHandle(
SC_RPC_HANDLE *handle) SC_RPC_HANDLE *handle)
{ {
WINE_TRACE("(&%p)\n", *handle); WINE_TRACE("(&%p)\n", *handle);
@ -1103,7 +1103,7 @@ void __RPC_USER SC_RPC_LOCK_rundown(SC_RPC_LOCK hLock)
SC_RPC_LOCK_destroy(hLock); SC_RPC_LOCK_destroy(hLock);
} }
DWORD svcctl_LockServiceDatabase( DWORD __cdecl svcctl_LockServiceDatabase(
SC_RPC_HANDLE hSCManager, SC_RPC_HANDLE hSCManager,
SC_RPC_LOCK *phLock) SC_RPC_LOCK *phLock)
{ {
@ -1133,7 +1133,7 @@ DWORD svcctl_LockServiceDatabase(
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
DWORD svcctl_UnlockServiceDatabase( DWORD __cdecl svcctl_UnlockServiceDatabase(
SC_RPC_LOCK *phLock) SC_RPC_LOCK *phLock)
{ {
WINE_TRACE("(&%p)\n", *phLock); WINE_TRACE("(&%p)\n", *phLock);
@ -1166,7 +1166,7 @@ static BOOL map_state(DWORD state, DWORD mask)
return FALSE; return FALSE;
} }
DWORD svcctl_EnumServicesStatusW( DWORD __cdecl svcctl_EnumServicesStatusW(
SC_RPC_HANDLE hmngr, SC_RPC_HANDLE hmngr,
DWORD type, DWORD type,
DWORD state, DWORD state,
@ -1260,7 +1260,7 @@ static BOOL match_group(const WCHAR *g1, const WCHAR *g2)
return FALSE; return FALSE;
} }
DWORD svcctl_EnumServicesStatusExW( DWORD __cdecl svcctl_EnumServicesStatusExW(
SC_RPC_HANDLE hmngr, SC_RPC_HANDLE hmngr,
DWORD type, DWORD type,
DWORD state, DWORD state,
@ -1345,164 +1345,141 @@ DWORD svcctl_EnumServicesStatusExW(
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
DWORD svcctl_QueryServiceObjectSecurity( DWORD __cdecl svcctl_QueryServiceObjectSecurity(void)
void)
{ {
WINE_FIXME("\n"); WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
DWORD svcctl_SetServiceObjectSecurity( DWORD __cdecl svcctl_SetServiceObjectSecurity(void)
void)
{ {
WINE_FIXME("\n"); WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
DWORD svcctl_QueryServiceStatus( DWORD __cdecl svcctl_QueryServiceStatus(void)
void)
{ {
WINE_FIXME("\n"); WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
DWORD svcctl_NotifyBootConfigStatus( DWORD __cdecl svcctl_NotifyBootConfigStatus(void)
void)
{ {
WINE_FIXME("\n"); WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
DWORD svcctl_SCSetServiceBitsW( DWORD __cdecl svcctl_SCSetServiceBitsW(void)
void)
{ {
WINE_FIXME("\n"); WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
DWORD svcctl_EnumDependentServicesW( DWORD __cdecl svcctl_EnumDependentServicesW(void)
void)
{ {
WINE_FIXME("\n"); WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
DWORD svcctl_QueryServiceLockStatusW( DWORD __cdecl svcctl_QueryServiceLockStatusW(void)
void)
{ {
WINE_FIXME("\n"); WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
DWORD svcctl_SCSetServiceBitsA( DWORD __cdecl svcctl_SCSetServiceBitsA(void)
void)
{ {
WINE_FIXME("\n"); WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
DWORD svcctl_ChangeServiceConfigA( DWORD __cdecl svcctl_ChangeServiceConfigA(void)
void)
{ {
WINE_FIXME("\n"); WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
DWORD svcctl_CreateServiceA( DWORD __cdecl svcctl_CreateServiceA(void)
void)
{ {
WINE_FIXME("\n"); WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
DWORD svcctl_EnumDependentServicesA( DWORD __cdecl svcctl_EnumDependentServicesA(void)
void)
{ {
WINE_FIXME("\n"); WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
DWORD svcctl_EnumServicesStatusA( DWORD __cdecl svcctl_EnumServicesStatusA(void)
void)
{ {
WINE_FIXME("\n"); WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
DWORD svcctl_OpenSCManagerA( DWORD __cdecl svcctl_OpenSCManagerA(void)
void)
{ {
WINE_FIXME("\n"); WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
DWORD svcctl_OpenServiceA( DWORD __cdecl svcctl_OpenServiceA(void)
void)
{ {
WINE_FIXME("\n"); WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
DWORD svcctl_QueryServiceConfigA( DWORD __cdecl svcctl_QueryServiceConfigA(void)
void)
{ {
WINE_FIXME("\n"); WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
DWORD svcctl_QueryServiceLockStatusA( DWORD __cdecl svcctl_QueryServiceLockStatusA(void)
void)
{ {
WINE_FIXME("\n"); WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
DWORD svcctl_StartServiceA( DWORD __cdecl svcctl_StartServiceA(void)
void)
{ {
WINE_FIXME("\n"); WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
DWORD svcctl_GetServiceDisplayNameA( DWORD __cdecl svcctl_GetServiceDisplayNameA(void)
void)
{ {
WINE_FIXME("\n"); WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
DWORD svcctl_GetServiceKeyNameA( DWORD __cdecl svcctl_GetServiceKeyNameA(void)
void)
{ {
WINE_FIXME("\n"); WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
DWORD svcctl_GetCurrentGroupStateW( DWORD __cdecl svcctl_GetCurrentGroupStateW(void)
void)
{ {
WINE_FIXME("\n"); WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
DWORD svcctl_EnumServiceGroupW( DWORD __cdecl svcctl_EnumServiceGroupW(void)
void)
{ {
WINE_FIXME("\n"); WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
DWORD svcctl_ChangeServiceConfig2A( DWORD __cdecl svcctl_ChangeServiceConfig2A(void)
void)
{ {
WINE_FIXME("\n"); WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
DWORD svcctl_QueryServiceConfig2A( DWORD __cdecl svcctl_QueryServiceConfig2A(void)
void)
{ {
WINE_FIXME("\n"); WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;

View File

@ -78,9 +78,9 @@ static void write_client_func_decl( const type_t *iface, const var_t *func )
const var_list_t *args = type_get_function_args(func->type); const var_list_t *args = type_get_function_args(func->type);
type_t *rettype = type_function_get_rettype(func->type); type_t *rettype = type_function_get_rettype(func->type);
if (!callconv) callconv = "__cdecl";
write_type_decl_left(client, rettype); write_type_decl_left(client, rettype);
if (needs_space_after(rettype)) fprintf(client, " "); fprintf(client, " %s ", callconv);
if (callconv) fprintf(client, "%s ", callconv);
fprintf(client, "%s%s(\n", prefix_client, get_name(func)); fprintf(client, "%s%s(\n", prefix_client, get_name(func));
indent++; indent++;
if (args) if (args)

View File

@ -994,10 +994,10 @@ static void write_function_proto(FILE *header, const type_t *iface, const var_t
{ {
const char *callconv = get_attrp(fun->type->attrs, ATTR_CALLCONV); const char *callconv = get_attrp(fun->type->attrs, ATTR_CALLCONV);
if (!callconv) callconv = "__cdecl";
/* FIXME: do we need to handle call_as? */ /* FIXME: do we need to handle call_as? */
write_type_decl_left(header, type_function_get_rettype(fun->type)); write_type_decl_left(header, type_function_get_rettype(fun->type));
fprintf(header, " "); fprintf(header, " %s ", callconv);
if (callconv) fprintf(header, "%s ", callconv);
fprintf(header, "%s%s(\n", prefix, get_name(fun)); fprintf(header, "%s%s(\n", prefix, get_name(fun));
if (type_get_function_args(fun->type)) if (type_get_function_args(fun->type))
write_args(header, type_get_function_args(fun->type), iface->name, 0, TRUE); write_args(header, type_get_function_args(fun->type), iface->name, 0, TRUE);