KickJava   Java API By Example, From Geeks To Geeks.

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


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 IUnknown
14 {
15     int /*long*/ address;
16 public IUnknown(int /*long*/ address) {
17     this.address = address;
18 }
19 public int AddRef() {
20     return COM.VtblCall(1, address);
21 }
22 public int /*long*/ getAddress() {
23     return address;
24 }
25 public int QueryInterface(GUID riid, int /*long*/[] ppvObject) {
26     return COM.VtblCall(0, address, riid, ppvObject);
27 }
28 public int Release() {
29     return COM.VtblCall(2, address);
30 }
31 }
32
Popular Tags