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;
}
int
s_int_return(void)
int __cdecl s_int_return(void)
{
return INT_CODE;
}
int
s_square(int x)
int __cdecl s_square(int x)
{
return x * x;
}
int
s_sum(int x, int y)
int __cdecl s_sum(int x, int 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;
}
short s_sum_short(short x, short y)
short __cdecl s_sum_short(short x, short y)
{
return x + y;
}
int s_sum_float(float x, float y)
int __cdecl s_sum_float(float x, float 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;
}
hyper s_sum_hyper(hyper x, hyper y)
hyper __cdecl s_sum_hyper(hyper x, hyper 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;
}
int s_sum_char_hyper(signed char x, hyper y)
int __cdecl s_sum_char_hyper(signed char x, hyper y)
{
return x + y;
}
void
s_square_out(int x, int *y)
void __cdecl s_square_out(int x, int *y)
{
*y = s_square(x);
}
void
s_square_ref(int *x)
void __cdecl s_square_ref(int *x)
{
*x = s_square(*x);
}
int
s_str_length(const char *s)
int __cdecl s_str_length(const char *s)
{
return strlen(s);
}
int
s_str_t_length(str_t s)
int __cdecl s_str_t_length(str_t s)
{
return strlen(s);
}
int
s_cstr_length(const char *s, int n)
int __cdecl s_cstr_length(const char *s, int n)
{
int len = 0;
while (0 < n-- && *s++)
@ -174,65 +166,55 @@ s_cstr_length(const char *s, int n)
return len;
}
int
s_dot_self(vector_t *v)
int __cdecl s_dot_self(vector_t *v)
{
return s_square(v->x) + s_square(v->y) + s_square(v->z);
}
double
s_square_half(double x, double *y)
double __cdecl s_square_half(double x, double *y)
{
*y = x / 2.0;
return x * x;
}
float
s_square_half_float(float x, float *y)
float __cdecl s_square_half_float(float x, float *y)
{
*y = x / 2.0f;
return x * x;
}
LONG
s_square_half_long(LONG x, LONG *y)
LONG __cdecl s_square_half_long(LONG x, LONG *y)
{
*y = x / 2;
return x * x;
}
int
s_sum_fixed_array(int a[5])
int __cdecl s_sum_fixed_array(int a[5])
{
return a[0] + a[1] + a[2] + a[3] + a[4];
}
int
s_pints_sum(pints_t *pints)
int __cdecl s_pints_sum(pints_t *pints)
{
return *pints->pi + **pints->ppi + ***pints->pppi;
}
double
s_ptypes_sum(ptypes_t *pt)
double __cdecl s_ptypes_sum(ptypes_t *pt)
{
return *pt->pc + *pt->ps + *pt->pl + *pt->pf + *pt->pd;
}
int
s_dot_pvectors(pvectors_t *p)
int __cdecl 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;
}
int
s_sum_sp(sp_t *sp)
int __cdecl s_sum_sp(sp_t *sp)
{
return sp->x + sp->s->x;
}
double
s_square_sun(sun_t *su)
double __cdecl s_square_sun(sun_t *su)
{
switch (su->s)
{
@ -245,16 +227,14 @@ s_square_sun(sun_t *su)
}
}
int
s_test_list_length(test_list_t *list)
int __cdecl s_test_list_length(test_list_t *list)
{
return (list->t == TL_LIST
? 1 + s_test_list_length(list->u.tail)
: 0);
}
int
s_sum_fixed_int_3d(int m[2][3][4])
int __cdecl s_sum_fixed_int_3d(int m[2][3][4])
{
int i, j, k;
int sum = 0;
@ -267,8 +247,7 @@ s_sum_fixed_int_3d(int m[2][3][4])
return sum;
}
int
s_sum_conf_array(int x[], int n)
int __cdecl s_sum_conf_array(int x[], int n)
{
int *p = x, *end = p + n;
int sum = 0;
@ -279,8 +258,7 @@ s_sum_conf_array(int x[], int n)
return sum;
}
int
s_sum_conf_ptr_by_conf_ptr(int n1, int *n2_then_x1, int *x2)
int __cdecl s_sum_conf_ptr_by_conf_ptr(int n1, int *n2_then_x1, int *x2)
{
int i;
int sum = 0;
@ -296,20 +274,17 @@ s_sum_conf_ptr_by_conf_ptr(int n1, int *n2_then_x1, int *x2)
return sum;
}
int
s_sum_unique_conf_array(int x[], int n)
int __cdecl s_sum_unique_conf_array(int x[], int n)
{
return s_sum_conf_array(x, n);
}
int
s_sum_unique_conf_ptr(int *x, int n)
int __cdecl s_sum_unique_conf_ptr(int *x, int n)
{
return x ? s_sum_conf_array(x, n) : 0;
}
int
s_sum_var_array(int x[20], int n)
int __cdecl s_sum_var_array(int x[20], int n)
{
ok(0 <= n, "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);
}
int
s_sum_complex_array(int n, refpint_t pi[])
int __cdecl s_sum_complex_array(int n, refpint_t pi[])
{
int total = 0;
for (; n > 0; n--)
@ -326,28 +300,24 @@ s_sum_complex_array(int n, refpint_t pi[])
return total;
}
int
s_dot_two_vectors(vector_t vs[2])
int __cdecl 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;
}
void
s_get_number_array(int x[20], int *n)
void __cdecl s_get_number_array(int x[20], int *n)
{
int c[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
memcpy(x, c, sizeof(c));
*n = sizeof(c)/sizeof(c[0]);
}
int
s_sum_cs(cs_t *cs)
int __cdecl s_sum_cs(cs_t *cs)
{
return s_sum_conf_array(cs->ca, cs->n);
}
int
s_sum_cps(cps_t *cps)
int __cdecl s_sum_cps(cps_t *cps)
{
int sum = 0;
int i;
@ -361,8 +331,7 @@ s_sum_cps(cps_t *cps)
return sum;
}
int
s_sum_cpsc(cpsc_t *cpsc)
int __cdecl s_sum_cpsc(cpsc_t *cpsc)
{
int sum = 0;
int i;
@ -371,15 +340,13 @@ s_sum_cpsc(cpsc_t *cpsc)
return sum;
}
int
s_square_puint(puint_t p)
int __cdecl s_square_puint(puint_t p)
{
int n = atoi(p);
return n * n;
}
int
s_sum_puints(puints_t *p)
int __cdecl s_sum_puints(puints_t *p)
{
int sum = 0;
int i;
@ -388,8 +355,7 @@ s_sum_puints(puints_t *p)
return sum;
}
int
s_sum_cpuints(cpuints_t *p)
int __cdecl s_sum_cpuints(cpuints_t *p)
{
int sum = 0;
int i;
@ -398,21 +364,18 @@ s_sum_cpuints(cpuints_t *p)
return sum;
}
int
s_dot_copy_vectors(vector_t u, vector_t v)
int __cdecl s_dot_copy_vectors(vector_t u, vector_t v)
{
return u.x * v.x + u.y * v.y + u.z * v.z;
}
int
s_square_test_us(test_us_t *tus)
int __cdecl s_square_test_us(test_us_t *tus)
{
int n = atoi(tus->us.x);
return n * n;
}
double
s_square_encu(encu_t *eu)
double __cdecl s_square_encu(encu_t *eu)
{
switch (eu->t)
{
@ -423,8 +386,7 @@ s_square_encu(encu_t *eu)
}
}
double
s_square_unencu(int t, unencu_t *eu)
double __cdecl s_square_unencu(int t, unencu_t *eu)
{
switch (t)
{
@ -435,20 +397,17 @@ s_square_unencu(int t, unencu_t *eu)
}
}
void
s_check_se2(se_t *s)
void __cdecl s_check_se2(se_t *s)
{
ok(s->f == E2, "check_se2\n");
}
int
s_sum_parr(int *a[3])
int __cdecl s_sum_parr(int *a[3])
{
return s_sum_pcarr(a, 3);
}
int
s_sum_pcarr(int *a[], int n)
int __cdecl s_sum_pcarr(int *a[], int n)
{
int i, s = 0;
for (i = 0; i < n; ++i)
@ -456,8 +415,7 @@ s_sum_pcarr(int *a[], int n)
return s;
}
int
s_enum_ord(e_t e)
int __cdecl s_enum_ord(e_t e)
{
switch (e)
{
@ -470,8 +428,7 @@ s_enum_ord(e_t e)
}
}
double
s_square_encue(encue_t *eue)
double __cdecl s_square_encue(encue_t *eue)
{
switch (eue->t)
{
@ -482,8 +439,7 @@ s_square_encue(encue_t *eue)
}
}
int
s_sum_toplev_conf_2n(int *x, int n)
int __cdecl s_sum_toplev_conf_2n(int *x, int n)
{
int sum = 0;
int i;
@ -492,8 +448,7 @@ s_sum_toplev_conf_2n(int *x, int n)
return sum;
}
int
s_sum_toplev_conf_cond(int *x, int a, int b, int c)
int __cdecl s_sum_toplev_conf_cond(int *x, int a, int b, int c)
{
int sum = 0;
int n = c ? a : b;
@ -503,26 +458,22 @@ s_sum_toplev_conf_cond(int *x, int a, int b, int c)
return sum;
}
double
s_sum_aligns(aligns_t *a)
double __cdecl s_sum_aligns(aligns_t *a)
{
return a->c + a->i + a->s + a->d;
}
int
s_sum_padded(padded_t *p)
int __cdecl s_sum_padded(padded_t *p)
{
return p->i + p->c;
}
int
s_sum_padded2(padded_t ps[2])
int __cdecl s_sum_padded2(padded_t ps[2])
{
return s_sum_padded(&ps[0]) + s_sum_padded(&ps[1]);
}
int
s_sum_padded_conf(padded_t *ps, int n)
int __cdecl s_sum_padded_conf(padded_t *ps, int n)
{
int sum = 0;
int i;
@ -531,32 +482,27 @@ s_sum_padded_conf(padded_t *ps, int n)
return sum;
}
int
s_sum_bogus(bogus_t *b)
int __cdecl s_sum_bogus(bogus_t *b)
{
return *b->h.p1 + *b->p2 + *b->p3 + b->c;
}
void
s_check_null(int *null)
void __cdecl s_check_null(int *null)
{
ok(!null, "RPC check_null\n");
}
int
s_str_struct_len(str_struct_t *s)
int __cdecl s_str_struct_len(str_struct_t *s)
{
return lstrlenA(s->s);
}
int
s_wstr_struct_len(wstr_struct_t *s)
int __cdecl s_wstr_struct_len(wstr_struct_t *s)
{
return lstrlenW(s->s);
}
int
s_sum_doub_carr(doub_carr_t *dc)
int __cdecl s_sum_doub_carr(doub_carr_t *dc)
{
int i, j;
int sum = 0;
@ -566,8 +512,7 @@ s_sum_doub_carr(doub_carr_t *dc)
return sum;
}
void
s_make_pyramid_doub_carr(unsigned char n, doub_carr_t **dc)
void __cdecl s_make_pyramid_doub_carr(unsigned char n, doub_carr_t **dc)
{
doub_carr_t *t;
int i, j;
@ -584,8 +529,7 @@ s_make_pyramid_doub_carr(unsigned char n, doub_carr_t **dc)
*dc = t;
}
unsigned
s_hash_bstr(bstr_t b)
unsigned __cdecl s_hash_bstr(bstr_t b)
{
short n = b[-1];
short *s = b;
@ -596,8 +540,7 @@ s_hash_bstr(bstr_t b)
return hash;
}
void
s_get_a_bstr(bstr_t *b)
void __cdecl s_get_a_bstr(bstr_t *b)
{
bstr_t bstr;
short str[] = {5, 'W', 'i', 'n', 'e', 0};
@ -606,8 +549,7 @@ s_get_a_bstr(bstr_t *b)
*b = bstr + 1;
}
void
s_get_name(name_t *name)
void __cdecl s_get_name(name_t *name)
{
const char bossman[] = "Jeremy White";
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;
}
int
s_sum_pcarr2(int n, int **pa)
int __cdecl s_sum_pcarr2(int n, int **pa)
{
return s_sum_conf_array(*pa, n);
}
int
s_sum_L1_norms(int n, vector_t *vs)
int __cdecl s_sum_L1_norms(int n, vector_t *vs)
{
int i;
int sum = 0;
@ -632,8 +572,7 @@ s_sum_L1_norms(int n, vector_t *vs)
return sum;
}
s123_t *
s_get_s123(void)
s123_t * __cdecl s_get_s123(void)
{
s123_t *s = MIDL_user_allocate(sizeof *s);
s->f1 = 1;
@ -642,24 +581,22 @@ s_get_s123(void)
return s;
}
str_t
s_get_filename(void)
str_t __cdecl s_get_filename(void)
{
return (char *)__FILE__;
}
int s_echo_ranged_int(int n)
int __cdecl s_echo_ranged_int(int n)
{
return n;
}
void s_get_ranged_enum(renum_t *re)
void __cdecl s_get_ranged_enum(renum_t *re)
{
*re = RE3;
}
void
s_context_handle_test(void)
void __cdecl s_context_handle_test(void)
{
NDR_SCONTEXT h;
RPC_BINDING_HANDLE binding;
@ -759,8 +696,7 @@ s_context_handle_test(void)
}
}
void
s_get_numbers(int length, int size, pints_t n[])
void __cdecl s_get_numbers(int length, int size, pints_t n[])
{
int i;
for (i = 0; i < length; i++)
@ -772,8 +708,7 @@ s_get_numbers(int length, int size, pints_t n[])
}
}
void
s_get_numbers_struct(numbers_struct_t **ns)
void __cdecl s_get_numbers_struct(numbers_struct_t **ns)
{
int i;
*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;
}
void
s_full_pointer_test(int *a, int *b)
void __cdecl s_full_pointer_test(int *a, int *b)
{
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(a == b, "Expected a (%p) to point to the same memory as b (%p)\n", a, b);
}
void
s_full_pointer_null_test(int *a, int *b)
void __cdecl s_full_pointer_null_test(int *a, int *b)
{
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);
}
void
s_stop(void)
void __cdecl s_stop(void)
{
ok(RPC_S_OK == RpcMgmtStopServerListening(NULL), "RpcMgmtStopServerListening\n");
ok(RPC_S_OK == RpcServerUnregisterIf(NULL, NULL, FALSE), "RpcServerUnregisterIf\n");
@ -1419,8 +1351,7 @@ array_tests(void)
HeapFree(GetProcessHeap(), 0, pi);
}
void
s_authinfo_test(unsigned int protseq, int secure)
void __cdecl s_authinfo_test(unsigned int protseq, int secure)
{
RPC_BINDING_HANDLE binding;
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);
}
void ept_insert(handle_t h,
unsigned32 num_ents,
ept_entry_t entries[],
boolean32 replace,
error_status_t *status)
void __cdecl ept_insert(handle_t h,
unsigned32 num_ents,
ept_entry_t entries[],
boolean32 replace,
error_status_t *status)
{
unsigned32 i;
RPC_STATUS rpc_status;
@ -139,10 +139,10 @@ void ept_insert(handle_t h,
LeaveCriticalSection(&csEpm);
}
void ept_delete(handle_t h,
unsigned32 num_ents,
ept_entry_t entries[],
error_status_t *status)
void __cdecl ept_delete(handle_t h,
unsigned32 num_ents,
ept_entry_t entries[],
error_status_t *status)
{
unsigned32 i;
RPC_STATUS rpc_status;
@ -180,30 +180,30 @@ void ept_delete(handle_t h,
LeaveCriticalSection(&csEpm);
}
void ept_lookup(handle_t h,
unsigned32 inquiry_type,
uuid_p_t object,
rpc_if_id_p_t interface_id,
unsigned32 vers_option,
ept_lookup_handle_t *entry_handle,
unsigned32 max_ents,
unsigned32 *num_ents,
ept_entry_t entries[],
error_status_t *status)
void __cdecl ept_lookup(handle_t h,
unsigned32 inquiry_type,
uuid_p_t object,
rpc_if_id_p_t interface_id,
unsigned32 vers_option,
ept_lookup_handle_t *entry_handle,
unsigned32 max_ents,
unsigned32 *num_ents,
ept_entry_t entries[],
error_status_t *status)
{
WINE_FIXME("(%p, %p, %p): stub\n", h, entry_handle, status);
*status = EPT_S_CANT_PERFORM_OP;
}
void ept_map(handle_t h,
uuid_p_t object,
twr_p_t map_tower,
ept_lookup_handle_t *entry_handle,
unsigned32 max_towers,
unsigned32 *num_towers,
twr_p_t *towers,
error_status_t *status)
void __cdecl ept_map(handle_t h,
uuid_p_t object,
twr_p_t map_tower,
ept_lookup_handle_t *entry_handle,
unsigned32 max_towers,
unsigned32 *num_towers,
twr_p_t *towers,
error_status_t *status)
{
RPC_STATUS rpc_status;
RPC_SYNTAX_IDENTIFIER iface, syntax;
@ -254,29 +254,29 @@ void ept_map(handle_t h,
LeaveCriticalSection(&csEpm);
}
void ept_lookup_handle_free(handle_t h,
ept_lookup_handle_t *entry_handle,
error_status_t *status)
void __cdecl ept_lookup_handle_free(handle_t h,
ept_lookup_handle_t *entry_handle,
error_status_t *status)
{
WINE_FIXME("(%p, %p, %p): stub\n", h, entry_handle, status);
*status = EPT_S_CANT_PERFORM_OP;
}
void ept_inq_object(handle_t h,
GUID *ept_object,
error_status_t *status)
void __cdecl ept_inq_object(handle_t h,
GUID *ept_object,
error_status_t *status)
{
WINE_FIXME("(%p, %p, %p): stub\n", h, ept_object, status);
*status = EPT_S_CANT_PERFORM_OP;
}
void ept_mgmt_delete(handle_t h,
boolean32 object_speced,
uuid_p_t object,
twr_p_t tower,
error_status_t *status)
void __cdecl ept_mgmt_delete(handle_t h,
boolean32 object_speced,
uuid_p_t object,
twr_p_t tower,
error_status_t *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,
const MonikerComparisonData *data,
const InterfaceData *obj,
@ -148,7 +148,7 @@ HRESULT IrotRegister(
return hr;
}
HRESULT IrotRevoke(
HRESULT __cdecl IrotRevoke(
IrotHandle h,
IrotCookie cookie,
IrotContextHandle *ctxt_handle,
@ -195,7 +195,7 @@ HRESULT IrotRevoke(
return E_INVALIDARG;
}
HRESULT IrotIsRunning(
HRESULT __cdecl IrotIsRunning(
IrotHandle h,
const MonikerComparisonData *data)
{
@ -220,7 +220,7 @@ HRESULT IrotIsRunning(
return hr;
}
HRESULT IrotGetObject(
HRESULT __cdecl IrotGetObject(
IrotHandle h,
const MonikerComparisonData *moniker_data,
PInterfaceData *obj,
@ -262,7 +262,7 @@ HRESULT IrotGetObject(
return MK_E_UNAVAILABLE;
}
HRESULT IrotNoteChangeTime(
HRESULT __cdecl IrotNoteChangeTime(
IrotHandle h,
IrotCookie cookie,
const FILETIME *last_modified_time)
@ -286,7 +286,7 @@ HRESULT IrotNoteChangeTime(
return E_INVALIDARG;
}
HRESULT IrotGetTimeOfLastChange(
HRESULT __cdecl IrotGetTimeOfLastChange(
IrotHandle h,
const MonikerComparisonData *moniker_data,
FILETIME *time)
@ -314,7 +314,7 @@ HRESULT IrotGetTimeOfLastChange(
return hr;
}
HRESULT IrotEnumRunning(
HRESULT __cdecl IrotEnumRunning(
IrotHandle h,
PInterfaceList *list)
{

View File

@ -147,7 +147,7 @@ static DWORD validate_service_handle(SC_RPC_HANDLE handle, DWORD needed_access,
return err;
}
DWORD svcctl_OpenSCManagerW(
DWORD __cdecl svcctl_OpenSCManagerW(
MACHINE_HANDLEW MachineName, /* Note: this parameter is ignored */
LPCWSTR DatabaseName,
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,
LPCWSTR lpServiceName,
WCHAR *lpBuffer,
@ -250,7 +250,7 @@ DWORD svcctl_GetServiceDisplayNameW(
return err;
}
DWORD svcctl_GetServiceKeyNameW(
DWORD __cdecl svcctl_GetServiceKeyNameW(
SC_RPC_HANDLE hSCManager,
LPCWSTR lpServiceDisplayName,
WCHAR *lpBuffer,
@ -315,7 +315,7 @@ static DWORD create_handle_for_service(struct service_entry *entry, DWORD dwDesi
return ERROR_SUCCESS;
}
DWORD svcctl_OpenServiceW(
DWORD __cdecl svcctl_OpenServiceW(
SC_RPC_HANDLE hSCManager,
LPCWSTR lpServiceName,
DWORD dwDesiredAccess,
@ -416,7 +416,7 @@ static DWORD parse_dependencies(const WCHAR *dependencies, struct service_entry
return ERROR_SUCCESS;
}
DWORD svcctl_CreateServiceW(
DWORD __cdecl svcctl_CreateServiceW(
SC_RPC_HANDLE hSCManager,
LPCWSTR lpServiceName,
LPCWSTR lpDisplayName,
@ -510,7 +510,7 @@ DWORD svcctl_CreateServiceW(
return create_handle_for_service(entry, dwDesiredAccess, phService);
}
DWORD svcctl_DeleteService(
DWORD __cdecl svcctl_DeleteService(
SC_RPC_HANDLE hService)
{
struct sc_service_handle *service;
@ -533,7 +533,7 @@ DWORD svcctl_DeleteService(
return err;
}
DWORD svcctl_QueryServiceConfigW(
DWORD __cdecl svcctl_QueryServiceConfigW(
SC_RPC_HANDLE hService,
QUERY_SERVICE_CONFIGW *config)
{
@ -560,7 +560,7 @@ DWORD svcctl_QueryServiceConfigW(
return ERROR_SUCCESS;
}
DWORD svcctl_ChangeServiceConfigW(
DWORD __cdecl svcctl_ChangeServiceConfigW(
SC_RPC_HANDLE hService,
DWORD dwServiceType,
DWORD dwStartType,
@ -673,7 +673,7 @@ DWORD svcctl_ChangeServiceConfigW(
return err;
}
DWORD svcctl_SetServiceStatus(
DWORD __cdecl svcctl_SetServiceStatus(
SC_RPC_HANDLE hServiceStatus,
LPSERVICE_STATUS lpServiceStatus)
{
@ -703,7 +703,7 @@ DWORD svcctl_SetServiceStatus(
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;
DWORD err;
@ -745,8 +745,8 @@ DWORD svcctl_ChangeServiceConfig2W( SC_RPC_HANDLE hService, DWORD level, SERVICE
return err;
}
DWORD svcctl_QueryServiceConfig2W( SC_RPC_HANDLE hService, DWORD level,
BYTE *buffer, DWORD size, LPDWORD needed )
DWORD __cdecl svcctl_QueryServiceConfig2W( SC_RPC_HANDLE hService, DWORD level,
BYTE *buffer, DWORD size, LPDWORD needed )
{
struct sc_service_handle *service;
DWORD err;
@ -789,7 +789,7 @@ DWORD svcctl_QueryServiceConfig2W( SC_RPC_HANDLE hService, DWORD level,
return err;
}
DWORD svcctl_QueryServiceStatusEx(
DWORD __cdecl svcctl_QueryServiceStatusEx(
SC_RPC_HANDLE hService,
SC_STATUS_TYPE InfoLevel,
BYTE *lpBuffer,
@ -948,7 +948,7 @@ static BOOL service_send_control(struct service_entry *service, HANDLE pipe, DWO
return r;
}
DWORD svcctl_StartServiceW(
DWORD __cdecl svcctl_StartServiceW(
SC_RPC_HANDLE hService,
DWORD dwNumServiceArgs,
LPCWSTR *lpServiceArgVectors)
@ -966,7 +966,7 @@ DWORD svcctl_StartServiceW(
return err;
}
DWORD svcctl_ControlService(
DWORD __cdecl svcctl_ControlService(
SC_RPC_HANDLE hService,
DWORD dwControl,
SERVICE_STATUS *lpServiceStatus)
@ -1080,7 +1080,7 @@ DWORD svcctl_ControlService(
}
}
DWORD svcctl_CloseServiceHandle(
DWORD __cdecl svcctl_CloseServiceHandle(
SC_RPC_HANDLE *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);
}
DWORD svcctl_LockServiceDatabase(
DWORD __cdecl svcctl_LockServiceDatabase(
SC_RPC_HANDLE hSCManager,
SC_RPC_LOCK *phLock)
{
@ -1133,7 +1133,7 @@ DWORD svcctl_LockServiceDatabase(
return ERROR_SUCCESS;
}
DWORD svcctl_UnlockServiceDatabase(
DWORD __cdecl svcctl_UnlockServiceDatabase(
SC_RPC_LOCK *phLock)
{
WINE_TRACE("(&%p)\n", *phLock);
@ -1166,7 +1166,7 @@ static BOOL map_state(DWORD state, DWORD mask)
return FALSE;
}
DWORD svcctl_EnumServicesStatusW(
DWORD __cdecl svcctl_EnumServicesStatusW(
SC_RPC_HANDLE hmngr,
DWORD type,
DWORD state,
@ -1260,7 +1260,7 @@ static BOOL match_group(const WCHAR *g1, const WCHAR *g2)
return FALSE;
}
DWORD svcctl_EnumServicesStatusExW(
DWORD __cdecl svcctl_EnumServicesStatusExW(
SC_RPC_HANDLE hmngr,
DWORD type,
DWORD state,
@ -1345,164 +1345,141 @@ DWORD svcctl_EnumServicesStatusExW(
return ERROR_SUCCESS;
}
DWORD svcctl_QueryServiceObjectSecurity(
void)
DWORD __cdecl svcctl_QueryServiceObjectSecurity(void)
{
WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED;
}
DWORD svcctl_SetServiceObjectSecurity(
void)
DWORD __cdecl svcctl_SetServiceObjectSecurity(void)
{
WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED;
}
DWORD svcctl_QueryServiceStatus(
void)
DWORD __cdecl svcctl_QueryServiceStatus(void)
{
WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED;
}
DWORD svcctl_NotifyBootConfigStatus(
void)
DWORD __cdecl svcctl_NotifyBootConfigStatus(void)
{
WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED;
}
DWORD svcctl_SCSetServiceBitsW(
void)
DWORD __cdecl svcctl_SCSetServiceBitsW(void)
{
WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED;
}
DWORD svcctl_EnumDependentServicesW(
void)
DWORD __cdecl svcctl_EnumDependentServicesW(void)
{
WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED;
}
DWORD svcctl_QueryServiceLockStatusW(
void)
DWORD __cdecl svcctl_QueryServiceLockStatusW(void)
{
WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED;
}
DWORD svcctl_SCSetServiceBitsA(
void)
DWORD __cdecl svcctl_SCSetServiceBitsA(void)
{
WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED;
}
DWORD svcctl_ChangeServiceConfigA(
void)
DWORD __cdecl svcctl_ChangeServiceConfigA(void)
{
WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED;
}
DWORD svcctl_CreateServiceA(
void)
DWORD __cdecl svcctl_CreateServiceA(void)
{
WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED;
}
DWORD svcctl_EnumDependentServicesA(
void)
DWORD __cdecl svcctl_EnumDependentServicesA(void)
{
WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED;
}
DWORD svcctl_EnumServicesStatusA(
void)
DWORD __cdecl svcctl_EnumServicesStatusA(void)
{
WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED;
}
DWORD svcctl_OpenSCManagerA(
void)
DWORD __cdecl svcctl_OpenSCManagerA(void)
{
WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED;
}
DWORD svcctl_OpenServiceA(
void)
DWORD __cdecl svcctl_OpenServiceA(void)
{
WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED;
}
DWORD svcctl_QueryServiceConfigA(
void)
DWORD __cdecl svcctl_QueryServiceConfigA(void)
{
WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED;
}
DWORD svcctl_QueryServiceLockStatusA(
void)
DWORD __cdecl svcctl_QueryServiceLockStatusA(void)
{
WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED;
}
DWORD svcctl_StartServiceA(
void)
DWORD __cdecl svcctl_StartServiceA(void)
{
WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED;
}
DWORD svcctl_GetServiceDisplayNameA(
void)
DWORD __cdecl svcctl_GetServiceDisplayNameA(void)
{
WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED;
}
DWORD svcctl_GetServiceKeyNameA(
void)
DWORD __cdecl svcctl_GetServiceKeyNameA(void)
{
WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED;
}
DWORD svcctl_GetCurrentGroupStateW(
void)
DWORD __cdecl svcctl_GetCurrentGroupStateW(void)
{
WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED;
}
DWORD svcctl_EnumServiceGroupW(
void)
DWORD __cdecl svcctl_EnumServiceGroupW(void)
{
WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED;
}
DWORD svcctl_ChangeServiceConfig2A(
void)
DWORD __cdecl svcctl_ChangeServiceConfig2A(void)
{
WINE_FIXME("\n");
return ERROR_CALL_NOT_IMPLEMENTED;
}
DWORD svcctl_QueryServiceConfig2A(
void)
DWORD __cdecl svcctl_QueryServiceConfig2A(void)
{
WINE_FIXME("\n");
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);
type_t *rettype = type_function_get_rettype(func->type);
if (!callconv) callconv = "__cdecl";
write_type_decl_left(client, rettype);
if (needs_space_after(rettype)) fprintf(client, " ");
if (callconv) fprintf(client, "%s ", callconv);
fprintf(client, " %s ", callconv);
fprintf(client, "%s%s(\n", prefix_client, get_name(func));
indent++;
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);
if (!callconv) callconv = "__cdecl";
/* FIXME: do we need to handle call_as? */
write_type_decl_left(header, type_function_get_rettype(fun->type));
fprintf(header, " ");
if (callconv) fprintf(header, "%s ", callconv);
fprintf(header, " %s ", callconv);
fprintf(header, "%s%s(\n", prefix, get_name(fun));
if (type_get_function_args(fun->type))
write_args(header, type_get_function_args(fun->type), iface->name, 0, TRUE);