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


Java JICallBuilder.addInParamAsString方法代碼示例

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


在下文中一共展示了JICallBuilder.addInParamAsString方法的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: browseOPCItemIDs

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public IEnumString browseOPCItemIDs(short browseType, String filterCriteria, short dataTypeFilter, int accessRightsFilter) throws JIException {
    JICallBuilder callObject = new JICallBuilder(true);
    callObject.setOpnum(2);

    callObject.addInParamAsShort(browseType, JIFlags.FLAG_NULL);
    callObject.addInParamAsString(filterCriteria, JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR);
    callObject.addInParamAsShort((short) dataTypeFilter, JIFlags.FLAG_NULL);
    callObject.addInParamAsInt(accessRightsFilter, JIFlags.FLAG_NULL);
    callObject.addOutParamAsType(IJIComObject.class, 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;
        }
    }

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

示例3: browseAccessPaths

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public IEnumString browseAccessPaths(String itemId) throws JIException {
    JICallBuilder callObject = new JICallBuilder(true);
    callObject.setOpnum(4);
    callObject.addInParamAsString(itemId, JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR);
    callObject.addOutParamAsType(IJIComObject.class, 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;
        }
    }
    return new IEnumString(JIObjectFactory.narrowObject((IJIComObject) result[0]));
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:18,代碼來源:IOPCBrowseServerAddressSpace.java

示例4: getCLSIDFromProgID

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public JIClsid getCLSIDFromProgID ( final String progId ) throws JIException
{
    JICallBuilder callObject = new JICallBuilder ( true );
    callObject.setOpnum ( 2 );

    callObject.addInParamAsString ( progId, JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR );
    callObject.addOutParamAsType ( UUID.class, JIFlags.FLAG_NULL );

    try
    {
        Object[] result = getCOMObject ().call ( callObject );
        return JIClsid.valueOf ( ( (UUID)result[0] ).toString () );
    }
    catch ( JIException e )
    {
        if ( e.getErrorCode () == 0x800401F3 )
        {
            return null;
        }
        throw e;
    }
}
 
開發者ID:luoyan35714,項目名稱:OPC_Client,代碼行數:23,代碼來源:OPCServerList.java

示例5: 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

示例6: findName

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public Object[] findName(JIString nameBuf,int hashValue,short found) throws JIException
{
	JICallBuilder callObject = new JICallBuilder(true);
	callObject.setOpnum(8);
	callObject.addInParamAsString((nameBuf).getString(),nameBuf.getType());
	callObject.addInParamAsInt(hashValue,JIFlags.FLAG_NULL);
	callObject.addInParamAsShort(found,JIFlags.FLAG_NULL);

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

	return comObject.call(callObject);
}
 
開發者ID:howie,項目名稱:jinterop,代碼行數:16,代碼來源:JITypeLibImpl.java

示例7: setName

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public void setName(String name) throws JIException
{
    JICallBuilder callObject = new JICallBuilder(true);
    callObject.setOpnum(2);
    callObject.addInParamAsString(name, JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR);
    comObject.call(callObject);
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:8,代碼來源:IOPCGroupStateMgt.java

示例8: 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

示例9: changeBrowsePosition

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public void changeBrowsePosition(short direction, String string) throws JIException {
    JICallBuilder callObject = new JICallBuilder(true);
    callObject.setOpnum(1);
    callObject.addInParamAsShort(direction, JIFlags.FLAG_NULL);
    callObject.addInParamAsString(string, JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR);
    comObject.call(callObject);
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:8,代碼來源:IOPCBrowseServerAddressSpace.java

示例10: getItemId

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public String getItemId(String itemDataId) throws JIException {
    JICallBuilder callObject = new JICallBuilder(true);
    callObject.setOpnum(3);
    callObject.addInParamAsString(itemDataId, JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR);
    callObject.addOutParamAsObject(new JIPointer(new JIString(JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR)), JIFlags.FLAG_NULL);
    Object[] result = comObject.call(callObject);
    return ((JIString) ((JIPointer) result[0]).getReferent()).getString();
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:9,代碼來源:IOPCBrowseServerAddressSpace.java

示例11: setClientName

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public void setClientName(String name) throws JIException
{
    JICallBuilder callObject = new JICallBuilder(true);
    callObject.setOpnum(METHOD_INDEX_IOPCCommon_SetClientName);
    callObject.addInParamAsString(name, JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR);
    comObject.call(callObject);
    if (callObject.isError())
        throw new JIException(callObject.getHRESULT());
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:10,代碼來源:IOPCCommon.java

示例12: getItemID

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
/**
 * Get the complete item id from an item at the local position.
 * 
 * Browsing a hierarchical namespace the browse method will return items based on the
 * local level in the namespace. So actually only the last part of the item ID hierarchy
 * is returned. In order to convert this to the full item ID one can use this method. It
 * will only work if the browser is still at the position in question. 
 * 
 * @param item the local item
 * @return the complete item ID
 * @throws JIException
 */
public String getItemID ( final String item ) throws JIException
{
    JICallBuilder callObject = new JICallBuilder ( true );
    callObject.setOpnum ( 3 );

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

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

    return ( (JIString) ( (JIPointer)result[0] ).getReferent () ).getString ();
}
 
開發者ID:luoyan35714,項目名稱:OPC_Client,代碼行數:25,代碼來源:OPCBrowseServerAddressSpace.java

示例13: getItemProperties

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public ResultTable<Integer, JIVariant> getItemProperties(String itemId, int[] propertyIds) throws JIException {
    JICallBuilder callObject = new JICallBuilder(true);
    callObject.setOpnum(1);
    callObject.addInParamAsString(itemId, JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR);
    callObject.addInParamAsInt(propertyIds.length, JIFlags.FLAG_NULL);
    Integer[] idsArr = new Integer[propertyIds.length];
    for (int i = 0; i < propertyIds.length; i++) {
        idsArr[i] = propertyIds[i];
    }
    callObject.addInParamAsArray(new JIArray(idsArr), JIFlags.FLAG_NULL);
    callObject.addOutParamAsObject(new JIPointer(new JIArray(JIVariant.class, null, 1, 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;
        }
    }

    JIVariant[] values = (JIVariant[]) ((JIArray) ((JIPointer) result[0]).getReferent()).getArrayInstance();
    Integer[] errorCodes = (Integer[]) ((JIArray) ((JIPointer) result[1]).getReferent()).getArrayInstance();
    ResultTable<Integer, JIVariant> resultTable = new ResultTable<>();
    for (int i = 0; i < propertyIds.length; i++) {
        resultTable.put(propertyIds[i], values[i], errorCodes[i]);
    }
    return resultTable;
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:33,代碼來源:IOPCItemProperties.java

示例14: setTCharArray

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public void setTCharArray()
    throws JIException, InterruptedException, UnknownHostException {
    System.gc();
    JICallBuilder callObject = new JICallBuilder( true);
    callObject.setOpnum(7);
    Object results[];
    callObject.addInParamAsString("AHHHHHHH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR);

    results = comObject.call(callObject);
}
 
開發者ID:howie,項目名稱:jinterop,代碼行數:11,代碼來源:SampleTestServer.java

示例15: setClientName

import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public void setClientName ( final String clientName ) throws JIException
{
    JICallBuilder callObject = new JICallBuilder ( true );
    callObject.setOpnum ( 4 );

    callObject.addInParamAsString ( clientName, JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR );

    getCOMObject ().call ( callObject );
}
 
開發者ID:luoyan35714,項目名稱:OPC_Client,代碼行數:10,代碼來源:OPCCommon.java


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