本文整理匯總了Java中org.jinterop.dcom.core.JICallBuilder.addInParamAsPointer方法的典型用法代碼示例。如果您正苦於以下問題:Java JICallBuilder.addInParamAsPointer方法的具體用法?Java JICallBuilder.addInParamAsPointer怎麽用?Java JICallBuilder.addInParamAsPointer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jinterop.dcom.core.JICallBuilder
的用法示例。
在下文中一共展示了JICallBuilder.addInParamAsPointer方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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]));
}
示例2: setState
import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public Integer setState(GroupState state) throws JIException
{
JICallBuilder callObject = new JICallBuilder(true);
callObject.setOpnum(1);
callObject.addInParamAsPointer(new JIPointer(state.getUpdateRate()), JIFlags.FLAG_NULL);
callObject.addOutParamAsType(Integer.class, JIFlags.FLAG_NULL);
if (state.isActive() != null)
callObject.addInParamAsPointer(new JIPointer(Integer.valueOf(state.isActive().booleanValue() ? 1 : 0)), JIFlags.FLAG_NULL);
else
callObject.addInParamAsPointer(new JIPointer(null), JIFlags.FLAG_NULL);
callObject.addInParamAsPointer(new JIPointer(state.getTimeBias()), JIFlags.FLAG_NULL);
callObject.addInParamAsPointer(new JIPointer(state.getPercentDeadband()), JIFlags.FLAG_NULL);
callObject.addInParamAsPointer(new JIPointer(state.getLocaleId()), JIFlags.FLAG_NULL);
callObject.addInParamAsPointer(new JIPointer(state.getClientHandle()), JIFlags.FLAG_NULL);
Object[] result = comObject.call(callObject);
return (Integer) result[0];
}
示例3: setState
import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
/**
* Set the group state Leaving any of the parameters <code>null</code> will keep the current value untouched.
*
* @param requestedUpdateRate
* the requested update rate
* @param active
* Flag if the group is active or not
* @param timeBias
* The time bias
* @param percentDeadband
* the deadband percent
* @param localeID
* the locale ID
* @param clientHandle
* the client handle
* @return the granted update rate
* @throws JIException
*/
public int setState ( final Integer requestedUpdateRate, final Boolean active, final Integer timeBias, final Float percentDeadband, final Integer localeID, final Integer clientHandle ) throws JIException
{
final JICallBuilder callObject = new JICallBuilder ( true );
callObject.setOpnum ( 1 );
callObject.addInParamAsPointer ( new JIPointer ( requestedUpdateRate ), JIFlags.FLAG_NULL );
if ( active != null )
{
callObject.addInParamAsPointer ( new JIPointer ( Integer.valueOf ( active.booleanValue () ? 1 : 0 ) ), JIFlags.FLAG_NULL );
}
else
{
callObject.addInParamAsPointer ( new JIPointer ( null ), JIFlags.FLAG_NULL );
}
callObject.addInParamAsPointer ( new JIPointer ( timeBias ), JIFlags.FLAG_NULL );
callObject.addInParamAsPointer ( new JIPointer ( percentDeadband ), JIFlags.FLAG_NULL );
callObject.addInParamAsPointer ( new JIPointer ( localeID ), JIFlags.FLAG_NULL );
callObject.addInParamAsPointer ( new JIPointer ( clientHandle ), JIFlags.FLAG_NULL );
callObject.addOutParamAsType ( Integer.class, JIFlags.FLAG_NULL );
final Object[] result = getCOMObject ().call ( callObject );
return (Integer)result[0];
}
示例4: 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] );
}
示例5: 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());
}
示例6: execute
import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public void execute() throws JIException
{
unknown = comStub.createInstance();
//CLSID of IITestCOMServer
IJIComObject comObject = (IJIComObject)unknown.queryInterface("4AE62432-FD04-4BF9-B8AC-56AA12A47FF9");
dispatch = (IJIDispatch)JIObjectFactory.narrowObject(comObject.queryInterface(IJIDispatch.IID));
//Now call via automation
Object results[] = dispatch.callMethodA("Add",new Object[]{new Integer(1), new Integer(2), new JIVariant(0,true)});
System.out.println(results[1]);
//now without automation
JICallBuilder callObject = new JICallBuilder();
callObject.setOpnum(1);//obtained from the IDL or TypeLib.
callObject.addInParamAsInt(1,JIFlags.FLAG_NULL);
callObject.addInParamAsInt(2,JIFlags.FLAG_NULL);
callObject.addInParamAsPointer(new JIPointer(new Integer(0)),JIFlags.FLAG_NULL);
//Since the retval is a top level pointer , it will get replaced with it's base type.
callObject.addOutParamAsObject(Integer.class,JIFlags.FLAG_NULL);
results = comObject.call(callObject);
System.out.println(results[0]);
JISession.destroySession(dispatch.getAssociatedSession());
}
示例7: enumClassesOfCategories
import org.jinterop.dcom.core.JICallBuilder; //導入方法依賴的package包/類
public EnumGUID enumClassesOfCategories ( final UUID[] implemented, final UUID[] required ) throws IllegalArgumentException, UnknownHostException, JIException
{
// ** CALL
JICallBuilder callObject = new JICallBuilder ( true );
callObject.setOpnum ( 0 );
// ** IN
callObject.addInParamAsInt ( implemented.length, JIFlags.FLAG_NULL );
if ( implemented.length == 0 )
{
callObject.addInParamAsPointer ( new JIPointer ( null ), JIFlags.FLAG_NULL );
}
else
{
callObject.addInParamAsArray ( new JIArray ( implemented, true ), JIFlags.FLAG_NULL );
}
callObject.addInParamAsInt ( required.length, JIFlags.FLAG_NULL );
if ( required.length == 0 )
{
callObject.addInParamAsPointer ( new JIPointer ( null ), JIFlags.FLAG_NULL );
}
else
{
callObject.addInParamAsArray ( new JIArray ( required, true ), JIFlags.FLAG_NULL );
}
// ** OUT
callObject.addOutParamAsType ( IJIComObject.class, JIFlags.FLAG_NULL );
// ** RESULT
Object result[] = Helper.callRespectSFALSE ( getCOMObject (), callObject );
return new EnumGUID ( (IJIComObject)result[0] );
}