KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > swt > internal > ole > win32 > IOleCommandTarget


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.swt.internal.ole.win32;
12
13 public class IOleCommandTarget extends IUnknown {
14 public IOleCommandTarget(int /*long*/ address) {
15     super(address);
16 }
17 public int Exec(
18     GUID pguidCmdGroup, // Pointer to command group
19
int nCmdID, // Identifier of command to execute
20
int nCmdExecOpt, // Options for executing the command
21
int /*long*/ pvaIn, // Pointer to input arguments
22
int /*long*/ pvaOut // Pointer to command output
23
){
24     return COM.VtblCall(4, address, pguidCmdGroup, nCmdID, nCmdExecOpt, pvaIn, pvaOut);
25 }
26 public int QueryStatus(
27     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) return COM.E_INVALIDARG;
34     return COM.VtblCall(3, address, pguidCmdGroup, cCmds, prgCmds, pCmdText);
35 }
36 }
37
Popular Tags