wine/dlls/oleaut32/dispatch.c

133 lines
3.1 KiB
C
Raw Normal View History

2000-12-19 23:29:58 +00:00
/**
* Dispatch API functions
*
* Copyright 2000 Francois Jacques, Macadamian Technologies Inc.
*
* ---
*
* TODO: Type coercion is implemented in variant.c but not called yet.
*/
#include "config.h"
2000-12-19 23:29:58 +00:00
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include "windef.h"
#include "ole.h"
#include "oleauto.h"
2000-12-19 23:29:58 +00:00
#include "winerror.h"
#include "winreg.h" /* for HKEY_LOCAL_MACHINE */
#include "winnls.h" /* for PRIMARYLANGID */
2000-12-19 23:29:58 +00:00
#include "wine/obj_oleaut.h"
2000-12-19 23:29:58 +00:00
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(ole);
DECLARE_DEBUG_CHANNEL(typelib);
/******************************************************************************
2001-02-12 03:49:57 +00:00
* DispInvoke (OLEAUT32.30)
2000-12-19 23:29:58 +00:00
*
*
* Calls method of an object through its IDispatch interface.
*
* NOTES
* - Defer method invocation to ITypeInfo::Invoke()
*
* RETURNS
*
* S_OK on success.
*/
2001-02-12 03:49:57 +00:00
HRESULT WINAPI DispInvoke(
VOID *_this, /* [in] object instance */
ITypeInfo *ptinfo, /* [in] object's type info */
DISPID dispidMember, /* [in] member id */
USHORT wFlags, /* [in] kind of method call */
DISPPARAMS *pparams, /* [in] array of arguments */
VARIANT *pvarResult, /* [out] result of method call */
EXCEPINFO *pexcepinfo, /* [out] information about exception */
UINT *puArgErr) /* [out] index of bad argument(if any) */
2000-12-19 23:29:58 +00:00
{
HRESULT hr = E_FAIL;
/**
* TODO:
* For each param, call DispGetParam to perform type coercion
*/
FIXME("Coercion of arguments not implemented\n");
hr = ICOM_CALL7(Invoke,
ptinfo,
_this,
dispidMember,
wFlags,
pparams, pvarResult, pexcepinfo, puArgErr);
return (hr);
}
/******************************************************************************
2001-02-12 03:49:57 +00:00
* DispGetIDsOfNames (OLEAUT32.29)
2000-12-19 23:29:58 +00:00
*
* Convert a set of names to dispids, based on information
* contained in object's type library.
*
* NOTES
* - Defers to ITypeInfo::GetIDsOfNames()
*
* RETURNS
*
* S_OK on success.
*/
2001-02-12 03:49:57 +00:00
HRESULT WINAPI DispGetIDsOfNames(
ITypeInfo *ptinfo, /* [in] */
OLECHAR **rgszNames, /* [in] */
UINT cNames, /* [in] */
DISPID *rgdispid) /* [out] */
2000-12-19 23:29:58 +00:00
{
HRESULT hr = E_FAIL;
hr = ICOM_CALL3(GetIDsOfNames,
ptinfo,
rgszNames,
cNames,
rgdispid);
return (hr);
}
/******************************************************************************
2001-02-12 03:49:57 +00:00
* DispGetParam (OLEAUT32.28)
2000-12-19 23:29:58 +00:00
*
* Retrive a parameter from a DISPPARAMS structures and coerce it to
* specified variant type
*
* NOTES
* Coercion is done using system (0) locale.
*
* RETURNS
*
* S_OK on success.
*/
2001-02-12 03:49:57 +00:00
HRESULT WINAPI DispGetParam(
DISPPARAMS *pdispparams, /* [in] */
UINT position, /* [in] */
VARTYPE vtTarg, /* [in] */
VARIANT *pvarResult, /* [out] */
UINT *puArgErr) /* [out] */
2000-12-19 23:29:58 +00:00
{
HRESULT hr = E_FAIL;
/**
* TODO : Call VariantChangeTypeEx with LCID 0 (system)
*/
FIXME("Coercion of arguments not implemented\n");
return (hr);
}