Repaired shared PE data sections.
[wine/multimedia.git] / dlls / oleaut32 / dispatch.c
blob86d08fc46f022c65db41988e234e4d6cd019d155
1 /**
2 * Dispatch API functions
4 * Copyright 2000 Francois Jacques, Macadamian Technologies Inc.
6 * ---
8 * TODO: Type coercion is implemented in variant.c but not called yet.
9 */
11 #include <stdlib.h>
12 #include <string.h>
13 #include <stdio.h>
14 #include <ctype.h>
15 #include "winerror.h"
16 #include "winreg.h" /* for HKEY_LOCAL_MACHINE */
17 #include "winnls.h" /* for PRIMARYLANGID */
18 #include "ole.h"
19 #include "heap.h"
20 #include "wine/obj_oleaut.h"
21 #include "debugtools.h"
23 DEFAULT_DEBUG_CHANNEL(ole);
24 DECLARE_DEBUG_CHANNEL(typelib);
27 /******************************************************************************
28 * DispInvoke (OLEAUT32.30)
31 * Calls method of an object through its IDispatch interface.
33 * NOTES
34 * - Defer method invocation to ITypeInfo::Invoke()
36 * RETURNS
38 * S_OK on success.
40 HRESULT WINAPI DispInvoke(
41 VOID *_this, /* [in] object instance */
42 ITypeInfo *ptinfo, /* [in] object's type info */
43 DISPID dispidMember, /* [in] member id */
44 USHORT wFlags, /* [in] kind of method call */
45 DISPPARAMS *pparams, /* [in] array of arguments */
46 VARIANT *pvarResult, /* [out] result of method call */
47 EXCEPINFO *pexcepinfo, /* [out] information about exception */
48 UINT *puArgErr) /* [out] index of bad argument(if any) */
50 HRESULT hr = E_FAIL;
52 /**
53 * TODO:
54 * For each param, call DispGetParam to perform type coercion
56 FIXME("Coercion of arguments not implemented\n");
58 hr = ICOM_CALL7(Invoke,
59 ptinfo,
60 _this,
61 dispidMember,
62 wFlags,
63 pparams, pvarResult, pexcepinfo, puArgErr);
65 return (hr);
69 /******************************************************************************
70 * DispGetIDsOfNames (OLEAUT32.29)
72 * Convert a set of names to dispids, based on information
73 * contained in object's type library.
75 * NOTES
76 * - Defers to ITypeInfo::GetIDsOfNames()
78 * RETURNS
80 * S_OK on success.
82 HRESULT WINAPI DispGetIDsOfNames(
83 ITypeInfo *ptinfo, /* [in] */
84 OLECHAR **rgszNames, /* [in] */
85 UINT cNames, /* [in] */
86 DISPID *rgdispid) /* [out] */
88 HRESULT hr = E_FAIL;
90 hr = ICOM_CALL3(GetIDsOfNames,
91 ptinfo,
92 rgszNames,
93 cNames,
94 rgdispid);
95 return (hr);
98 /******************************************************************************
99 * DispGetParam (OLEAUT32.28)
101 * Retrive a parameter from a DISPPARAMS structures and coerce it to
102 * specified variant type
104 * NOTES
105 * Coercion is done using system (0) locale.
107 * RETURNS
109 * S_OK on success.
111 HRESULT WINAPI DispGetParam(
112 DISPPARAMS *pdispparams, /* [in] */
113 UINT position, /* [in] */
114 VARTYPE vtTarg, /* [in] */
115 VARIANT *pvarResult, /* [out] */
116 UINT *puArgErr) /* [out] */
118 HRESULT hr = E_FAIL;
121 * TODO : Call VariantChangeTypeEx with LCID 0 (system)
124 FIXME("Coercion of arguments not implemented\n");
125 return (hr);