coinit.java

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

JAVA
66
字号
/*
 * COINIT.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: COINIT.java,v 1.1 2004/07/18 15:07:02 arosii_moa Exp $ */

package org.jawin.win32;

/**
 * The native COINIT constants.
 *
 * @version     $Revision: 1.1 $
 * @author      Morten Andersen, arosii_moa (at) users.sourceforge.net
 */
public class COINIT {

	private final int value;
	private final String description;
	
	/**
	 * only the static constant instances defined in this
	 * class exists, therefore the constructor is private.
	 */
	private COINIT(String description, int value) {
		this.description = description;
		this.value = value;
	}

	/**
	 * multi-threaded object concurrency
	 */
	public static final COINIT MULTITHREADED = new COINIT("MULTITHREADED", 0);

	/**
	 * apartment/single-threaded object concurrency 
	 */
	public static final COINIT APARTMENTTHREADED = new COINIT("APARTMENTTHREADED", 2);

	/**
	 * Disables DDE for Ole1 support 
	 */
	public static final COINIT DISABLE_OLE1DDE = new COINIT("DISABLE_OLE1DDE", 4);

	/**
	 * Trades memory for speed 
	 */
	public static final COINIT SPEED_OVER_MEMORY = new COINIT("SPEED_OVER_MEMORY", 8);

	public int getValue() {
		return value;
	}
	
	public String getDescription() {
		return description;
	}
	
	public String toString() {
		return "[COINIT_" + description + " (" + value + ")]";
	}
}

⌨️ 快捷键说明

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