Platform SDK: Exchange Server |
Carries out a menu or toolbar command chosen by the user.
See IExchExtCommands : IUnknown.
HRESULT DoCommand( LPEXCHEXTCALLBACK lpeecb, UINT cmdid );
Microsoft Exchange calls the IExchExtCommands::DoCommand method when it receives a WM_COMMAND or WM_SYSCOMMAND message corresponding to a menu command, system menu command, or toolbar button so that the extension object can carry out any commands it implements or supersede the Microsoft Exchange implementation of a command. The command identifier passed to WM_COMMAND is mapped to the published set of Microsoft Exchange commands. It is this published command identifier that is passed to DoCommand in the cmdid parameter. The command identifier in WM_COMMAND maps to, but is different than, the command identifier specified in the cmdid parameter. Extension objects should therefore not rely on this mapping.
If an error occurs, DoCommand should display a message and return an error value. Microsoft Exchange will not continue trying to perform the command nor will it display a message.
The system command identifiers that extensions can override include:
SC_CLOSE
SC_MAXIMIZE
SC_MINIMIZE
SC_MOVE
SC_RESTORE
SC_SIZE
SC_TASKLIST
These commands are standard wparam values for the WM_SYSCOMMAND message.