IUnknown_DoContextMenuPopup

This function applies the DoContextMenuPopup method to a service object found from an arbitrary interface to a service-provider object.

Declaration

HRESULT
IUnknown_DoContextMenuPopup (
    IUnknown *punk,
    IUnknown *punkContextMenu,
    UINT fFlags,
    POINT pt);

Parameters

The punk argument is any interface pointer for the service-provider object of interest.

The punkContextMenu argument is any interface pointer to a context menu.

The fFlags argument is a set of bit flags that govern the appearance of the context menu.

The pt argument describes where the context menu should appear.

Return Value

The function returns zero for success, else an error code.

Behaviour

If the object described by punk can provide a service object with an IContextMenuSite interface, the function calls the service object’s DoContextMenuPopup method, passing the punkContextMenu, fFlags and pt arguments.

Availability

The IUnknown_DoContextMenuPopup function is exported from SHLWAPI.DLL as ordinal 546 in version 6.00 and higher.

Though this function dates from 2001, it was still not documented by Microsoft in the MSDN Library at least as late as the CD edition dated January 2004.