當前位置: 首頁>>代碼示例>>Java>>正文


Java JICallBuilder.addInParamAsUUID方法代碼示例

本文整理匯總了Java中org.jinterop.dcom.core.JICallBuilder.addInParamAsUUID方法的典型用法代碼示例。如果您正苦於以下問題:Java JICallBuilder.addInParamAsUUID方法的具體用法?Java JICallBuilder.addInParamAsUUID怎麽用?Java JICallBuilder.addInParamAsUUID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.jinterop.dcom.core.JICallBuilder的用法示例。


在下文中一共展示了JICallBuilder.addInParamAsUUID方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: addGroup

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public AddGroupResult addGroup(String name, boolean active, int requestedUpdateRate, int clientGroup, Integer timeBias, Float percentDeadband, int lcid, String iid) throws JIException
{
    JICallBuilder callObject = new JICallBuilder(true);
    callObject.setOpnum(METHOD_INDEX_IOPCServer_AddGroup);
    callObject.addInParamAsString(name, JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR);
    callObject.addInParamAsBoolean(active, JIFlags.FLAG_NULL);
    callObject.addInParamAsInt(requestedUpdateRate, JIFlags.FLAG_REPRESENTATION_UNSIGNED_INT);
    callObject.addInParamAsInt(clientGroup, JIFlags.FLAG_NULL);
    callObject.addInParamAsPointer(new JIPointer(timeBias != null ? timeBias : new Integer(0)), JIFlags.FLAG_NULL);
    callObject.addInParamAsPointer(new JIPointer(percentDeadband != null ? percentDeadband : new Float(0.0)), JIFlags.FLAG_NULL);
    callObject.addInParamAsInt(lcid, JIFlags.FLAG_REPRESENTATION_UNSIGNED_INT);
    callObject.addOutParamAsType(Integer.class, JIFlags.FLAG_NULL); //out param phServerGroup
    callObject.addOutParamAsType(Integer.class, JIFlags.FLAG_NULL); //out param pRevisedUpdateRate
    callObject.addInParamAsUUID(iid, JIFlags.FLAG_NULL);
    callObject.addOutParamAsType(IJIComObject.class, JIFlags.FLAG_NULL); // out param ppUnk
    Object[] result = comObject.call(callObject);
    if (callObject.isError())
        throw new JIException(callObject.getHRESULT());
    return new AddGroupResult(
            (Integer) result[0],
            (Integer) result[1],
            JIObjectFactory.narrowObject((IJIComObject) result[2]));
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:24,代碼來源:IOPCServer.java

示例2: getClassDetails

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
/**
 * Return details about a serve class
 * @param clsId A server class
 * @throws JIException
 */
public ClassDetails getClassDetails ( final JIClsid clsId ) throws JIException
{
    if ( clsId == null )
    {
        return null;
    }

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

    callObject.addInParamAsUUID ( clsId.getCLSID (), JIFlags.FLAG_NULL );

    callObject.addOutParamAsObject ( new JIPointer ( new JIString ( JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR ) ), JIFlags.FLAG_NULL );
    callObject.addOutParamAsObject ( new JIPointer ( new JIString ( JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR ) ), JIFlags.FLAG_NULL );

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

    ClassDetails cd = new ClassDetails ();
    cd.setClsId ( clsId.getCLSID () );
    cd.setProgId ( ( (JIString) ( (JIPointer)result[0] ).getReferent () ).getString () );
    cd.setDescription ( ( (JIString) ( (JIPointer)result[1] ).getReferent () ).getString () );

    return cd;
}
 
開發者ID:luoyan35714,項目名稱:OPC_Client,代碼行數:30,代碼來源:OPCServerList.java

示例3: addGroup

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public OPCGroupStateMgt addGroup ( final String name, final boolean active, final int updateRate, final int clientHandle, final Integer timeBias, final Float percentDeadband, final int localeID ) throws JIException, IllegalArgumentException, UnknownHostException
{
    JICallBuilder callObject = new JICallBuilder ( true );
    callObject.setOpnum ( 0 );

    callObject.addInParamAsString ( name, JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR );
    callObject.addInParamAsInt ( active ? 1 : 0, JIFlags.FLAG_NULL );
    callObject.addInParamAsInt ( updateRate, JIFlags.FLAG_NULL );
    callObject.addInParamAsInt ( clientHandle, JIFlags.FLAG_NULL );
    callObject.addInParamAsPointer ( new JIPointer ( timeBias ), JIFlags.FLAG_NULL );
    callObject.addInParamAsPointer ( new JIPointer ( percentDeadband ), JIFlags.FLAG_NULL );
    callObject.addInParamAsInt ( localeID, JIFlags.FLAG_NULL );
    callObject.addOutParamAsType ( Integer.class, JIFlags.FLAG_NULL );
    callObject.addOutParamAsType ( Integer.class, JIFlags.FLAG_NULL );
    callObject.addInParamAsUUID ( Constants.IOPCGroupStateMgt_IID, JIFlags.FLAG_NULL );
    callObject.addOutParamAsType ( IJIComObject.class, JIFlags.FLAG_NULL );

    Object[] result = getCOMObject ().call ( callObject );

    return new OPCGroupStateMgt ( (IJIComObject)result[2] );
}
 
開發者ID:luoyan35714,項目名稱:OPC_Client,代碼行數:22,代碼來源:OPCServer.java

示例4: performOp

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public void performOp() throws JIException, InterruptedException
{

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

       callObject.addInParamAsString("",JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR);
       callObject.addInParamAsInt(0xFFFFFFFF, JIFlags.FLAG_NULL );
       callObject.addInParamAsInt ( 1000,JIFlags.FLAG_NULL );
       callObject.addInParamAsInt ( 1234,JIFlags.FLAG_NULL );
       callObject.addInParamAsPointer ( new JIPointer(new Integer(0)), JIFlags.FLAG_NULL );
       callObject.addInParamAsPointer ( new JIPointer(new Float(0.0)),JIFlags.FLAG_NULL );
       callObject.addInParamAsInt ( 0, JIFlags.FLAG_NULL );
       callObject.addOutParamAsType ( Integer.class,JIFlags.FLAG_NULL );
       callObject.addOutParamAsType ( Integer.class,JIFlags.FLAG_NULL );
       callObject.addInParamAsUUID( "39C13A50-011E-11D0-9675-0020AFD8ADB3", JIFlags.FLAG_NULL );
       callObject.addOutParamAsType ( IJIComObject.class, JIFlags.FLAG_NULL );

       Object[] result = opcServer.call ( callObject );



       JISession.destroySession(unknown.getAssociatedSession());
}
 
開發者ID:howie,項目名稱:jinterop,代碼行數:25,代碼來源:MetrikonOPC.java

示例5: getGroupByName

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public IJIComObject getGroupByName(String name, String iid) throws JIException
{
    JICallBuilder callObject = new JICallBuilder(true);
    callObject.setOpnum(METHOD_INDEX_IOPCServer_GetGroupByName);
    callObject.addInParamAsString(name, JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR);
    callObject.addInParamAsUUID(iid, JIFlags.FLAG_NULL);
    callObject.addOutParamAsType(IJIComObject.class, JIFlags.FLAG_NULL); // out param ppUnk
    Object[] result = comObject.call(callObject);
    if (callObject.isError())
        throw new JIException(callObject.getHRESULT());
    return JIObjectFactory.narrowObject((IJIComObject) result[0]);
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:13,代碼來源:IOPCServer.java

示例6: cloneGroup

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public IJIComObject cloneGroup(String name, String iid) throws JIException
{
    JICallBuilder callObject = new JICallBuilder(true);
    callObject.setOpnum(3);
    callObject.addInParamAsString(name, JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR);
    callObject.addInParamAsUUID(iid, JIFlags.FLAG_NULL);
    Object[] result = comObject.call(callObject);
    return JIObjectFactory.narrowObject((IJIComObject) result[0]);
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:10,代碼來源:IOPCGroupStateMgt.java

示例7: getPublicGroupByName

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public IJIComObject getPublicGroupByName(String name, String iid) throws JIException
{
    JICallBuilder callObject = new JICallBuilder(true);
    callObject.setOpnum(0);
    callObject.addInParamAsString(name, JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR);
    callObject.addInParamAsUUID(iid, JIFlags.FLAG_NULL);
    callObject.addOutParamAsType(IJIComObject.class, JIFlags.FLAG_NULL); // out param ppUnk

    Object[] result = comObject.call(callObject);

    return JIObjectFactory.narrowObject((IJIComObject) result[0]);
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:13,代碼來源:IOPCServerPublicGroups.java

示例8: createEnumerator

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public IJIComObject createEnumerator(String iid) throws JIException {
    JICallBuilder callObject = new JICallBuilder(true);
    callObject.setOpnum(6);
    callObject.addInParamAsUUID(iid, JIFlags.FLAG_NULL);
    callObject.addOutParamAsType(IJIComObject.class, JIFlags.FLAG_NULL);

    Object[] result = comObject.call(callObject);
    return JIObjectFactory.narrowObject((IJIComObject) result[0]);
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:10,代碼來源:IOPCItemMgt.java

示例9: findConnectionPoint

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public IJIComObject findConnectionPoint(String iid) throws JIException
{
    JICallBuilder callObj = new JICallBuilder(true);
    callObj.setOpnum(1);
    callObj.addInParamAsUUID(iid, JIFlags.FLAG_NULL);
    callObj.addOutParamAsType(IJIComObject.class, JIFlags.FLAG_NULL);
    Object[] result = comObject.call(callObj);
    return JIObjectFactory.narrowObject((IJIComObject) result[0]);
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:10,代碼來源:IConnectionPointContainer.java

示例10: clone

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
/**
 * Clone the group
 * 
 * @param name
 *            the name of the cloned group
 * @return The cloned group
 * @throws JIException
 * @throws UnknownHostException
 * @throws IllegalArgumentException
 */
public OPCGroupStateMgt clone ( final String name ) throws JIException, IllegalArgumentException, UnknownHostException
{
    final JICallBuilder callObject = new JICallBuilder ( true );
    callObject.setOpnum ( 3 );

    callObject.addInParamAsString ( name, JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR );
    callObject.addInParamAsUUID ( Constants.IOPCGroupStateMgt_IID, JIFlags.FLAG_NULL );
    callObject.addOutParamAsType ( IJIComObject.class, JIFlags.FLAG_NULL );

    final Object[] result = getCOMObject ().call ( callObject );
    return new OPCGroupStateMgt ( (IJIComObject)result[0] );
}
 
開發者ID:luoyan35714,項目名稱:OPC_Client,代碼行數:23,代碼來源:OPCGroupStateMgt.java

示例11: getGroupByName

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public OPCGroupStateMgt getGroupByName ( final String name ) throws JIException, IllegalArgumentException, UnknownHostException
{
    JICallBuilder callObject = new JICallBuilder ( true );
    callObject.setOpnum ( 2 );

    callObject.addInParamAsString ( name, JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR );
    callObject.addInParamAsUUID ( Constants.IOPCGroupStateMgt_IID, JIFlags.FLAG_NULL );
    callObject.addOutParamAsType ( IJIComObject.class, JIFlags.FLAG_NULL );

    Object[] result = getCOMObject ().call ( callObject );

    return new OPCGroupStateMgt ( (IJIComObject)result[0] );
}
 
開發者ID:luoyan35714,項目名稱:OPC_Client,代碼行數:14,代碼來源:OPCServer.java

示例12: getGroups

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
/**
 * Get the groups
 * @param scope The scope to get
 * @return A string enumerator with the groups
 * @throws JIException
 * @throws IllegalArgumentException
 * @throws UnknownHostException
 */
public EnumString getGroups ( final OPCENUMSCOPE scope ) throws JIException, IllegalArgumentException, UnknownHostException
{
    JICallBuilder callObject = new JICallBuilder ( true );
    callObject.setOpnum ( 5 );

    callObject.addInParamAsShort ( (short)scope.id (), JIFlags.FLAG_NULL );
    callObject.addInParamAsUUID ( org.openscada.opc.dcom.common.Constants.IEnumString_IID, JIFlags.FLAG_NULL );
    callObject.addOutParamAsType ( IJIComObject.class, JIFlags.FLAG_NULL );

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

    return new EnumString ( (IJIComObject)result[0] );
}
 
開發者ID:luoyan35714,項目名稱:OPC_Client,代碼行數:22,代碼來源:OPCServer.java

示例13: createInstance

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public IJIComObject createInstance(String riid) throws JIException
{
	JICallBuilder callObject = new JICallBuilder(true);
	callObject.setOpnum(13);

	callObject.addInParamAsUUID(riid,JIFlags.FLAG_NULL);
	callObject.addOutParamAsType(IJIComObject.class,JIFlags.FLAG_NULL);
	Object[] result = comObject.call(callObject);
	return JIObjectFactory.narrowObject((IJIComObject)result[0]);
}
 
開發者ID:howie,項目名稱:jinterop,代碼行數:11,代碼來源:JITypeInfoImpl.java

示例14: getTypeInfoOfGuid

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public IJITypeInfo getTypeInfoOfGuid(String uuid) throws JIException
{
	JICallBuilder callObject = new JICallBuilder(true);
	callObject.setOpnum(3);
	callObject.addInParamAsUUID(uuid,JIFlags.FLAG_NULL);
	callObject.addOutParamAsType(IJIComObject.class,JIFlags.FLAG_NULL);
	Object[] result = comObject.call(callObject);
	return (IJITypeInfo) JIObjectFactory.narrowObject((IJIComObject)result[0]);
}
 
開發者ID:howie,項目名稱:jinterop,代碼行數:10,代碼來源:JITypeLibImpl.java

示例15: getIDsOfNames

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public int getIDsOfNames(String apiName) throws JIException
{
	if (apiName == null || apiName.trim().equals(""))
	{
		throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_DISP_INCORRECT_VALUE_FOR_GETIDNAMES));
	}

	Map innerMap = ((Map)cacheOfDispIds.get(apiName));
	if (innerMap != null)
	{
		Integer dispId = (Integer)innerMap.get(apiName);
		return dispId.intValue();
	}



	JICallBuilder obj = new JICallBuilder(true);
	obj.setOpnum(2);									//size of the array																	//1st is the num elements and second is the actual values

	JIString name = new JIString(apiName.trim(),JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR);
	JIArray array = new JIArray(new JIPointer[]{new JIPointer(name)},true);
	obj.addInParamAsUUID(UUID.NIL_UUID,JIFlags.FLAG_NULL);
	obj.addInParamAsArray(array,JIFlags.FLAG_NULL);
	obj.addInParamAsInt(1,JIFlags.FLAG_NULL);
	obj.addInParamAsInt(0x800,JIFlags.FLAG_NULL);
	obj.addOutParamAsObject(new JIArray(Integer.class,null,1,true),JIFlags.FLAG_NULL);


	Object[] result = comObject.call(obj);

	if (result == null && obj.isError())
	{
		throw new JIException(obj.getHRESULT());
	}

	innerMap = new HashMap();
	innerMap.put(apiName,((Object[])((JIArray)result[0]).getArrayInstance())[0]);
	cacheOfDispIds.put(apiName,innerMap);


	//first will be the length , and the next will be the actual value.
	return ((Integer)((Object[])((JIArray)result[0]).getArrayInstance())[0]).intValue();//will get the dispatch ID.
}
 
開發者ID:howie,項目名稱:jinterop,代碼行數:44,代碼來源:JIDispatchImpl.java


注:本文中的org.jinterop.dcom.core.JICallBuilder.addInParamAsUUID方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。