50 print_proxy(
"static const MIDL_STUB_DESC Object_StubDesc;\n");
56 print_proxy(
"static const MIDL_STUB_DESC Object_StubDesc =\n{\n");
63 print_proxy(
"1, /* -error bounds_check flag */\n");
66 print_proxy(
"0x50200ca, /* MIDL Version 5.2.202 */\n");
69 print_proxy(
"0, /* notify & notify_flag routine table */\n");
149 unsigned int type_offset =
arg->typestring_offset;
168 print_proxy(
"NdrClearOutParameters( &__frame->_StubMsg, ");
169 fprintf(
proxy,
"&__MIDL_TypeFormatString.Format[%u], ", type_offset );
192 unsigned int proc_offset)
199 if (!callconv) callconv =
"STDMETHODCALLTYPE";
212 print_proxy(
"static void __finally_%s_%s_Proxy( struct __proxy_frame *__frame )\n",
217 print_proxy(
"NdrProxyFreeBuffer( __frame->This, &__frame->_StubMsg );\n" );
228 print_proxy(
"struct __proxy_frame __f, * const __frame = &__f;\n" );
245 if (has_full_pointer)
254 print_proxy(
"NdrProxyInitialize(This, &_RpcMessage, &__frame->_StubMsg, &Object_StubDesc, %d);\n",
idx);
263 print_proxy(
"NdrProxyGetBuffer(This, &__frame->_StubMsg);\n" );
267 print_proxy(
"NdrProxySendReceive(This, &__frame->_StubMsg);\n" );
269 print_proxy(
"__frame->_StubMsg.BufferStart = _RpcMessage.Buffer;\n" );
270 print_proxy(
"__frame->_StubMsg.BufferEnd = __frame->_StubMsg.BufferStart + _RpcMessage.BufferLength;\n\n" );
272 print_proxy(
"if ((_RpcMessage.DataRepresentation & 0xffff) != NDR_LOCAL_DATA_REPRESENTATION)\n");
274 print_proxy(
"NdrConvert( &__frame->_StubMsg, &__MIDL_ProcFormatString.Format[%u]);\n", proc_offset );
300 print_proxy(
"RpcExcept(__frame->_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)\n" );
305 print_proxy(
"/* coverity[uninit_use_in_call:SUPPRESS] */\n" );
306 print_proxy(
"_RetVal = NdrProxyErrorHandler(RpcExceptionCode());\n" );
321 unsigned int proc_offset)
343 if (has_full_pointer)
351 print_proxy(
"IRpcChannelBuffer *_pRpcChannelBuffer,\n");
357 print_proxy(
"struct __frame_%s_%s_Stub __f, * const __frame = &__f;\n\n",
360 print_proxy(
"__frame->_This = (%s*)((CStdStubBuffer*)This)->pvServerObject;\n\n", iface->
name);
364 print_proxy(
"NdrStubInitialize(_pRpcMessage, &__frame->_StubMsg, &Object_StubDesc, _pRpcChannelBuffer);\n");
373 if (has_full_pointer)
375 print_proxy(
"if ((_pRpcMessage->DataRepresentation & 0xffff) != NDR_LOCAL_DATA_REPRESENTATION)\n");
377 print_proxy(
"NdrConvert( &__frame->_StubMsg, &__MIDL_ProcFormatString.Format[%u]);\n", proc_offset );
386 print_proxy(
"*_pdwStubPhase = STUB_CALL_SERVER;\n");
388 print_proxy(
"%s", has_ret ?
"__frame->_RetVal = " :
"" );
408 print_proxy(
"NdrStubGetBuffer(This, _pRpcChannelBuffer, &__frame->_StubMsg);\n");
427 print_proxy(
"_pRpcMessage->BufferLength = __frame->_StubMsg.Buffer - (unsigned char *)_pRpcMessage->Buffer;\n");
441 print_proxy(
"void __RPC_API %s_%s_Thunk( PMIDL_STUB_MESSAGE pStubMsg )\n",
446 "*pParamStruct = (struct _PARAM_STRUCT *)pStubMsg->StackTop", has_ret );
448 has_ret ?
"pParamStruct->_RetVal = " :
"", iface->
name, callas->
name );
612 int needs_stub_thunks = 0;
618 fprintf(
proxy,
"/*****************************************************************************\n");
625 const char *cname = cas ? cas->
name :
NULL;
638 func->procstring_offset = *proc_offset;
643 needs_stub_thunks = 1;
652 print_proxy(
"static const unsigned short %s_FormatStringOffsetTable[] =\n", iface->
name );
669 print_proxy(
"static const MIDL_STUBLESS_PROXY_INFO %s_ProxyInfo =\n", iface->
name );
673 print_proxy(
"__MIDL_ProcFormatString.Format,\n" );
683 print_proxy(
"static %sCINTERFACE_PROXY_VTABLE(%d) _%sProxyVtbl =\n",
703 if (needs_stub_thunks)
705 print_proxy(
"static const STUB_THUNK %s_StubThunkTable[] =\n", iface->
name);
714 print_proxy(
"static const MIDL_SERVER_INFO %s_ServerInfo =\n", iface->
name );
719 print_proxy(
"__MIDL_ProcFormatString.Format,\n" );
721 if (needs_stub_thunks)
732 if (needs_inline_stubs)
734 print_proxy(
"static const PRPC_STUB_FUNCTION %s_table[] =\n", iface->
name);
749 print_proxy(
"static %sCInterfaceStubVtbl _%sStubVtbl =\n",
783 if (pred(stmt->
u.
type))
873static int cmp_iid(
const void *ptr1,
const void *ptr2 )
875 const type_t *
const *iface1 = ptr1;
876 const type_t *
const *iface2 = ptr2;
879 return memcmp( uuid1, uuid2,
sizeof(*uuid1) );
894 *ifaces =
xrealloc( *ifaces, (*
count + 1) *
sizeof(**ifaces) );
895 (*ifaces)[(*count)++] = iface;
899 *ifaces =
xrealloc( *ifaces, (*
count + 1) *
sizeof(**ifaces) );
900 (*ifaces)[(*count)++] = iface;
920 unsigned int proc_offset = 0;
922 int i,
count, have_baseiid = 0;
923 unsigned int table_version;
925 const type_t * delegate_to;
927 print_proxy(
"#ifndef __REDQ_RPCPROXY_H_VERSION__\n");
934 print_proxy(
"#error This code needs a newer version of rpcproxy.h\n");
935 print_proxy(
"#endif /* __RPCPROXY_H_VERSION__ */\n");
951 print_proxy(
"static int __proxy_filter( struct __proxy_frame *__frame )\n");
953 print_proxy(
" return (__frame->_StubMsg.dwStubPhase != PROXY_SENDRECEIVE);\n");
969 print_proxy(
"#error Invalid build platform for this proxy.\n");
976 fprintf(
proxy,
"static const CInterfaceProxyVtbl* const _%s_ProxyVtblList[] =\n", file_id);
979 fprintf(
proxy,
" (const CInterfaceProxyVtbl*)&_%sProxyVtbl,\n", interfaces[
i]->
name);
984 fprintf(
proxy,
"static const CInterfaceStubVtbl* const _%s_StubVtblList[] =\n", file_id);
992 fprintf(
proxy,
"static PCInterfaceName const _%s_InterfaceNamesList[] =\n", file_id);
1005 fprintf(
proxy,
"static const IID * _%s_BaseIIDList[] =\n", file_id);
1019 fprintf(
proxy,
"static int __stdcall _%s_IID_Lookup(const IID* pIID, int* pIndex)\n", file_id);
1026 fprintf(
proxy,
" int res = IID_GENERIC_CHECK_IID(_%s, pIID, pos);\n", file_id);
1027 fprintf(
proxy,
" if (!res) { *pIndex = pos; return 1; }\n");
1039 if (table_version != 6)
1041 fprintf(
proxy,
"static const IID *_AsyncInterfaceTable[] =\n");
1048 if (table_version == 6)
1055 fprintf(
proxy,
"const ExtendedProxyFileInfo %s_ProxyFileInfo =\n", file_id);
1057 fprintf(
proxy,
" (const PCInterfaceProxyVtblList*)_%s_ProxyVtblList,\n", file_id);
1058 fprintf(
proxy,
" (const PCInterfaceStubVtblList*)_%s_StubVtblList,\n", file_id);
1060 if (have_baseiid)
fprintf(
proxy,
" _%s_BaseIIDList,\n", file_id);
1065 fprintf(
proxy,
" %s,\n", table_version == 6 ?
"_AsyncInterfaceTable" :
"0");
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
void * xrealloc(void *oldmem, size_t size)
static void print(LPPRINTDLGW pd, LPWSTR wszFileName)
static int list_empty(struct list_entry *head)
int get_name(unsigned char **pos, uint32_t *remaining, const char **out_name)
void __cdecl qsort(_Inout_updates_bytes_(_NumOfElements *_SizeOfElements) void *_Base, _In_ size_t _NumOfElements, _In_ size_t _SizeOfElements, _In_ int(__cdecl *_PtFuncCompare)(const void *, const void *))
void write_expr(FILE *h, const expr_t *e, int brackets, int toplevel, const char *toplevel_prefix, const type_t *cont_type, const char *local_var_prefix)
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
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
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
static unsigned char get_struct_fc(ITypeInfo *typeinfo, TYPEATTR *attr)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
union _statement_t::@5358 u
void write_pointer_checks(FILE *file, int indent, const var_t *func)
void declare_stub_args(FILE *file, int indent, const var_t *func)
enum typegen_type typegen_detect_type(const type_t *type, const attr_list_t *attrs, unsigned int flags)
void write_procformatstring(FILE *file, const statement_list_t *stmts, type_pred_t pred)
void write_parameters_init(FILE *file, int indent, const var_t *func, const char *local_var_prefix)
static struct list expr_eval_routines
void write_user_quad_list(FILE *file)
void write_full_pointer_init(FILE *file, int indent, const var_t *func, int is_server)
void write_func_param_struct(FILE *file, const type_t *iface, const type_t *func, const char *var_decl, int add_retval)
void write_expr_eval_routine_list(FILE *file, const char *iface)
int decl_indirect(const type_t *t)
void write_typeformatstring(FILE *file, const statement_list_t *stmts, type_pred_t pred)
void write_exceptions(FILE *file)
void write_remoting_arguments(FILE *file, int indent, const var_t *func, const char *local_var_prefix, enum pass pass, enum remoting_phase phase)
int is_full_pointer_function(const var_t *func)
unsigned int get_size_procformatstring_func(const type_t *iface, const var_t *func)
void write_client_call_routine(FILE *file, const type_t *iface, const var_t *func, const char *prefix, unsigned int proc_offset)
int is_interpreted_func(const type_t *iface, const var_t *func)
int write_expr_eval_routines(FILE *file, const char *iface)
void write_parameter_conf_or_var_exprs(FILE *file, int indent, const char *local_var_prefix, enum remoting_phase phase, const var_t *var, int valid_variance)
void write_full_pointer_free(FILE *file, int indent, const var_t *func)
void write_formatstringsdecl(FILE *f, int indent, const statement_list_t *stmts, type_pred_t pred)
void assign_stub_out_args(FILE *file, int indent, const var_t *func, const char *local_var_prefix)
int(* type_pred_t)(const type_t *)
static int type_array_is_decl_as_ptr(const type_t *type)
static enum type_type type_get_type(const type_t *type)
static type_t * type_function_get_rettype(const type_t *type)
static int type_array_has_conformance(const type_t *type)
static var_t * type_function_get_retval(const type_t *type)
static type_t * type_iface_get_async_iface(const type_t *type)
static expr_t * type_array_get_conformance(const type_t *type)
static type_t * type_pointer_get_ref_type(const type_t *type)
static type_t * type_iface_get_inherit(const type_t *type)
static var_list_t * type_function_get_args(const type_t *type)
static statement_list_t * type_iface_get_stmts(const type_t *type)
unsigned int pointer_size
#define STATEMENTS_FOR_EACH_FUNC(stmt, stmts)