---
name: "DispInvoke"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/DispInvoke"
---

# DispInvoke(3w)

## NAME

**DispInvoke** (OLEAUT32.30)

## SYNOPSIS

HRESULT DispInvoke\
  (\
   VOID\*       *\_this*,\
   ITypeInfo\*  *ptinfo*,\
   DISPID      *dispidMember*,\
   USHORT      *wFlags*,\
   DISPPARAMS\* *pparams*,\
   VARIANT\*    *pvarResult*,\
   EXCEPINFO\*  *pexcepinfo*,\
   UINT\*       *puArgErr*\
  )

## PARAMS

*\_this* **\[In\]**  Object to call method on.

*ptinfo* **\[In\]**  Object type info.

*dispidMember* **\[In\]**  **DISPID** of the member (e.g. from **GetIDsOfNames(3w)**).

*wFlags* **\[In\]**  Kind of method call (**DISPATCH\_** flags from **"oaidl.h"**).

*pparams* **\[In\]**  Array of method arguments.

*pvarResult* **\[Out\]**  Destination for the result of the call.

*pexcepinfo* **\[Out\]**  Destination for exception information.

*puArgErr* **\[Out\]**  Destination for bad argument.

## DESCRIPTION

Call an object method using the information from its type library.

## RETURNS

**Success:** **S\_OK**.

**Failure:** Returns **DISP\_E\_EXCEPTION** and updates *pexcepinfo* if an exception occurs. **DISP\_E\_BADPARAMCOUNT** if the number of parameters is incorrect. **DISP\_E\_MEMBERNOTFOUND** if the method does not exist. *puArgErr* is updated if a parameter error (see notes) occurs. Otherwise, returns the result of calling **ITypeInfo\_Invoke(3w)**.

## NOTES

Parameter errors include the following: \
\
  DISP\_E\_BADVARTYPE\
\
  E\_INVALIDARG            An argument was invalid\
\
  DISP\_E\_TYPEMISMATCH,\
\
  DISP\_E\_OVERFLOW         An argument was valid but could not be coerced\
\
  DISP\_E\_PARAMNOTOPTIONAL A non optional parameter was not passed\
\
  DISP\_E\_PARAMNOTFOUND    A parameter was passed that was not expected by the method

This call defers to **ITypeInfo\_Invoke(3w)**.

## IMPLEMENTATION

Declared in **"oleauto.h"**.

Implemented in **"dlls/oleaut32/dispatch.c"**.

Debug channel **"ole"**.
