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: import org.eclipse.swt.internal.win32.*;
13:
14: public class IOleObject extends IUnknown {
15: public IOleObject(int /*long*/address) {
16: super (address);
17: }
18:
19: public int Advise(int /*long*/pAdvSink, int[] pdwConnection) {
20: return COM.VtblCall(19, address, pAdvSink, pdwConnection);
21: }
22:
23: public int Close(int dwSaveOption) {
24: return COM.VtblCall(6, address, dwSaveOption);
25: }
26:
27: public int DoVerb(int iVerb, MSG lpmsg, int /*long*/pActiveSite,
28: int lindex, int /*long*/hwndParent, RECT lprcPosRect) {
29: return COM.VtblCall(11, address, iVerb, lpmsg, pActiveSite,
30: lindex, hwndParent, lprcPosRect);
31: }
32:
33: public int GetExtent(int dwDrawAspect, SIZE pSizel) {
34: return COM.VtblCall(18, address, dwDrawAspect, pSizel);
35: }
36:
37: public int SetClientSite(int /*long*/pClientSite) {
38: return COM.VtblCall(3, address, pClientSite);
39: }
40:
41: public int SetExtent(int dwDrawAspect, SIZE pSizel) {
42: return COM.VtblCall(17, address, dwDrawAspect, pSizel);
43: }
44:
45: public int SetHostNames(String szContainerApp, String szContainerObj) {
46:
47: // create a null terminated array of char
48: char[] buffer1 = null;
49: if (szContainerApp != null) {
50: int count1 = szContainerApp.length();
51: buffer1 = new char[count1 + 1];
52: szContainerApp.getChars(0, count1, buffer1, 0);
53: }
54:
55: // create a null terminated array of char
56: char[] buffer2 = null;
57: if (szContainerObj != null) {
58: int count2 = szContainerObj.length();
59: buffer2 = new char[count2 + 1];
60: szContainerObj.getChars(0, count2, buffer2, 0);
61: }
62: return COM.VtblCall(5, address, buffer1, buffer2);
63: }
64:
65: public int Update() {
66: return COM.VtblCall(13, address);
67: }
68: }
|