Changeset 6944 for trunk/src/oleaut32/dispatch.c
- Timestamp:
- Oct 3, 2001, 9:22:00 PM (24 years ago)
- File:
-
- 1 edited
-
trunk/src/oleaut32/dispatch.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/oleaut32/dispatch.c
r6711 r6944 8 8 * TODO: Type coercion is implemented in variant.c but not called yet. 9 9 */ 10 #ifdef __WIN32OS2__ 11 #define HAVE_FLOAT_H 12 #define WINE_LARGE_INTEGER 13 #include "oleaut32.h" 14 #endif 10 11 #include "config.h" 15 12 16 13 #include <stdlib.h> … … 18 15 #include <stdio.h> 19 16 #include <ctype.h> 17 18 #include "windef.h" 19 #include "ole.h" 20 #include "oleauto.h" 20 21 #include "winerror.h" 21 22 #include "winreg.h" /* for HKEY_LOCAL_MACHINE */ 22 23 #include "winnls.h" /* for PRIMARYLANGID */ 23 #include "ole.h" 24 #include "heap.h" 24 25 25 #include "wine/obj_oleaut.h" 26 26 27 #include "debugtools.h" 27 28 … … 31 32 32 33 /****************************************************************************** 33 * DispInvoke(OLEAUT32.30)34 * DispInvoke (OLEAUT32.30) 34 35 * 35 36 * … … 43 44 * S_OK on success. 44 45 */ 45 HRESULT WINAPI 46 DispInvoke(VOID* _this, /* object instance */ 47 ITypeInfo* ptinfo, /* object's type info */ 48 DISPID dispidMember, /* member id */ 49 USHORT wFlags, /* kind of method call */ 50 DISPPARAMS* pparams, /* array of arguments */ 51 VARIANT* pvarResult, /* result of method call */ 52 EXCEPINFO* pexcepinfo, /* information about exception */ 53 UINT* puArgErr /* index of bad argument(if any) */ 54 ) 46 HRESULT WINAPI DispInvoke( 47 VOID *_this, /* [in] object instance */ 48 ITypeInfo *ptinfo, /* [in] object's type info */ 49 DISPID dispidMember, /* [in] member id */ 50 USHORT wFlags, /* [in] kind of method call */ 51 DISPPARAMS *pparams, /* [in] array of arguments */ 52 VARIANT *pvarResult, /* [out] result of method call */ 53 EXCEPINFO *pexcepinfo, /* [out] information about exception */ 54 UINT *puArgErr) /* [out] index of bad argument(if any) */ 55 55 { 56 56 HRESULT hr = E_FAIL; … … 74 74 75 75 /****************************************************************************** 76 * DispGetIDsOfNames (OLEAUT32.29)76 * DispGetIDsOfNames (OLEAUT32.29) 77 77 * 78 78 * Convert a set of names to dispids, based on information … … 86 86 * S_OK on success. 87 87 */ 88 HRESULT WINAPI 89 DispGetIDsOfNames(ITypeInfo* ptinfo, 90 OLECHAR** rgszNames, 91 UINT cNames, 92 DISPID* rgdispid) 88 HRESULT WINAPI DispGetIDsOfNames( 89 ITypeInfo *ptinfo, /* [in] */ 90 OLECHAR **rgszNames, /* [in] */ 91 UINT cNames, /* [in] */ 92 DISPID *rgdispid) /* [out] */ 93 93 { 94 94 HRESULT hr = E_FAIL; … … 103 103 104 104 /****************************************************************************** 105 * DispGetParam (OLEAUT32.30)105 * DispGetParam (OLEAUT32.28) 106 106 * 107 107 * Retrive a parameter from a DISPPARAMS structures and coerce it to … … 115 115 * S_OK on success. 116 116 */ 117 HRESULT WINAPI DispGetParam(DISPPARAMS* pdispparams, UINT position, 118 VARTYPE vtTarg, VARIANT* pvarResult, UINT* puArgErr) 117 HRESULT WINAPI DispGetParam( 118 DISPPARAMS *pdispparams, /* [in] */ 119 UINT position, /* [in] */ 120 VARTYPE vtTarg, /* [in] */ 121 VARIANT *pvarResult, /* [out] */ 122 UINT *puArgErr) /* [out] */ 119 123 { 120 HRESULT hr = E_FAIL; 124 /* position is counted backwards */ 125 UINT pos; 126 HRESULT hr; 121 127 122 /** 123 * TODO : Call VariantChangeTypeEx with LCID 0 (system) 124 */ 128 TRACE("position=%d, cArgs=%d, cNamedArgs=%d\n", 129 position, pdispparams->cArgs, pdispparams->cNamedArgs); 130 if (position < pdispparams->cArgs) { 131 /* positional arg? */ 132 pos = pdispparams->cArgs - position - 1; 133 } else { 134 /* FIXME: is this how to handle named args? */ 135 for (pos=0; pos<pdispparams->cNamedArgs; pos++) 136 if (pdispparams->rgdispidNamedArgs[pos] == position) break; 125 137 126 FIXME("Coercion of arguments not implemented\n"); 127 return (hr); 138 if (pos==pdispparams->cNamedArgs) 139 return DISP_E_PARAMNOTFOUND; 140 } 141 hr = VariantChangeType(pvarResult, 142 &pdispparams->rgvarg[pos], 143 0, vtTarg); 144 if (hr == DISP_E_TYPEMISMATCH) *puArgErr = pos; 145 return hr; 128 146 }
Note:
See TracChangeset
for help on using the changeset viewer.
