亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? oleautomation.java

?? 源碼為Eclipse開源開發平臺桌面開發工具SWT的源代碼,
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/******************************************************************************* * Copyright (c) 2000, 2003 IBM Corporation and others. * All rights reserved. This program and the accompanying materials  * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html *  * Contributors: *     IBM Corporation - initial API and implementation *******************************************************************************/package org.eclipse.swt.ole.win32;import org.eclipse.swt.internal.ole.win32.*;import org.eclipse.swt.internal.win32.*;/** * OleAutomation provides a generic mechanism for accessing functionality that is  * specific to a particular ActiveX Control or OLE Document. * * <p>The OLE Document or ActiveX Control must support the IDispatch interface in order to provide * OleAutomation support. The additional functionality provided by the OLE Object is specified in  * its IDL file.  The additional methods can either be to get property values (<code>getProperty</code>),  * to set property values (<code>setProperty</code>) or to invoke a method (<code>invoke</code> or * <code>invokeNoReply</code>).  Arguments are passed around in the form of <code>Variant</code>  * objects. * * <p>Here is a sample IDL fragment: * * <pre> *	interface IMyControl : IDispatch *	{ *		[propget, id(0)] HRESULT maxFileCount([retval, out] int *c); *		[propput, id(0)] HRESULT maxFileCount([in] int c); *		[id(1)]	HRESULT AddFile([in] BSTR fileName); *	}; * </pre> * * <p>An example of how to interact with this extended functionality is shown below: * * <code><pre> *	OleAutomation automation = new OleAutomation(myControlSite); * *	// Look up the ID of the maxFileCount parameter *	int[] rgdispid = automation.getIDsOfNames(new String[]{"maxFileCount"}); *	int maxFileCountID = rgdispid[0]; * *	// Set the property maxFileCount to 100: *	if (automation.setProperty(maxFileCountID, new Variant(100))) { *		System.out.println("Max File Count was successfully set."); *	} * *	// Get the new value of the maxFileCount parameter: *	Variant pVarResult = automation.getProperty(maxFileCountID); *	if (pVarResult != null) { *		System.out.println("Max File Count is "+pVarResult.getInt()); *	} * *	// Invoke the AddFile method *	// Look up the IDs of the AddFile method and its parameter *	rgdispid = automation.getIDsOfNames(new String[]{"AddFile", "fileName"});  *	int dispIdMember = rgdispid[0]; *	int[] rgdispidNamedArgs = new int[] {rgdispid[1]}; * *	// Convert arguments to Variant objects *	Variant[] rgvarg = new Variant[1]; *	String fileName = "C:\\testfile"; * 	rgvarg[0] = new Variant(fileName); * *	// Call the method *	Variant pVarResult = automation.invoke(dispIdMember, rgvarg, rgdispidNamedArgs); * *	// Check the return value * 	if (pVarResult == null || pVarResult.getInt() != OLE.S_OK){ * 		System.out.println("Failed to add file "+fileName); *	} * *	automation.dispose(); * * </pre></code> */public final class OleAutomation {	private IDispatch objIDispatch;	private String exceptionDescription;	private ITypeInfo objITypeInfo;	OleAutomation(IDispatch idispatch) {	if (idispatch == null) OLE.error(OLE.ERROR_INVALID_INTERFACE_ADDRESS);	objIDispatch = idispatch;	objIDispatch.AddRef();		int[] ppv = new int[1];	int result = objIDispatch.GetTypeInfo(0, COM.LOCALE_USER_DEFAULT, ppv);	if (result == OLE.S_OK) {		objITypeInfo = new ITypeInfo(ppv[0]);		objITypeInfo.AddRef();	}}/** * Creates an OleAutomation object for the specified client. * * @param clientSite the site for the OLE Document or ActiveX Control whose additional functionality  *        you need to access * * @exception SWTError <ul> *		<li>ERROR_INVALID_INTERFACE_ADDRESS when called with an invalid client site *	</ul> */ public OleAutomation(OleClientSite clientSite) {	if (clientSite == null) OLE.error(OLE.ERROR_INVALID_INTERFACE_ADDRESS);	objIDispatch = clientSite.getAutomationObject();	int[] ppv = new int[1];	int result = objIDispatch.GetTypeInfo(0, COM.LOCALE_USER_DEFAULT, ppv);	if (result == OLE.S_OK) {		objITypeInfo = new ITypeInfo(ppv[0]);		objITypeInfo.AddRef();	} }/** * Disposes the automation object. * <p> * This method releases the IDispatch interface on the OLE Document or ActiveX Control. * Do not use the OleAutomation object after it has been disposed. */public void dispose() {	if (objIDispatch != null){		objIDispatch.Release();	}	objIDispatch = null;		if (objITypeInfo != null){		objITypeInfo.Release();	}	objITypeInfo = null;}int getAddress() {		return objIDispatch.getAddress();}public String getHelpFile(int dispId) {	if (objITypeInfo == null) return null;	String[] file = new String[1];	int rc = objITypeInfo.GetDocumentation(dispId, null, null, null, file );	if (rc == OLE.S_OK) return file[0];	return null;	}public String getDocumentation(int dispId) {	if (objITypeInfo == null) return null;	String[] doc = new String[1];	int rc = objITypeInfo.GetDocumentation(dispId, null, doc, null, null );	if (rc == OLE.S_OK) return doc[0];	return null;}public OlePropertyDescription getPropertyDescription(int index) {	if (objITypeInfo == null) return null;	int[] ppVarDesc = new int[1];	int rc = objITypeInfo.GetVarDesc(index, ppVarDesc);	if (rc != OLE.S_OK) return null;	VARDESC1 vardesc = new VARDESC1();	COM.MoveMemory(vardesc, ppVarDesc[0], VARDESC1.sizeof);		OlePropertyDescription data = new OlePropertyDescription();	data.id = vardesc.memid;	data.name = getName(vardesc.memid);	data.type = vardesc.elemdescVar_tdesc_vt;	if (data.type == OLE.VT_PTR) {		short[] vt = new short[1];		COM.MoveMemory(vt, vardesc.elemdescVar_tdesc_union + 4, 2);		data.type = vt[0];	}	data.flags = vardesc.wVarFlags;	data.kind = vardesc.varkind;	data.description = getDocumentation(vardesc.memid);	data.helpFile = getHelpFile(vardesc.memid);		objITypeInfo.ReleaseVarDesc(ppVarDesc[0]);	return data;}public OleFunctionDescription getFunctionDescription(int index) {	if (objITypeInfo == null) return null;	int[] ppFuncDesc = new int[1];	int rc = objITypeInfo.GetFuncDesc(index, ppFuncDesc);	if (rc != OLE.S_OK) return null;	FUNCDESC1 funcdesc = new FUNCDESC1();	COM.MoveMemory(funcdesc, ppFuncDesc[0], FUNCDESC1.sizeof);		OleFunctionDescription data = new OleFunctionDescription();		data.id = funcdesc.memid;	data.optionalArgCount = funcdesc.cParamsOpt;	data.invokeKind = funcdesc.invkind;	data.funcKind = funcdesc.funckind;	data.flags = funcdesc.wFuncFlags;	data.callingConvention = funcdesc.callconv;	data.documentation = getDocumentation(funcdesc.memid);	data.helpFile = getHelpFile(funcdesc.memid);		String[] names = getNames(funcdesc.memid, funcdesc.cParams + 1);	if (names.length > 0) {		data.name = names[0];	}	data.args = new OleParameterDescription[funcdesc.cParams];	for (int i = 0; i < data.args.length; i++) {		data.args[i] = new OleParameterDescription();		if (names.length > i + 1) {			data.args[i].name = names[i + 1];		}		short[] vt = new short[1];			COM.MoveMemory(vt, funcdesc.lprgelemdescParam + i * 16 + 4, 2);						if (vt[0] == OLE.VT_PTR) {			int[] pTypedesc = new int[1];			COM.MoveMemory(pTypedesc, funcdesc.lprgelemdescParam + i * 16, 4);			short[] vt2 = new short[1];			COM.MoveMemory(vt2, pTypedesc[0] + 4, 2);			vt[0] = (short)(vt2[0] | COM.VT_BYREF);		}		data.args[i].type = vt[0];		short[] wParamFlags = new short[1];		COM.MoveMemory(wParamFlags, funcdesc.lprgelemdescParam + i * 16 + 12, 2);		data.args[i].flags = wParamFlags[0];		}		data.returnType = funcdesc.elemdescFunc_tdesc_vt;	if (data.returnType == OLE.VT_PTR) {		short[] vt = new short[1];		COM.MoveMemory(vt, funcdesc.elemdescFunc_tdesc_union + 4, 2);		data.returnType = vt[0];	}	objITypeInfo.ReleaseFuncDesc(ppFuncDesc[0]);	return data;}public TYPEATTR getTypeInfoAttributes() {	if (objITypeInfo == null) return null;	int[] ppTypeAttr = new int[1];	int rc = objITypeInfo.GetTypeAttr(ppTypeAttr);	if (rc != OLE.S_OK) return null;	TYPEATTR typeattr = new TYPEATTR();	COM.MoveMemory(typeattr, ppTypeAttr[0], TYPEATTR.sizeof);	objITypeInfo.ReleaseTypeAttr(ppTypeAttr[0]);	return typeattr;}public String getName(int dispId) {	if (objITypeInfo == null) return null;	String[] name = new String[1];	int rc = objITypeInfo.GetDocumentation(dispId, name, null, null, null );	if (rc == OLE.S_OK) return name[0];	return null;}public String[] getNames(int dispId, int maxSize) {	if (objITypeInfo == null) return new String[0];	String[] names = new String[maxSize];	int[] count = new int[1];	int rc = objITypeInfo.GetNames(dispId, names, maxSize, count);	if (rc == OLE.S_OK) {		String[] newNames = new String[count[0]];		System.arraycopy(names, 0, newNames, 0, count[0]);		return newNames;	}	return new String[0];}/** * Returns the positive integer values (IDs) that are associated with the specified names by the * IDispatch implementor.  If you are trying to get the names of the parameters in a method, the first  * String in the names array must be the name of the method followed by the names of the parameters. * * @param names an array of names for which you require the identifiers * * @return positive integer values that are associated with the specified names in the same *         order as the names where provided; or null if the names are unknown */public int[] getIDsOfNames(String[] names) {	int[] rgdispid = new int[names.length];	int result = objIDispatch.GetIDsOfNames(new GUID(), names, names.length, COM.LOCALE_USER_DEFAULT, rgdispid);	if (result != COM.S_OK) return null;		return rgdispid;}/** * Returns a description of the last error encountered. * * @return a description of the last error encountered */public String getLastError() {		return exceptionDescription;}/** * Returns the value of the property specified by the dispIdMember. * * @param dispIdMember the ID of the property as specified by the IDL of the ActiveX Control; the *        value for the ID can be obtained using OleAutomation.getIDsOfNames * * @return the value of the property specified by the dispIdMember or null */public Variant getProperty(int dispIdMember) {	Variant pVarResult = new Variant();	int result = invoke(dispIdMember, COM.DISPATCH_PROPERTYGET, null, null, pVarResult);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品一区二区三区免费| 国产精品乱人伦中文| 亚洲另类在线制服丝袜| 91蜜桃视频在线| 亚洲高清一区二区三区| 在线视频观看一区| 性久久久久久久久| 国产三级欧美三级日产三级99| 一区二区高清免费观看影视大全| 欧美日韩成人综合天天影院 | 亚洲制服欧美中文字幕中文字幕| 欧美日韩国产精品成人| 欧美日韩你懂得| 懂色av一区二区在线播放| 亚洲综合激情小说| 天堂久久一区二区三区| 国产精品久久午夜| 91麻豆精品91久久久久久清纯| 久久精品国产免费| 亚洲精品成人精品456| 五月婷婷另类国产| 国产精品免费视频一区| 亚洲三级理论片| www国产精品av| 欧美日韩免费视频| 日韩欧美国产一区在线观看| av在线不卡免费看| 九九国产精品视频| 99精品视频免费在线观看| 精品一区二区在线看| 成人av网址在线| 久久国内精品自在自线400部| 国产乱妇无码大片在线观看| 日韩不卡一二三区| 玉足女爽爽91| 久久超碰97中文字幕| 91在线精品秘密一区二区| 色94色欧美sute亚洲线路二| 精品一区二区三区免费视频| 99国产精品视频免费观看| 在线观看91av| 欧美理论在线播放| 国产午夜精品一区二区三区视频| 亚洲激情中文1区| 国产乱人伦偷精品视频免下载 | 亚洲电影第三页| 成人蜜臀av电影| 99久久婷婷国产综合精品| 91精品国产福利| 日韩视频永久免费| 欧美一级精品在线| 伊人色综合久久天天人手人婷| 国产一区二区三区精品欧美日韩一区二区三区 | 色综合久久66| 欧美在线免费观看亚洲| 国产女同性恋一区二区| 日韩一区精品视频| 在线视频国内一区二区| 亚洲免费毛片网站| 一区二区三区av电影| 丁香婷婷综合激情五月色| 欧美成人女星排名| 国产午夜亚洲精品羞羞网站| 欧美a级一区二区| 国产精品一区二区久激情瑜伽 | 高清在线不卡av| 久久蜜桃av一区二区天堂| 国产日韩精品一区二区三区| 美女尤物国产一区| 激情图区综合网| 91丨九色porny丨蝌蚪| 国产欧美一区二区在线观看| 韩国精品在线观看| 欧美videofree性高清杂交| 日本亚洲欧美天堂免费| 777a∨成人精品桃花网| 日韩av不卡一区二区| 欧美一区二区视频在线观看 | 亚洲制服丝袜在线| 欧美特级限制片免费在线观看| 91精选在线观看| 日韩电影在线看| 这里只有精品电影| 五月综合激情网| 91精品国产一区二区三区| 丝袜亚洲另类欧美| 精品国产伦一区二区三区观看方式 | 欧美一区二区人人喊爽| 婷婷一区二区三区| 欧美巨大另类极品videosbest | 国产精品高潮呻吟久久| 成人精品鲁一区一区二区| 欧美国产一区在线| 视频一区视频二区中文字幕| 欧美精品在线观看一区二区| 日韩成人dvd| 日韩区在线观看| 中文字幕在线观看不卡| 国产精品久久久久久久久久久免费看 | 欧美日韩小视频| 美女视频一区二区三区| 久久精品亚洲一区二区三区浴池| 成人在线视频首页| 香蕉av福利精品导航| 精品剧情在线观看| 99精品视频一区| 久久99久久久久久久久久久| 国产精品久久久久久久裸模| 69堂亚洲精品首页| 成人午夜免费av| 日韩av电影一区| 国产精品久久久久aaaa| 91麻豆精品国产综合久久久久久| 国产成人亚洲综合a∨婷婷| 欧美一区午夜精品| 成人做爰69片免费看网站| 性久久久久久久| 国产精品久久综合| 日韩欧美视频一区| 一本高清dvd不卡在线观看| 极品少妇一区二区| 亚洲成人黄色小说| 日韩美女久久久| 26uuu久久天堂性欧美| 欧美性大战久久久久久久| 国产成人综合亚洲网站| 日韩精品一级二级| 亚洲欧美日韩在线不卡| 久久久久久久久久久电影| 欧美日韩精品综合在线| 成人av手机在线观看| 韩国午夜理伦三级不卡影院| 亚洲第一久久影院| 亚洲免费观看在线观看| 国产精品成人在线观看| 久久夜色精品一区| 欧美成人在线直播| 欧美一区二区三区四区视频 | 激情图片小说一区| 日韩国产精品久久| 亚洲成人在线免费| 亚洲国产精品一区二区久久 | 青青草成人在线观看| 夜夜精品浪潮av一区二区三区| 国产精品国产a| 成人欧美一区二区三区1314 | 亚洲成人激情av| 亚洲国产欧美在线人成| 亚洲精品视频一区| 亚洲精品乱码久久久久久黑人| 最新不卡av在线| 亚洲天堂网中文字| 亚洲人成影院在线观看| 国产精品国产三级国产aⅴ中文| 国产欧美日韩亚州综合| 久久久国产精华| 国产精品家庭影院| 亚洲人成精品久久久久| 亚洲精品一二三区| 日韩高清不卡一区| 久久99国产精品成人| 国产剧情一区二区| www.亚洲激情.com| 91性感美女视频| 欧美视频一二三区| 日韩精品一区二区三区视频在线观看 | 欧美精品一二三| 欧美一区二区三区视频免费 | 欧美日韩免费视频| 日韩一区二区在线观看| 欧美大片日本大片免费观看| 日韩免费一区二区| 中文字幕av一区 二区| 中文字幕一区二区三中文字幕| 国产精品灌醉下药二区| 亚洲大片免费看| 国产专区欧美精品| 成人黄动漫网站免费app| 91九色02白丝porn| 欧美mv和日韩mv的网站| 亚洲人成精品久久久久| 蜜臀av性久久久久蜜臀aⅴ四虎 | 亚洲成人精品一区二区| 国产一区二区精品久久| 色综合久久中文字幕综合网| 日韩一区二区三区视频| 中文av一区二区| 日本aⅴ精品一区二区三区| 成人a区在线观看| 69堂国产成人免费视频| 中文字幕人成不卡一区| 毛片av一区二区三区| 91麻豆精品一区二区三区| 精品国产免费一区二区三区四区| 亚洲激情图片qvod| 国产一区999| 91麻豆精品国产91久久久久久| 国产精品视频一二三区| 久久99久久精品| 欧美日韩在线综合|