source: trunk/src/oleaut32/dispatch.c@ 6648

Last change on this file since 6648 was 6648, checked in by bird, 24 years ago

Added $Id:$ keyword.

File size: 3.3 KB
Line 
1/* $Id: dispatch.c,v 1.2 2001-09-05 13:19:00 bird Exp $ */
2/**
3 * Dispatch API functions
4 *
5 * Copyright 2000 Francois Jacques, Macadamian Technologies Inc.
6 *
7 * ---
8 *
9 * TODO: Type coercion is implemented in variant.c but not called yet.
10 */
11#ifdef __WIN32OS2__
12#define HAVE_FLOAT_H
13#define WINE_LARGE_INTEGER
14#include "oleaut32.h"
15#endif
16
17#include <stdlib.h>
18#include <string.h>
19#include <stdio.h>
20#include <ctype.h>
21#include "winerror.h"
22#include "winreg.h" /* for HKEY_LOCAL_MACHINE */
23#include "winnls.h" /* for PRIMARYLANGID */
24#include "ole.h"
25#include "heap.h"
26#include "wine/obj_oleaut.h"
27#include "debugtools.h"
28
29DEFAULT_DEBUG_CHANNEL(ole);
30DECLARE_DEBUG_CHANNEL(typelib);
31
32
33/******************************************************************************
34 * DispInvoke (OLEAUT32.30)
35 *
36 *
37 * Calls method of an object through its IDispatch interface.
38 *
39 * NOTES
40 * - Defer method invocation to ITypeInfo::Invoke()
41 *
42 * RETURNS
43 *
44 * S_OK on success.
45 */
46HRESULT WINAPI
47DispInvoke(VOID* _this, /* object instance */
48 ITypeInfo* ptinfo, /* object's type info */
49 DISPID dispidMember, /* member id */
50 USHORT wFlags, /* kind of method call */
51 DISPPARAMS* pparams, /* array of arguments */
52 VARIANT* pvarResult, /* result of method call */
53 EXCEPINFO* pexcepinfo, /* information about exception */
54 UINT* puArgErr /* index of bad argument(if any) */
55 )
56{
57 HRESULT hr = E_FAIL;
58
59 /**
60 * TODO:
61 * For each param, call DispGetParam to perform type coercion
62 */
63 FIXME("Coercion of arguments not implemented\n");
64
65 hr = ICOM_CALL7(Invoke,
66 ptinfo,
67 _this,
68 dispidMember,
69 wFlags,
70 pparams, pvarResult, pexcepinfo, puArgErr);
71
72 return (hr);
73}
74
75
76/******************************************************************************
77 * DispGetIDsOfNames (OLEAUT32.29)
78 *
79 * Convert a set of names to dispids, based on information
80 * contained in object's type library.
81 *
82 * NOTES
83 * - Defers to ITypeInfo::GetIDsOfNames()
84 *
85 * RETURNS
86 *
87 * S_OK on success.
88 */
89HRESULT WINAPI
90DispGetIDsOfNames(ITypeInfo* ptinfo,
91 OLECHAR** rgszNames,
92 UINT cNames,
93 DISPID* rgdispid)
94{
95 HRESULT hr = E_FAIL;
96
97 hr = ICOM_CALL3(GetIDsOfNames,
98 ptinfo,
99 rgszNames,
100 cNames,
101 rgdispid);
102 return (hr);
103}
104
105/******************************************************************************
106 * DispGetParam (OLEAUT32.30)
107 *
108 * Retrive a parameter from a DISPPARAMS structures and coerce it to
109 * specified variant type
110 *
111 * NOTES
112 * Coercion is done using system (0) locale.
113 *
114 * RETURNS
115 *
116 * S_OK on success.
117 */
118HRESULT WINAPI DispGetParam(DISPPARAMS* pdispparams, UINT position,
119 VARTYPE vtTarg, VARIANT* pvarResult, UINT* puArgErr)
120{
121 HRESULT hr = E_FAIL;
122
123 /**
124 * TODO : Call VariantChangeTypeEx with LCID 0 (system)
125 */
126
127 FIXME("Coercion of arguments not implemented\n");
128 return (hr);
129}
Note: See TracBrowser for help on using the repository browser.