⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dispatchptrgitthread.java

📁 java 调用windows的api
💻 JAVA
字号:
/*
 * DispatchPtrGITThread.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: DispatchPtrGITThread.java,v 1.1 2004/07/18 15:12:35 arosii_moa Exp $ */

package org.jawin.perf;

import org.jawin.AbstractGITThread;
import org.jawin.COMException;
import org.jawin.COMTestBase;
import org.jawin.DispatchPtr;
import org.jawin.win32.COINIT;
import org.jawin.win32.Ole32;

/**
 *
 * @version     $Revision: 1.1 $
 * @author      Morten Andersen, arosii_moa (at) users.sourceforge.net
 */
class DispatchPtrGITThread extends AbstractGITThread {

	private DispatchPtr directDisp;
	private DispatchPtr gitDisp;

	protected void createReference() throws COMException {
		Ole32.CoInitialize(COINIT.MULTITHREADED);
		directDisp = new DispatchPtr(COMTestBase.DUAL_TEST_CLSID);
		gitDisp = (DispatchPtr)directDisp.createGITRef();
	}

	protected void closeReference() throws COMException {
		if (gitDisp != null) {
			gitDisp.close();
		}
		if (directDisp != null) {
			directDisp.close();
		}
		Ole32.CoUninitialize();
	}

	DispatchPtr getGitDisp() {
		return gitDisp;
	}
}

⌨️ 快捷键说明

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