本文整理汇总了Java中org.jinterop.dcom.core.IJIComObject类的典型用法代码示例。如果您正苦于以下问题:Java IJIComObject类的具体用法?Java IJIComObject怎么用?Java IJIComObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IJIComObject类属于org.jinterop.dcom.core包,在下文中一共展示了IJIComObject类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: addGroup
import org.jinterop.dcom.core.IJIComObject; //导入依赖的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: createGroupEnumerator
import org.jinterop.dcom.core.IJIComObject; //导入依赖的package包/类
public IJIComObject createGroupEnumerator(short scope, String iid) throws JIException
{
assert iid != null : "IID may not be null";
JICallBuilder callObject = new JICallBuilder(true);
callObject.setOpnum(METHOD_INDEX_IOPCServer_CreateGroupEnumerator);
callObject.addInParamAsShort(scope, JIFlags.FLAG_REPRESENTATION_UNSIGNED_INT);
callObject.addInParamAsUUID(iid, JIFlags.FLAG_NULL);
callObject.addOutParamAsType(IJIComObject.class, JIFlags.FLAG_NULL); // out param ppUnk
try
{
Object[] result = comObject.call(callObject);
return JIObjectFactory.narrowObject((IJIComObject) result[0]);
} catch (JIException ex)
{
if (ex.getErrorCode() == 1/*S_FALSE*/)
return JIObjectFactory.narrowObject((IJIComObject) callObject.getResultsInCaseOfException()[0]);
else
throw ex;
}
}
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:21,代码来源:IOPCServer.java
示例3: browseOPCItemIDs
import org.jinterop.dcom.core.IJIComObject; //导入依赖的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
示例4: main
import org.jinterop.dcom.core.IJIComObject; //导入依赖的package包/类
public static void main(String[] args) {
try {
JISession session = JISession.createSession();
JIComServer comServer = new JIComServer(JIClsid.valueOf("00024500-0000-0000-C000-000000000046"), session);
IJIComObject comObject = comServer.createInstance();
int h = 0;
// SSPIJNIClient jniClient = SSPIJNIClient.getInstance();
// byte[] type1Message = jniClient.invokePrepareSSORequest();
// jcifs.util.Hexdump.hexdump(System.out, type1Message, 0, type1Message.length);
// int h = 0;
//
// jniClient.invokeUnInitialize();
//
// type1Message = new Type1Message().toByteArray();
// jcifs.util.Hexdump.hexdump(System.out, type1Message, 0, type1Message.length);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
开发者ID:howie,项目名称:jinterop,代码行数:25,代码来源:TestWinNativeSSO.java
示例5: addGroup
import org.jinterop.dcom.core.IJIComObject; //导入依赖的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: callRespectSFALSE
import org.jinterop.dcom.core.IJIComObject; //导入依赖的package包/类
/**
* Make the COM call but do not treat S_FALSE as error condition for the whole call
* @param object the object to make to call on
* @param callObject the call object
* @return the result of the call
* @throws JIException
*/
public static Object[] callRespectSFALSE ( final IJIComObject object, final JICallBuilder callObject ) throws JIException
{
try
{
return object.call ( callObject );
}
catch ( JIException e )
{
if ( e.getErrorCode () != org.openscada.opc.dcom.common.Constants.S_FALSE )
{
throw e;
}
return callObject.getResultsInCaseOfException ();
}
}
开发者ID:luoyan35714,项目名称:OPC_Client,代码行数:23,代码来源:Helper.java
示例7: NavigateComplete2
import org.jinterop.dcom.core.IJIComObject; //导入依赖的package包/类
public void NavigateComplete2(
IJIComObject pDisp,
JIVariant URL) throws JIException
{
pDisp = JIObjectFactory.narrowObject(pDisp);
JIVariant realURL = URL;
while (realURL.isByRefFlagSet())
{
realURL = realURL.getObjectAsVariant();
}
System.out.println("NavigateComplete2 -> " + pDisp.getInterfaceIdentifier() + " , " + realURL.getObjectAsString().getString());
}
开发者ID:howie,项目名称:jinterop,代码行数:14,代码来源:DWebBrowserEvents2.java
示例8: cloneGroup
import org.jinterop.dcom.core.IJIComObject; //导入依赖的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: getPublicGroupByName
import org.jinterop.dcom.core.IJIComObject; //导入依赖的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
示例10: createEnumerator
import org.jinterop.dcom.core.IJIComObject; //导入依赖的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
示例11: MSEnumVariant
import org.jinterop.dcom.core.IJIComObject; //导入依赖的package包/类
public MSEnumVariant(String address,String[] args) throws JIException, UnknownHostException
{
session = JISession.createSession(args[1],args[2],args[3]);
comServer = new JIComServer(JIProgId.valueOf("StdCollection.VBCollection"),address,session);
IJIComObject object = comServer.createInstance();
dispatch = (IJIDispatch)JIObjectFactory.narrowObject(object.queryInterface(IJIDispatch.IID));
}
开发者ID:howie,项目名称:jinterop,代码行数:9,代码来源:MSEnumVariant.java
示例12: Clone
import org.jinterop.dcom.core.IJIComObject; //导入依赖的package包/类
public IEnumString Clone() throws JIException
{
JICallBuilder callObject = new JICallBuilder(true);
callObject.setOpnum(3);
callObject.addOutParamAsObject(IJIComObject.class, JIFlags.FLAG_NULL);
Object[] result = comObject.call(callObject);
return new IEnumString((IJIComObject) result[0]);
}
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:9,代码来源:IEnumString.java
示例13: SampleTestServer
import org.jinterop.dcom.core.IJIComObject; //导入依赖的package包/类
public SampleTestServer(String address, String[] args) throws JIException, UnknownHostException {
this.address = address;
session = JISession.createSession(args[1], args[2], args[3]);
comStub = new JIComServer(JIProgId.valueOf("SampleTestServer.TestServer"), address, session);
IJIComObject unknown = comStub.createInstance();
comObject = (IJIComObject) unknown.queryInterface("1F438B1C-02BA-462E-A971-8E0640C141E5"); //ITestServer
}
开发者ID:howie,项目名称:jinterop,代码行数:8,代码来源:SampleTestServer.java
示例14: enumConnectionPoints
import org.jinterop.dcom.core.IJIComObject; //导入依赖的package包/类
public IJIComObject enumConnectionPoints() throws JIException
{
JICallBuilder callObj = new JICallBuilder(true);
callObj.setOpnum(0);
callObj.addOutParamAsType(IJIComObject.class, JIFlags.FLAG_NULL);
Object[] result = comObject.call(callObj);
return JIObjectFactory.narrowObject((IJIComObject) result[0]);
}
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:9,代码来源:IConnectionPointContainer.java
示例15: findConnectionPoint
import org.jinterop.dcom.core.IJIComObject; //导入依赖的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
示例16: next
import org.jinterop.dcom.core.IJIComObject; //导入依赖的package包/类
public IJIComObject[] next(int celt) throws JIException
{
JICallBuilder callObject = new JICallBuilder(true);
callObject.setOpnum(0);
callObject.addInParamAsInt(celt, JIFlags.FLAG_NULL);
callObject.addOutParamAsObject(new JIArray(new JIPointer(IJIComObject.class, true), null, 1, true, true), JIFlags.FLAG_NULL);
callObject.addOutParamAsType(Integer.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;
}
Integer count = (Integer) result[1];
if (count == null)
throw new NullPointerException("Elements count is null");
JIPointer[] pointers = (JIPointer[]) ((JIArray) (result[0])).getArrayInstance();
IJIComObject[] returned = new IJIComObject[pointers.length];
for (int i = 0; i < pointers.length; i++)
returned[i] = JIObjectFactory.narrowObject((IJIComObject) pointers[i].getReferent());
return returned;
}
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:28,代码来源:IEnumConnectionPoints.java
示例17: Clone
import org.jinterop.dcom.core.IJIComObject; //导入依赖的package包/类
public IJIComObject Clone() throws JIException
{
JICallBuilder callObject = new JICallBuilder(true);
callObject.setOpnum(3);
callObject.addOutParamAsObject(IJIComObject.class, JIFlags.FLAG_NULL);
Object[] result = comObject.call(callObject);
return (IJIComObject) result[0];
}
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:9,代码来源:IEnumConnectionPoints.java
示例18: NavigateError
import org.jinterop.dcom.core.IJIComObject; //导入依赖的package包/类
public JIVariant NavigateError(
IJIComObject pDisp,
JIVariant URL,
JIVariant Frame,
JIVariant StatusCode,
JIVariant Cancel) throws JIException
{
System.out.println("NavigateError - > " + URL.getObjectAsString());
return Cancel;
}
开发者ID:howie,项目名称:jinterop,代码行数:11,代码来源:DWebBrowserEvents2.java
示例19: MSWMI2
import org.jinterop.dcom.core.IJIComObject; //导入依赖的package包/类
public MSWMI2(String address, String[] args) throws JIException, UnknownHostException
{
this.address = address;
session = JISession.createSession(args[1],args[2],args[3]);
// session.useSessionSecurity(true);
// session.setGlobalSocketTimeout(5000);
comStub = new JIComServer(JIClsid.valueOf("76a64158-cb41-11d1-8b02-00600806d9b6"),address,session);
IJIComObject unknown = comStub.createInstance();
comObject = (IJIComObject)unknown.queryInterface("76A6415B-CB41-11d1-8B02-00600806D9B6");//ISWbemLocator
//This will obtain the dispatch interface
dispatch = (IJIDispatch)JIObjectFactory.narrowObject(comObject.queryInterface(IJIDispatch.IID));
}
开发者ID:howie,项目名称:jinterop,代码行数:13,代码来源:MSWMI2.java
示例20: getTypeInfo
import org.jinterop.dcom.core.IJIComObject; //导入依赖的package包/类
public IJITypeInfo getTypeInfo(int typeInfo) throws JIException
{
JICallBuilder obj = new JICallBuilder(true);
obj.setOpnum(1);
obj.addInParamAsInt(typeInfo,JIFlags.FLAG_NULL);
obj.addInParamAsInt(0x400,JIFlags.FLAG_NULL);
obj.addOutParamAsType(IJIComObject.class,JIFlags.FLAG_NULL);
//obj.setUpParams(new Object[]{new Integer(typeInfo),new Integer(0x400)},new Object[]{MInterfacePointer.class},JIFlags.FLAG_NULL,JIFlags.FLAG_NULL);
Object[] result = comObject.call(obj);
return (IJITypeInfo)JIObjectFactory.narrowObject((IJIComObject)result[0]);
}
开发者ID:howie,项目名称:jinterop,代码行数:12,代码来源:JIDispatchImpl.java
注:本文中的org.jinterop.dcom.core.IJIComObject类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论