共用方式為


ExecWB method

Executes a command and returns the status of the command execution using the IOleCommandTarget interface.

Syntax

*object.*ExecWB(cmdID, cmdexecopt, pvaIn, pvaOut)

Parameters

  • cmdID [in]

    C++ An OLECMDID value that specifies the command to execute. For a discussion of command identifiers, see MSHTML Command Identifiers.
    VB A Long that represents the identifier of the command to execute. For more information on command identifiers, see OLECMDID Help.
  • cmdexecopt [in]
    Type: OLECMDEXECOPT

    An OLECMDEXECOPT value that specifies the command options.

  • pvaIn [in, optional]

    C++ Pointer to a Variant structure that contains command input arguments. The type of this Variant structure depends on the type of the command identifier. This argument can be Null.
    VB A Variant used for specifying command input arguments.
  • pvaOut [in, out, optional]

    C++ A pointer to a Variant structure that receives and specifies command output. The type of this Variant structure depends on the type of the command identifier. This argument can be Null.
    VB A Variant used for specifying command output arguments.

Remarks

Certain commands (OLECMDID_CUT, OLECMDID_COPY, and OLECMDID_PASTE) are only available if URLACTION_SCRIPT_SAFE_ACTIVEX and URLACTION_SCRIPT_PASTE are set to URLPOLICY_ALLOW.

The WebBrowser object delegates this method to the top-level frame. If no frame exists, it returns E_FAIL.

See also

InternetExplorer

WebBrowser

Reference

QueryStatusWB

Other Resources

OLECMDEXECOPT