• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java JIArray类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.jinterop.dcom.core.JIArray的典型用法代码示例。如果您正苦于以下问题:Java JIArray类的具体用法?Java JIArray怎么用?Java JIArray使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



JIArray类属于org.jinterop.dcom.core包,在下文中一共展示了JIArray类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: queryAvailableLocaleIDs

import org.jinterop.dcom.core.JIArray; //导入依赖的package包/类
public int[] queryAvailableLocaleIDs() throws JIException
{
    JICallBuilder callObject = new JICallBuilder(true);

    callObject.setOpnum(METHOD_INDEX_IOPCCommon_QueryAvailableLocaleIDs);
    callObject.addOutParamAsType(Integer.class, JIFlags.FLAG_REPRESENTATION_UNSIGNED_INT);
    callObject.addOutParamAsObject(new JIPointer(new JIArray(Integer.class, null, 1, true)), JIFlags.FLAG_NULL);
    Object[] result = comObject.call(callObject);
    if (callObject.isError())
        throw new JIException(callObject.getHRESULT());
    Integer count = (Integer) result[0];
    if (count == null)
        throw new NullPointerException("Count is null");
    int[] availLocales = new int[count];
    Integer[] returned = (Integer[]) ((JIArray) ((JIPointer) result[1]).getReferent()).getArrayInstance();
    for (int i = 0; i < count; i++)
        availLocales[i] = returned[i];
    return availLocales;
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:20,代码来源:IOPCCommon.java


示例2: read

import org.jinterop.dcom.core.JIArray; //导入依赖的package包/类
public ReadResult read(Integer[] serverHandles, int transactionId) throws JIException //TODO retval
{
    JICallBuilder callObject = new JICallBuilder(true);
    callObject.setOpnum(0);
    callObject.addInParamAsInt(serverHandles.length, JIFlags.FLAG_NULL);
    callObject.addInParamAsArray(new JIArray(serverHandles, true), JIFlags.FLAG_NULL);
    callObject.addInParamAsInt(transactionId, JIFlags.FLAG_NULL);
    callObject.addOutParamAsType(Integer.class, JIFlags.FLAG_NULL);
    callObject.addOutParamAsObject(new JIPointer(new JIArray(Integer.class, null, 1, true)), JIFlags.FLAG_NULL);
    Object[] result = comObject.call(callObject);
    Integer cancelId = (Integer) result[0];
    Integer[] errors = (Integer[]) ((JIArray) ((JIPointer) result[1]).getReferent()).getArrayInstance();
    Map<Integer, Integer> errorCodes = new HashMap<>();
    for (int i = 0; i < serverHandles.length; i++) {
        errorCodes.put(serverHandles[i], errors[i]);
    }
    return new ReadResult(cancelId, errorCodes);
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:19,代码来源:IOPCAsyncIO2.java


示例3: write

import org.jinterop.dcom.core.JIArray; //导入依赖的package包/类
public Map<Integer, Integer> write(Integer[] serverHandles, JIVariant[] values) throws JIException {
    JICallBuilder callObject = new JICallBuilder(true);
    callObject.setOpnum(1);
    callObject.addInParamAsInt(serverHandles.length, JIFlags.FLAG_NULL);
    callObject.addInParamAsArray(new JIArray(serverHandles, true), JIFlags.FLAG_NULL);
    callObject.addInParamAsArray(new JIArray(values, true), JIFlags.FLAG_NULL);
    callObject.addOutParamAsObject(new JIPointer(new JIArray(Integer.class, null, 1, true)), JIFlags.FLAG_NULL);
    Object[] result;
    try {
        result = comObject.call(callObject);
    } catch (JIException ex) {
        if (ex.getErrorCode() == 1 /*S_FALSE*/) {
            result = callObject.getResultsInCaseOfException();
        } else {
            throw ex;
        }
    }
    Integer[] errorCodes = (Integer[]) ((JIArray) ((JIPointer) result[0]).getReferent()).getArrayInstance();
    Map<Integer, Integer> codes = new HashMap<>();
    for (int i = 0; i < serverHandles.length; i++) {
        codes.put(serverHandles[i], errorCodes[i]);
    }
    return codes;
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:25,代码来源:IOPCSyncIO.java


示例4: getEmptyStruct

import org.jinterop.dcom.core.JIArray; //导入依赖的package包/类
public static JIStruct getEmptyStruct() throws JIException
{
    JIStruct struct = new JIStruct();
    struct.addMember(new JIString(JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR));//szAccessPath
    struct.addMember(new JIString(JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR));//szItemID
    struct.addMember(Boolean.class);//bActive
    struct.addMember(Integer.class);//hClient
    struct.addMember(Integer.class);//hServer
    struct.addMember(Integer.class);//dwAccessRights
    struct.addMember(Integer.class);//dwBlobSize
    struct.addMember(new JIPointer(new JIArray(Byte.class, null, 1, true, false))); //pBlob
    struct.addMember(Short.class);//vtRequestedDataType
    struct.addMember(Short.class);//vtCanonicalDataType
    struct.addMember(Integer.class);//dwEUType
    struct.addMember(JIVariant.class);//vEUInfo
    return struct;
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:18,代码来源:OPCITEMATTRIBUTES.java


示例5: removeItems

import org.jinterop.dcom.core.JIArray; //导入依赖的package包/类
public Map<Integer, Integer> removeItems(Integer[] serverHandles) throws JIException {
    JICallBuilder callObject = new JICallBuilder(true);
    callObject.setOpnum(2);
    callObject.addInParamAsInt(serverHandles.length, JIFlags.FLAG_NULL);
    callObject.addInParamAsArray(new JIArray(serverHandles, true), JIFlags.FLAG_NULL);
    callObject.addOutParamAsObject(new JIPointer(new JIArray(Integer.class, null, 1, true)), JIFlags.FLAG_NULL);

    Object[] result;
    try {
        result = comObject.call(callObject);
    } catch (JIException ex) {
        if (ex.getErrorCode() == 1 /*S_FALSE*/) {
            result = callObject.getResultsInCaseOfException();
        } else {
            throw ex;
        }
    }

    Integer[] errorCodes = (Integer[]) ((JIArray) ((JIPointer) result[0]).getReferent()).getArrayInstance();
    Map<Integer, Integer> map = new HashMap<>();
    for (int i = 0; i < serverHandles.length; i++) {
        map.put(serverHandles[i], errorCodes[i]);
    }
    return map;
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:26,代码来源:IOPCItemMgt.java


示例6: setActiveState

import org.jinterop.dcom.core.JIArray; //导入依赖的package包/类
public Map<Integer, Integer> setActiveState(boolean active, Integer[] serverHandles) throws JIException {
    JICallBuilder callObject = new JICallBuilder(true);
    callObject.setOpnum(3);
    callObject.addInParamAsInt(serverHandles.length, JIFlags.FLAG_NULL);
    callObject.addInParamAsArray(new JIArray(serverHandles, true), JIFlags.FLAG_NULL);
    callObject.addInParamAsBoolean(active, JIFlags.FLAG_NULL);
    callObject.addOutParamAsObject(new JIPointer(new JIArray(Integer.class, null, 1, true)), JIFlags.FLAG_NULL);

    Object[] result;
    try {
        result = comObject.call(callObject);
    } catch (JIException ex) {
        if (ex.getErrorCode() == 1 /*S_FALSE*/) {
            result = callObject.getResultsInCaseOfException();
        } else {
            throw ex;
        }
    }

    Integer[] errorCodes = (Integer[]) ((JIArray) ((JIPointer) result[0]).getReferent()).getArrayInstance();
    Map<Integer, Integer> map = new HashMap<>();
    for (int i = 0; i < serverHandles.length; i++) {
        map.put(serverHandles[i], errorCodes[i]);
    }
    return map;
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:27,代码来源:IOPCItemMgt.java


示例7: OnDataChange

import org.jinterop.dcom.core.JIArray; //导入依赖的package包/类
public void OnDataChange(int dwTransid, int hGroup, int hrMasterQuality, int hrMasterError, int dwCount,
        JIArray phClientItems, JIArray pvValues, JIArray pwQualities, JIArray pftTimeStamps, JIArray pErrors) throws JIException
{
    Logger.getLogger(OPCDataCallbackImpl.class.getName()).finest("OnDataChange, transid="+dwTransid);
    Integer[] clientHandles = (Integer[]) phClientItems.getArrayInstance();
    Object[] values = new Object[dwCount];
    Short[] qualities = (Short[]) pwQualities.getArrayInstance();
    Date[] timeStamps = new Date[dwCount];
    Integer[] errors = (Integer[]) pErrors.getArrayInstance();

    JIStruct[] fileTimeStructs = (JIStruct[]) pftTimeStamps.getArrayInstance();
    for (int i = 0; i < fileTimeStructs.length; i++)
        timeStamps[i] = new FileTime(fileTimeStructs[i]).getTime();

    JIVariant[] valueVariants = (JIVariant[]) pvValues.getArrayInstance();
    for (int i = 0; i < valueVariants.length; i++)
        values[i] = valueVariants[i].getObject();

    listener.dataChanged(dwTransid, hGroup, hrMasterQuality, hrMasterError, clientHandles, values, qualities, timeStamps, errors);
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:21,代码来源:OPCDataCallbackImpl.java


示例8: OnReadComplete

import org.jinterop.dcom.core.JIArray; //导入依赖的package包/类
public void OnReadComplete(int dwTransid, int hGroup, int hrMasterQuality, int hrMasterError, int dwCount,
        JIArray phClientItems, JIArray pvValues, JIArray pwQualities, JIArray pftTimeStamps, JIArray pErrors) throws JIException
{
    Logger.getLogger(OPCDataCallbackImpl.class.getName()).finest("OnReadComplete, transid="+dwTransid);
    Integer[] clientHandles = (Integer[]) phClientItems.getArrayInstance();
    Object[] values = new Object[dwCount];
    Short[] qualities = (Short[]) pwQualities.getArrayInstance();
    Date[] timeStamps = new Date[dwCount];
    Integer[] errors = (Integer[]) pErrors.getArrayInstance();

    JIStruct[] fileTimeStructs = (JIStruct[]) pftTimeStamps.getArrayInstance();
    for (int i = 0; i < fileTimeStructs.length; i++)
        timeStamps[i] = new FileTime(fileTimeStructs[i]).getTime();

    JIVariant[] valueVariants = (JIVariant[]) pvValues.getArrayInstance();
    for (int i = 0; i < valueVariants.length; i++)
        values[i] = valueVariants[i].getObject();

    listener.readCompleted(dwTransid, hGroup, hrMasterQuality, hrMasterError, clientHandles, values, qualities, timeStamps, errors);
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:21,代码来源:OPCDataCallbackImpl.java


示例9: releaseItemHandles

import org.jinterop.dcom.core.JIArray; //导入依赖的package包/类
public ResultTable<Integer, Void> releaseItemHandles(Integer[] serverHandles) throws JIException {
    JICallBuilder callObject = new JICallBuilder(true);
    callObject.setOpnum(4);
    callObject.addInParamAsInt(serverHandles.length, JIFlags.FLAG_NULL);
    callObject.addInParamAsArray(new JIArray(serverHandles), JIFlags.FLAG_NULL);
    callObject.addOutParamAsObject(new JIPointer(new JIArray(Integer.class, null, 1, true)), JIFlags.FLAG_NULL);

    Object[] result;
    try {
        result = comObject.call(callObject);
    } catch (JIException ex) {
        if (ex.getErrorCode() == 1 /*S_FALSE*/) {
            result = callObject.getResultsInCaseOfException();
        } else {
            throw ex;
        }
    }
    Integer[] errorCodes = (Integer[]) ((JIArray) ((JIPointer) result[0]).getReferent()).getArrayInstance();
    ResultTable<Integer, Void> resultTable = new ResultTable<>();
    for (int i = 0; i < serverHandles.length; i++) {
        resultTable.put(serverHandles[i], null, errorCodes[i]);
    }
    return resultTable;
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:25,代码来源:IOPCHDA_Server.java


示例10: main

import org.jinterop.dcom.core.JIArray; //导入依赖的package包/类
public static void main(String[] args) throws Exception {

		Server server = new Server(
				BaseConfiguration.getCLSIDConnectionInfomation(),
				Executors.newSingleThreadScheduledExecutor());

		server.connect();

		Group group = server.addGroup();
		Item item = group.addItem("Square Waves.Real4");

		/** 构造写入数据 */
		final Float[] integerData = new Float[] { 1202f, 1203f, 1204f };
		final JIArray array = new JIArray(integerData, false);
		final JIVariant value = new JIVariant(array);

		/** 同步写入 */
		item.write(value);
		Thread.sleep(2000);

		/** Dump出item的值 */
		dumpItem(item);

		server.dispose();

	}
 
开发者ID:luoyan35714,项目名称:OPC_Client,代码行数:27,代码来源:OPCTest7.java


示例11: remove

import org.jinterop.dcom.core.JIArray; //导入依赖的package包/类
public ResultSet<Integer> remove ( final Integer... serverHandles ) throws JIException
{
    if ( serverHandles.length == 0 )
    {
        return new ResultSet<Integer> ();
    }

    final JICallBuilder callObject = new JICallBuilder ( true );
    callObject.setOpnum ( 2 );

    callObject.addInParamAsInt ( serverHandles.length, JIFlags.FLAG_NULL );
    callObject.addInParamAsArray ( new JIArray ( serverHandles, true ), JIFlags.FLAG_NULL );
    callObject.addOutParamAsObject ( new JIPointer ( new JIArray ( Integer.class, null, 1, true ) ), JIFlags.FLAG_NULL );

    final Object result[] = Helper.callRespectSFALSE ( getCOMObject (), callObject );

    final Integer[] errorCodes = (Integer[]) ( (JIArray) ( (JIPointer)result[0] ).getReferent () ).getArrayInstance ();
    final ResultSet<Integer> results = new ResultSet<Integer> ( serverHandles.length );
    for ( int i = 0; i < serverHandles.length; i++ )
    {
        results.add ( new Result<Integer> ( serverHandles[i], errorCodes[i] ) );
    }
    return results;
}
 
开发者ID:luoyan35714,项目名称:OPC_Client,代码行数:25,代码来源:OPCItemMgt.java


示例12: setActiveState

import org.jinterop.dcom.core.JIArray; //导入依赖的package包/类
public ResultSet<Integer> setActiveState ( final boolean state, final Integer... items ) throws JIException
{
    if ( items.length == 0 )
    {
        return new ResultSet<Integer> ();
    }

    final JICallBuilder callObject = new JICallBuilder ( true );
    callObject.setOpnum ( 3 );

    callObject.addInParamAsInt ( items.length, JIFlags.FLAG_NULL );
    callObject.addInParamAsArray ( new JIArray ( items, true ), JIFlags.FLAG_NULL );
    callObject.addInParamAsInt ( state ? 1 : 0, JIFlags.FLAG_NULL );
    callObject.addOutParamAsObject ( new JIPointer ( new JIArray ( Integer.class, null, 1, true ) ), JIFlags.FLAG_NULL );

    final Object[] result = Helper.callRespectSFALSE ( getCOMObject (), callObject );

    final Integer[] errorCodes = (Integer[]) ( (JIArray) ( (JIPointer)result[0] ).getReferent () ).getArrayInstance ();
    final ResultSet<Integer> results = new ResultSet<Integer> ( items.length );
    for ( int i = 0; i < items.length; i++ )
    {
        results.add ( new Result<Integer> ( items[i], errorCodes[i] ) );
    }
    return results;
}
 
开发者ID:luoyan35714,项目名称:OPC_Client,代码行数:26,代码来源:OPCItemMgt.java


示例13: next

import org.jinterop.dcom.core.JIArray; //导入依赖的package包/类
public int next ( final List<UUID> list, final int num ) throws JIException
{
    if ( num <= 0 )
    {
        return 0;
    }

    JICallBuilder callObject = new JICallBuilder ( true );
    callObject.setOpnum ( 0 );

    callObject.addInParamAsInt ( num, JIFlags.FLAG_NULL );
    callObject.addInParamAsInt ( num, JIFlags.FLAG_NULL );
    callObject.addOutParamAsObject ( new JIArray ( UUID.class, null, 1, true, true ), JIFlags.FLAG_NULL );
    callObject.addOutParamAsType ( Integer.class, JIFlags.FLAG_NULL );

    Object[] result = Helper.callRespectSFALSE ( getCOMObject (), callObject );

    UUID[] resultData = (UUID[]) ( (JIArray)result[0] ).getArrayInstance ();
    Integer cnt = (Integer)result[1];

    for ( int i = 0; i < cnt; i++ )
    {
        list.add ( resultData[i] );
    }
    return cnt;
}
 
开发者ID:luoyan35714,项目名称:OPC_Client,代码行数:27,代码来源:EnumGUID.java


示例14: dumpArray

import org.jinterop.dcom.core.JIArray; //导入依赖的package包/类
static protected void dumpArray ( final String prefix, final JIArray array ) throws JIException
{
    System.out.println ( prefix + String.format ( "IsConformant: %s, IsVarying: %s", array.isConformant () ? "yes" : "no", array.isVarying () ? "yes" : "no" ) );
    System.out.println ( prefix + String.format ( "Dimensions: %d", array.getDimensions () ) );
    for ( int i = 0; i < array.getDimensions (); i++ )
    {
        System.out.println ( prefix + String.format ( "Dimension #%d: Upper Bound: %d", i, array.getUpperBounds ()[i] ) );
    }

    final Object o = array.getArrayInstance ();
    System.out.println ( prefix + "Array Instance: " + o.getClass () );
    final Object[] a = (Object[])o;
    System.out.println ( prefix + "Array Size: " + a.length );

    for ( final Object value : a )
    {
        dumpValue ( prefix + "\t", value );
    }
}
 
开发者ID:luoyan35714,项目名称:OPC_Client,代码行数:20,代码来源:VariantDumper.java


示例15: getNames

import org.jinterop.dcom.core.JIArray; //导入依赖的package包/类
public Object[] getNames(int memberId, int maxNames) throws JIException
	{
		JICallBuilder callObject = new JICallBuilder(true);
		callObject.setOpnum(4);

		//for experiment only
//		JIArray arry = new JIArray(new Integer[]{new Integer(100),new Integer(200)},true);
//		JIStruct struct = new JIStruct();
//		struct.addMember(Short.valueOf((short)86));
//		struct.addMember(arry);
//		callObject.addInParamAsStruct(struct,JIFlags.FLAG_NULL);


		callObject.addInParamAsInt(memberId,JIFlags.FLAG_NULL);
		callObject.addInParamAsInt(maxNames,JIFlags.FLAG_NULL);

		callObject.addOutParamAsObject(new JIArray(new JIString(JIFlags.FLAG_REPRESENTATION_STRING_BSTR),null,1,true,true),JIFlags.FLAG_NULL);
		callObject.addOutParamAsType(Integer.class,JIFlags.FLAG_NULL);

		return comObject.call(callObject);
	}
 
开发者ID:howie,项目名称:jinterop,代码行数:22,代码来源:JITypeInfoImpl.java


示例16: onEvent

import org.jinterop.dcom.core.JIArray; //导入依赖的package包/类
/**
 * This method is provided by the client to handle notifications from the OPCEventSubscription for events. This method can be
 * called whether this is a refresh or standard event notification.
 * @param clientSubscription
 * 		The client handle for the subscription object sending the event notifications.
 * @param refresh
 * 		TRUE if this is a subscription refresh.
 * @param lastRefresh
 * 		TRUE if this is the last subscription refresh in response to a specific invocation of the IOPCEventSubscriptionMgt::Refresh method.
 * @param count
 * 		Number of event notifications. A value of zero indicates this is a keep-alive notification.
 * @param events
 * 		Array of event notifications
 * @return
 * 		An EMPTY() array.
 * @throws JIException
 */
public Object[] onEvent(final int clientSubscription,final int refresh,final int lastRefresh, int count, JIArray eventsArray) throws JIException{
	final JIStruct[] events;
	if(count==0) events=new JIStruct[0];
	else events=(JIStruct[])eventsArray.getArrayInstance();
	new Thread(new Runnable(){
		public void run() {
			EventNotificationListener[] l;
			synchronized (listeners) {
				l=(EventNotificationListener[])listeners.toArray(new EventNotificationListener[listeners.size()]);
			}
			for (int i = 0; i < l.length;i++)
			{
				l[i].onEvent(events);
			}
		}
	},"Opc event sink thread").start();
	return new Object[0];
}
 
开发者ID:howie,项目名称:jinterop,代码行数:36,代码来源:JIOPCEventSink.java


示例17: getCoClass

import org.jinterop.dcom.core.JIArray; //导入依赖的package包/类
public static final JILocalCoClass getCoClass(JIOPCEventSink instance){
	//Define the onEvent method for this interface
	JILocalParamsDescriptor oeParams=new JILocalParamsDescriptor();
	oeParams.addInParamAsType(Integer.class, JIFlags.FLAG_NULL);
	oeParams.addInParamAsType(Integer.class, JIFlags.FLAG_NULL);
	oeParams.addInParamAsType(Integer.class, JIFlags.FLAG_NULL);
	oeParams.addInParamAsType(Integer.class, JIFlags.FLAG_NULL);
	oeParams.addInParamAsObject(new JIArray(outStruct(),null,1,true), JIFlags.FLAG_NULL);
	JILocalMethodDescriptor oeMethod=new JILocalMethodDescriptor("onEvent",0,oeParams);
	//This identify the JIOPCEventSink and not the interface
	JILocalInterfaceDefinition def=new JILocalInterfaceDefinition(LOCAL_CLASS_IID,false);
	def.addMethodDescriptor(oeMethod);
	JILocalCoClass coClass=(instance==null) ? new JILocalCoClass(def,JIOPCEventSink.class) : new JILocalCoClass(def,instance);
	ArrayList list = new ArrayList();
	//Supported interface
	list.add(OPC_IID);
	coClass.setSupportedEventInterfaces(list);
	return coClass;
}
 
开发者ID:howie,项目名称:jinterop,代码行数:20,代码来源:JIOPCEventSink.java


示例18: getTCharArray

import org.jinterop.dcom.core.JIArray; //导入依赖的package包/类
public void getTCharArray()
    throws JIException, InterruptedException, UnknownHostException {
    System.gc();
    JICallBuilder callObject = new JICallBuilder( true);
    callObject.setOpnum(6);
    Object results[];

    callObject.addOutParamAsObject(new JIArray(Byte.class, new int[]{50},1,false), JIFlags.FLAG_NULL);
    results = comObject.call(callObject);

    JIArray arrayOfResults = (JIArray)results[0];
    Byte[] arrayOfBytes = (Byte[]) arrayOfResults.getArrayInstance();
    int length = 50;
    for (int i = 0; i < length; i++) {
      System.out.println(arrayOfBytes[i].byteValue());
    }
}
 
开发者ID:howie,项目名称:jinterop,代码行数:18,代码来源:SampleTestServer.java


示例19: setConformantIntArray

import org.jinterop.dcom.core.JIArray; //导入依赖的package包/类
public void setConformantIntArray()
    throws JIException, InterruptedException, UnknownHostException {
    System.gc();
    JICallBuilder callObject = new JICallBuilder( true);
    callObject.setOpnum(9);
    Object results[];
    int i = 4;
    Integer[] intAry = new Integer[i];
    for(int j = 0; j < i; j++) {
        intAry[j] = new Integer(j);
    }
    JIArray ary = new JIArray(intAry, true);
    callObject.addInParamAsInt(i, JIFlags.FLAG_NULL);
    callObject.addInParamAsArray(ary, JIFlags.FLAG_NULL);
    results = comObject.call(callObject);
}
 
开发者ID:howie,项目名称:jinterop,代码行数:17,代码来源:SampleTestServer.java


示例20: getConformantIntArray

import org.jinterop.dcom.core.JIArray; //导入依赖的package包/类
public void getConformantIntArray()
   throws JIException, InterruptedException, UnknownHostException {

JICallBuilder callObject = new JICallBuilder( true);
   callObject.setOpnum(8);
   Object results[];

   callObject.addOutParamAsType(Integer.class, JIFlags.FLAG_NULL);
   callObject.addOutParamAsObject(new JIPointer(new JIArray(Integer.class, null, 1, true)), JIFlags.FLAG_NULL);
   results = comObject.call(callObject);

   JIArray arrayOfResults = (JIArray)((JIPointer)results[1]).getReferent();
   Integer[] arrayOfIntegers = (Integer[]) arrayOfResults.getArrayInstance();
   int length = ((Integer)results[0]).intValue();
   for (int i = 0; i < length; i++) {
     System.out.println(arrayOfIntegers[i].intValue());
   }
 }
 
开发者ID:howie,项目名称:jinterop,代码行数:19,代码来源:SampleTestServer.java



注:本文中的org.jinterop.dcom.core.JIArray类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ObjectType类代码示例发布时间:2022-05-22
下一篇:
Java ReleaseShortCircuitAccessResponseProto类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap