Queries the object for the status of one or more commands generated by user interface events.
HRESULT QueryStatus( const GUID *pguidCmdGroup, ULONG cCmds, OLECMD  prgCmds, OLECMDTEXT *pCmdText );
The unique identifier of the command group; can be NULL to specify the standard group. All the commands that are passed in the prgCmds array must belong to the group specified by pguidCmdGroup.
The number of commands in the prgCmds array.
A caller-allocated array of OLECMD structures that indicate the commands for which the caller needs status information. This method fills the cmdf member of each structure with values taken from the OLECMDF enumeration.
A pointer to an OLECMDTEXT structure in which to return name and/or status information of a single command. This parameter can be NULL to indicate that the caller does not need this information.
This method returns S_OK on success. Other possible return values include the following.
||The operation failed.|
||An unexpected error has occurred.|
||The prgCmds argument is NULL.|
||The pguidCmdGroup parameter is not NULL but does not specify a recognized command group.|
Callers use QueryStatus to determine which commands are supported by a target object. The caller can then disable unavailable commands that would otherwise be routed to the object. The caller can also use this method to get the name or status of a single command.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|