01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.swt.internal.ole.win32;
11:
12: public class IOleCommandTarget extends IUnknown {
13: public IOleCommandTarget(int /*long*/address) {
14: super (address);
15: }
16:
17: public int Exec(GUID pguidCmdGroup, // Pointer to command group
18: int nCmdID, // Identifier of command to execute
19: int nCmdExecOpt, // Options for executing the command
20: int /*long*/pvaIn, // Pointer to input arguments
21: int /*long*/pvaOut // Pointer to command output
22: ) {
23: return COM.VtblCall(4, address, pguidCmdGroup, nCmdID,
24: nCmdExecOpt, pvaIn, pvaOut);
25: }
26:
27: public int QueryStatus(GUID pguidCmdGroup, // Pointer to command group
28: int cCmds, // Number of commands in prgCmds array
29: OLECMD prgCmds, // Array of commands
30: OLECMDTEXT pCmdText // Pointer to name or status of command
31: ) {
32: // we only support querying for one command at a time
33: if (cCmds > 1)
34: return COM.E_INVALIDARG;
35: return COM.VtblCall(3, address, pguidCmdGroup, cCmds, prgCmds,
36: pCmdText);
37: }
38: }
|