com.moesol.bindings.platform_sdk.component_services
Interface IUnknown

All Known Subinterfaces:
_ADO, _Collection, _Collection, _Command, _Connection, _DAO, _DBEngine, _DispOnly, _DispOnly, _DynaCollection, _DynaCollection, _Field, _Group, _Index, _Parameter, _QueryDef, _Record, _Recordset, _Relation, _Stream, _TableDef, _User, ADOCommandConstruction, ADOConnectionConstruction, ADOConnectionConstruction15, ADORecordConstruction, ADORecordsetConstruction, ADOStreamConstruction, Command15, Command25, Connection, Connection15, ConnectionEvents, ConnectionEventsVt, Connections, Container, Containers, Database, Databases, DispWithProperties, DispWithProperties, Document, Documents, DTestServerEvents, DTestServerEvents, Error, Error, Errors, Errors, Field, Field15, Field20, Fields, Fields, Fields15, Fields20, Filter, Filters, Groups, IClassFactory, IDispatch, IDispOnly, IDispOnly, IDual, IDual, IDual2, IDual2, IExtraDual, IExtraDual, IJetEngine, Indexes, IndexFields, IReplica, Parameter, Parameters, Parameters, Properties, Properties, Property, Property, QueryDefs, Recordset, Recordset15, Recordset20, Recordset21, RecordsetEvents, RecordsetEventsVt, Recordsets, Relations, TableDefs, Users, Workspace, Workspaces
All Known Implementing Classes:
_ADO.Jni, _Collection.Jni, _Collection.Jni, _Command.Jni, _Connection.Jni, _DAO.Jni, _DBEngine.Jni, _DispOnly.Jni, _DispOnly.Jni, _DynaCollection.Jni, _DynaCollection.Jni, _Field.Jni, _Group.Jni, _Index.Jni, _Parameter.Jni, _QueryDef.Jni, _Record.Jni, _Recordset.Jni, _Relation.Jni, _Stream.Jni, _TableDef.Jni, _User.Jni, ADOCommandConstruction.Jni, ADOConnectionConstruction.Jni, ADOConnectionConstruction15.Jni, ADORecordConstruction.Jni, ADORecordsetConstruction.Jni, ADOStreamConstruction.Jni, ComClassFactory, ComClassFactory.InternalUnknown, ComControl, ComDebugFrame.TestObject, ComDelegatingSink, ComDispatchSink, Command, Command.Jni, Command15.Jni, Command25.Jni, ComObject, Connection, Connection.Jni, Connection.Jni, Connection15.Jni, ConnectionEvents.Jni, ConnectionEventsVt.Jni, Connections.Jni, Container.Jni, Containers.Jni, Database.Jni, Databases.Jni, DBEngine, DBEngine.Jni, DispOnly, DispOnly, DispOnly.Jni, DispOnly.Jni, DispWithProperties.Jni, DispWithProperties.Jni, Document.Jni, Documents.Jni, DTestServerEvents.Jni, DTestServerEvents.Jni, Dual, Dual, Dual.Jni, Dual.Jni, Error.Jni, Error.Jni, Errors.Jni, Errors.Jni, Field, Field.Jni, Field.Jni, Field15.Jni, Field20.Jni, Fields.Jni, Fields.Jni, Fields15.Jni, Fields20.Jni, Filter.Jni, Filters.Jni, Group, Group.Jni, Groups.Jni, IClassFactory.Jni, IDispatch.Jni, IDispOnly.Jni, IDispOnly.Jni, IDual.Jni, IDual.Jni, IDual2.Jni, IDual2.Jni, IExtraDual.Jni, IExtraDual.Jni, IGlobalInterfaceTable, IJetEngine.Jni, Index, Index.Jni, Indexes.Jni, IndexFields.Jni, IReplica.Jni, IUnknown.Jni, JetEngine, JetEngine.Jni, Parameter, Parameter.Jni, Parameter.Jni, Parameters.Jni, Parameters.Jni, PrivDBEngine, PrivDBEngine.Jni, Properties.Jni, Properties.Jni, Property.Jni, Property.Jni, QueryDef, QueryDef.Jni, QueryDefs.Jni, Record, Record.Jni, Recordset, Recordset.Jni, Recordset.Jni, Recordset15.Jni, Recordset20.Jni, Recordset21.Jni, RecordsetEvents.Jni, RecordsetEventsVt.Jni, Recordsets.Jni, Relation, Relation.Jni, Relations.Jni, Replica, Replica.Jni, Stream, Stream.Jni, TableDef, TableDef.Jni, TableDefs.Jni, User, User.Jni, Users.Jni, Workspace.Jni, Workspaces.Jni

public interface IUnknown

See IUnknown in MSDN


Nested Class Summary
static class IUnknown.Disp
           
static class IUnknown.Jni
          Java to COM implementation.
 
Field Summary
static GUID IID
          IID for Unknown {00000000-0000-0000-C000-000000000046}
static Class TYPELIB
           
 
Method Summary
 IUnknown QueryInterface(Class iface_class)
          Call IUnknown::QueryInterface on the native COM pointer.
 void QueryInterface(Object[] out_iface)
          Call IUnknown::QueryInterface on the native COM pointer.
 int Release()
          Calls the native COM interfaces IUnknown::Release method and make this equivalent to NULL.
 

Field Detail

TYPELIB

static final Class TYPELIB

IID

static final GUID IID
IID for Unknown {00000000-0000-0000-C000-000000000046}

Method Detail

QueryInterface

void QueryInterface(Object[] out_iface)
Call IUnknown::QueryInterface on the native COM pointer. By convention out parameters are passed as an array of size one. This method extracts the IID from out_iface, so you should pass in an array of the type of interface you want. For example,
 IUnknown unknown = an_unknown_argument;
 IFooInterface[] out_foo_interface = { null };
 unknown.QueryInterface(out_foo_interface);
 try {
        out_foo_interface[0].BarMethodOnFoo();
 } finally {
        out_foo_interface[0].Release();
  out_foo_interface[0] = null;
 }
 

Parameters:
out_iface - Object array of size one to receive the new interface. The result of the QueryInterface is placed in out_iface[0[

QueryInterface

IUnknown QueryInterface(Class iface_class)
Call IUnknown::QueryInterface on the native COM pointer. The returned interface should be released with a call to Release. The finalize method will try to call Release for you on the same thread that the interface was created on. You must cast the return value to the same type as described by iface_class.
 IUnknown unknown = an_unknown_argument;
 IFooInterface foo_interface = null;
 foo_interface = (IFooInterface) unknown.QueryInterface(IFooInterface.class);
 try {
        foo_interface.BarMethodOnFoo();
 } finally {
        foo_interface.Release();
 }
 

Parameters:
iface_class - Class to QueryInterface to, must have a static IID field
Returns:
Result of QueryInterface.

Release

int Release()
Calls the native COM interfaces IUnknown::Release method and make this equivalent to NULL. Calling COM methods after this call will throw a COMException. If this object referered to a valid native COM interface before the call, this method causes the COM unreleased count to be reduced by one when the interface is released.

Returns:
an integer which may represent the remaining numbers of references on the COM object. See IUknown for more details.


Copyright © 2004 Moebius Solutions, Inc. All Rights Reserved.