idualtestgitthread.java

来自「java 调用windows的api」· Java 代码 · 共 49 行

JAVA
49
字号
/*
 * IDualTestGITThread.java -
 *
 * This file is part of the Jawin Project: http://jawinproject.sourceforge.net/
 * 
 * Please consult the LICENSE file in the project root directory,
 * or at the project site before using this software.
 */

/* $Id: IDualTestGITThread.java,v 1.1 2004/07/18 15:12:35 arosii_moa Exp $ */

package org.jawin;

import org.jawin.win32.COINIT;
import org.jawin.win32.Ole32;

/**
 * Implementation of the {@link org.jawin.AbstractGITThread} for the
 * IDualTestItf-class.
 *
 * @version     $Revision: 1.1 $
 * @author      Morten Andersen, arosii_moa (at) users.sourceforge.net
 */
class IDualTestGITThread extends AbstractGITThread {

	private IDualTestItf directDisp;
	private IDualTestItf gitDisp;
	
	protected void createReference() throws COMException {
		Ole32.CoInitialize(COINIT.MULTITHREADED);
		directDisp = new IDualTestItf(COMTestBase.DUAL_TEST_CLSID);
		gitDisp = (IDualTestItf)directDisp.createGITRef();
	}
	
	protected void closeReference() throws COMException {
		if (gitDisp != null) {
			gitDisp.close();
		}
		if (directDisp != null) {
			directDisp.close();
		}
		Ole32.CoUninitialize();
	}
	
	IDualTestItf getGitDisp() {
		return gitDisp;
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?