|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jniwrapper.util.FunctionCache com.jniwrapper.win32.WinFunctionCache com.jniwrapper.win32.com.ComFunctions
This class provides wrappers for functions from OLEAUT32 library and service routines for JNIWrapper COM integration.
Method Summary | |
static void |
coCancelCall(int threadId,
int timeout)
Requests cancellation of an outbound DCOM method call pending on a specified thread. |
static GUID |
coCreateGuid()
Returns GUID, unique identifier associated with a COM class, and interface. |
static IUnknown |
coCreateInstance(CLSID clsid,
IUnknown pUnkOuter,
ClsCtx dwClsContext)
Creates a COM object of a specified class. |
static void |
coCreateInstance(CLSID clsid,
IUnknown pUnkOuter,
ClsCtx dwClsContext,
IID iid,
IUnknown pReqInterface)
Creates a COM object of a specified class. |
static void |
coCreateInstance(CLSID clsid,
IUnknown pUnkOuter,
ClsCtx dwClsContext,
IUnknown pReqInterface)
Creates a COM object of a specified class. |
static void |
coCreateInstanceEx(CLSID clsid,
IUnknown pUnkOuter,
ClsCtx dwClsContext,
CoServerInfo serverInfo,
IUnknownImpl pReqInterface)
Creates a COM object of a specified class. |
static void |
coFreeLibrary(Handle libraryHandle)
Frees the specified library. |
static void |
coFreeUnusedLibraries()
Unloads all libraries that are no longer in use. |
static void |
coGetClassObject(CLSID clsid,
ClsCtx dwClsContext,
Pointer.Void pvReserved,
IUnknown ppv)
Returns a pointer to the interface for a class object associated with a COM class. |
static void |
coGetObject(java.lang.String name,
IUnknownImpl ppv)
Converts a display name into a moniker that identifies the object named, and then binds to the object identified by the moniker. |
static void |
coInitialize()
Initializes a COM library for the current thread using a single-thread appartment concurrency model. |
static void |
coInitializeEx(CoInit value)
Initializes a COM library for the current thread using the passed concurrency model specification. |
static Handle |
coLoadLibrary(java.io.File library)
Loads the specified library into the current process. |
static UInt32 |
coRegisterClassObject(CLSID clsid,
IUnknown pUnk,
ClsCtx dwClsContext,
RegCls flags)
Registers EXE class object so that other applications can connect to it. |
static IMessageFilterImpl |
coRegisterMessageFilter(IMessageFilterImpl msgFilter)
Registers with OLE the instance of an IMessageFilter interface, which is to be used for handling concurrency issues on the current thread. |
static void |
coRevokeClassObject(UInt32 dwRegister)
Informs OLE that a class object previously registered with the coRegisterClassObject(com.jniwrapper.win32.com.types.CLSID, com.jniwrapper.win32.com.IUnknown, com.jniwrapper.win32.com.types.ClsCtx, com.jniwrapper.win32.com.types.RegCls) function is no longer available for use. |
static Pointer.Void |
coTaskMemAlloc(ULongInt cb)
Allocates a block of task memory. |
static void |
coTaskMemFree(Pointer.Void pv)
Frees a block of task memory previously allocated through a call to the coTaskMemAlloc(com.jniwrapper.ULongInt) or coTaskMemRealloc(com.jniwrapper.Pointer.Void, com.jniwrapper.ULongInt) function. |
static void |
coTaskMemFree(Pointer pointer)
Frees a block of task memory previously allocated through a call to the coTaskMemAlloc(com.jniwrapper.ULongInt) or coTaskMemRealloc(com.jniwrapper.Pointer.Void, com.jniwrapper.ULongInt) function. |
static Pointer.Void |
coTaskMemRealloc(Pointer.Void pv,
ULongInt cb)
Changes the size of a previously allocated block of task memory. |
static void |
coUninitialize()
Closes a COM library for the current thread and performs all necessary clean-up actions. |
static IMoniker |
createClassMoniker(CLSID clsid)
Creates a class moniker that refers to the given class. |
static ICreateErrorInfo |
createErrorInfo()
Creates an instance of a generic error object. |
static IMoniker |
createFileMoniker(java.io.File filePath)
Creates a file moniker based on the specified path. |
static IMoniker |
createGenericComposite(IMoniker first,
IMoniker rest)
Performs a generic composition of two monikers and supplies a pointer to the resulting composite moniker. |
static IMoniker |
createItemMoniker(java.lang.String delimiter,
java.lang.String item)
Creates an item moniker that identifies an object within a containing object (typically a compound document). |
static IMoniker |
createObjrefMoniker(IUnknown unk)
Creates an OBJREF moniker based on a pointer to an object. |
static IMoniker |
createPointerMoniker(IUnknown unk)
Creates a pointer moniker based on a pointer to an object. |
static IUnknown |
getActiveObject(CLSID clsid)
Retrieves a running object that has been registered with OLE. |
static CLSID |
getClassFromFile(java.lang.String fileName)
Returns CLSID associated with a filename. |
static IErrorInfo |
getErrorInfo()
This function retrieves the error information pointer set by the previous call to SetErrorInfo in the current logical thread. |
static HResult |
getErrorInfo(IErrorInfoImpl resErrorInfo)
This function retrieves the error information pointer set by the previous call to SetErrorInfo in the current logical thread. |
static ComFunctions |
getInstance()
|
static IRunningObjectTable |
getRunningObjectTable()
Supplies a pointer to the IRunningObjectTable interface on the local Running Object Table (ROT). |
static long |
registerActiveObject(IUnknown unknown,
CLSID clsid,
boolean strong)
Registers an object as the active object for its class. |
static void |
revokeActiveObject(long handle)
Ends an object's status as active. |
static void |
setErrorInfo(IErrorInfo errinfo)
Sets the error information object for the current logical thread of execution. |
static BStr |
sysAllocString(BStr str)
Allocates a new string and copies the passed string into it |
static void |
sysFreeString(BStr str)
Deallocates a string allocated previously by sysAllocString(com.jniwrapper.win32.automation.types.BStr) |
Methods inherited from class com.jniwrapper.win32.WinFunctionCache |
isUnicode, setUnicode, setupEncoding |
Methods inherited from class com.jniwrapper.util.FunctionCache |
getFunction, getVariable |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static ComFunctions getInstance()
public static void coInitialize() throws ComException
ComException
- Microsoft
COM SDK documentationpublic static void coInitializeEx(CoInit value)
value
- concurrency model specification.public static void coUninitialize()
public static void coCreateInstance(CLSID clsid, IUnknown pUnkOuter, ClsCtx dwClsContext, IUnknown pReqInterface) throws ComException
clsid
- CLSID associated with a COM class.pUnkOuter
- a pointer to IUnknown interface for an aggregate object.dwClsContext
- context in which the executable code is run.pReqInterface
- a pointer to the interface for a created object.
Both the value passed to the method and the returned value point to the
same interface.
ComException
-
Microsoft COM SDK Documentationpublic static void coCreateInstance(CLSID clsid, IUnknown pUnkOuter, ClsCtx dwClsContext, IID iid, IUnknown pReqInterface) throws ComException
clsid
- CLSID associated with a COM class.pUnkOuter
- a pointer to IUnknown interface for an aggregate object.dwClsContext
- context in which the executable code is run.iid
- identifier of the interface to be used to communicate with the object.pReqInterface
- a pointer to the interface for a created object.
Both the value passed to the method and the returned value point to the
same interface.
ComException
-
Microsoft COM SDK Documentationpublic static void coCreateInstanceEx(CLSID clsid, IUnknown pUnkOuter, ClsCtx dwClsContext, CoServerInfo serverInfo, IUnknownImpl pReqInterface)
clsid
- CLSID associated with a COM class.pUnkOuter
- a pointer to IUnknown interface for an aggregate object.dwClsContext
- context in which the executable code is run.serverInfo
- information about the computer on which to instantiate the object. May be NULLpReqInterface
- a pointer to the interface for a created object.
Both the value passed to the method and the returned value point to the
same interface.
ComException
-
Microsoft COM SDK Documentationpublic static void coGetClassObject(CLSID clsid, ClsCtx dwClsContext, Pointer.Void pvReserved, IUnknown ppv) throws ComException
clsid
- CLSID associated with a COM class.dwClsContext
- context in which the executable code is run.pvReserved
- a pointer to the computer on which to instantiate a
class object.ppv
- a pointer to the interface for a class object.
ComException
-
Microsoft COM SDK Documentationpublic static void coGetObject(java.lang.String name, IUnknownImpl ppv)
name
- display nameppv
- interface to be createdpublic static UInt32 coRegisterClassObject(CLSID clsid, IUnknown pUnk, ClsCtx dwClsContext, RegCls flags) throws ComException
clsid
- CLSID associated with a COM class.pUnk
- a pointer to unknown interface for a class object of the
registered class.dwClsContext
- context in which the executable code is run.flags
- a type of connection to a class object.
ComException
-
Microsoft COM SDK Documentation.public static void coRevokeClassObject(UInt32 dwRegister) throws ComException
coRegisterClassObject(com.jniwrapper.win32.com.types.CLSID, com.jniwrapper.win32.com.IUnknown, com.jniwrapper.win32.com.types.ClsCtx, com.jniwrapper.win32.com.types.RegCls)
function is no longer available for use.
dwRegister
- a value previously returned by the coRegisterClassObject(com.jniwrapper.win32.com.types.CLSID, com.jniwrapper.win32.com.IUnknown, com.jniwrapper.win32.com.types.ClsCtx, com.jniwrapper.win32.com.types.RegCls)
method.
ComException
-
Microsoft COM SDK Documentationpublic static IUnknown coCreateInstance(CLSID clsid, IUnknown pUnkOuter, ClsCtx dwClsContext) throws ComException
clsid
- CLSID associated with a COM class.pUnkOuter
- a pointer to the IUnknown interface for an aggregate
object.dwClsContext
- context in which the executable code is run.
ComException
-
Microsoft COM SDK Documentationpublic static GUID coCreateGuid() throws ComException
ComException
-
Microsoft COM SDK Documentationpublic static BStr sysAllocString(BStr str)
str
- A zero-terminated string to copy.
public static void sysFreeString(BStr str)
sysAllocString(com.jniwrapper.win32.automation.types.BStr)
str
- Previously allocated BSTR. If bstr is NULL, the function simply returns.public static Pointer.Void coTaskMemAlloc(ULongInt cb)
cb
- Size, in bytes, of the memory block to be allocated.
public static Pointer.Void coTaskMemRealloc(Pointer.Void pv, ULongInt cb)
pv
- Pointer to the memory block to be reallocated.cb
- Size, in bytes, of the memory block to be reallocated.
public static void coTaskMemFree(Pointer.Void pv)
coTaskMemAlloc(com.jniwrapper.ULongInt)
or coTaskMemRealloc(com.jniwrapper.Pointer.Void, com.jniwrapper.ULongInt)
function.
pv
- Pointer to the memory block to be freed.public static void coTaskMemFree(Pointer pointer)
coTaskMemAlloc(com.jniwrapper.ULongInt)
or coTaskMemRealloc(com.jniwrapper.Pointer.Void, com.jniwrapper.ULongInt)
function.
pointer
- Pointer to the memory block to be freed.public static CLSID getClassFromFile(java.lang.String fileName) throws ComException
fileName
- a filename for which CLSID is returned.
ComException
-
Microsoft COM SDK Documentationpublic static IUnknown getActiveObject(CLSID clsid)
clsid
- a class identifier of the active object from the OLE
registration database.
public static long registerActiveObject(IUnknown unknown, CLSID clsid, boolean strong) throws ComException
unknown
- interface of the active objectclsid
- CLSID of the active objectstrong
- flag that controls registration of the object. Value true corresponds to
#ACTIVEOBJECT_STRONG
and false to #ACTIVEOBJECT_WEAK
native constants
revokeActiveObject(long)
method
ComException
-
Microsoft COM SDK Documentationpublic static void revokeActiveObject(long handle) throws ComException
handle
- handle previously returned by registerActiveObject(com.jniwrapper.win32.com.IUnknown, com.jniwrapper.win32.com.types.CLSID, boolean)
) method.
ComException
-
Microsoft COM SDK Documentationpublic static void coCancelCall(int threadId, int timeout) throws ComException
threadId
- Identifier of the thread on which the pending DCOM call is to be canceled.timeout
- Number of seconds CoCancelCall waits for the server to complete the outbound call.
ComException
-
Microsoft COM SDK Documentationpublic static Handle coLoadLibrary(java.io.File library)
library
- library file
public static void coFreeLibrary(Handle libraryHandle)
libraryHandle
- library handle to be freedpublic static void coFreeUnusedLibraries()
public static HResult getErrorInfo(IErrorInfoImpl resErrorInfo)
resErrorInfo
- system-implemented generic error object
public static IErrorInfo getErrorInfo() throws ComException
ComException
-
Microsoft COM SDK Documentationpublic static void setErrorInfo(IErrorInfo errinfo) throws ComException
errinfo
- error object.
ComException
-
Microsoft COM SDK Documentationpublic static ICreateErrorInfo createErrorInfo() throws ComException
ComException
-
Microsoft COM SDK Documentationpublic static IMessageFilterImpl coRegisterMessageFilter(IMessageFilterImpl msgFilter)
msgFilter
- interface on the message filter.
ComException
-
Microsoft COM SDK Documentationpublic static IRunningObjectTable getRunningObjectTable() throws ComException
IRunningObjectTable
interface on the local Running Object Table (ROT).
ComException
-
Microsoft COM SDK Documentationpublic static IMoniker createItemMoniker(java.lang.String delimiter, java.lang.String item) throws ComException
delimiter
- zero-terminated string containing the delimiter (typically "!")
used to separate this item's display name from the display name of its containing object.item
- zero-terminated string indicating the containing object's name for the object
being identified.
ComException
-
Microsoft COM SDK Documentationpublic static IMoniker createClassMoniker(CLSID clsid) throws ComException
clsid
- Reference to the CLSID of the object type to which this moniker binds.
ComException
-
Microsoft COM SDK Documentationpublic static IMoniker createFileMoniker(java.io.File filePath) throws ComException
filePath
- path on which this moniker is based.
ComException
-
Microsoft COM SDK Documentationpublic static IMoniker createObjrefMoniker(IUnknown unk) throws ComException
unk
- interface on the object that the moniker is to represent.
ComException
-
Microsoft COM SDK Documentationpublic static IMoniker createPointerMoniker(IUnknown unk) throws ComException
unk
- interface on the object to be identified by the resulting moniker.
ComException
-
Microsoft COM SDK Documentationpublic static IMoniker createGenericComposite(IMoniker first, IMoniker rest) throws ComException
first
- moniker to be composed to the left of the moniker that "rest" points to.
Can point to any kind of moniker, including a generic composite.rest
- moniker to be composed to the right of the moniker that "first" points to.
Can point to any kind of moniker compatible with the type of the "rest" moniker,
including a generic composite.
ComException
-
Microsoft COM SDK Documentation
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |