# %CoQueryInterface interface

Query IUnknown for IDispatch interface.

## Syntax

```
retcode = %CoQueryInterface(Param1, Param2, Param3)
```

## Parameter(s)

| Param1 [in] | Dispatch object containing the IUknown interface. |
| --- | --- |
| Param2 [in] | IID_IDispatch. |
| Param3 [out] | Dispatch object containing the IDispatch interface. |

## Returns

A Boolean (Success or Fail)

## Error Handling

Call CoGetException to get an error description.

## See also

- [Using the COM interface to FlashBASIC](https://d3codex.com/pickbasic-flashbasic/using-the-com-interface-to-flashbasic/)
- [FlashBASIC automation application interfaces](https://d3codex.com/pickbasic-flashbasic/flashbasic-automation-application-interfaces/)

---
Source: https://d3codex.com/pickbasic-flashbasic/coqueryinterface-interface/ - part of the D3Codex reference.
