com.jniwrapper.win32.com.impl
Class IMessageFilterImpl

java.lang.Object
  extended bycom.jniwrapper.Parameter
      extended bycom.jniwrapper.win32.com.impl.IUnknownImpl
          extended bycom.jniwrapper.win32.com.impl.IMessageFilterImpl
All Implemented Interfaces:
AutoDeleteParameter, IMessageFilter, IUnknown, PointerParameter

public class IMessageFilterImpl
extends IUnknownImpl
implements IMessageFilter

Represents COM interface IMessageFilter.


Nested Class Summary
 
Nested classes inherited from class com.jniwrapper.win32.com.impl.IUnknownImpl
IUnknownImpl.MemoryBufferImpl
 
Field Summary
static java.lang.String INTERFACE_IDENTIFIER
           
 
Fields inherited from class com.jniwrapper.win32.com.impl.IUnknownImpl
DebugComfyJ, LICENSE_TYPE, PTR_NULL
 
Fields inherited from class com.jniwrapper.Parameter
V
 
Constructor Summary
  IMessageFilterImpl()
           
  IMessageFilterImpl(CLSID clsid, ClsCtx dwClsContext)
           
  IMessageFilterImpl(CLSID clsid, IUnknownImpl pUnkOuter, ClsCtx dwClsContext)
           
  IMessageFilterImpl(IUnknown that)
           
protected IMessageFilterImpl(IUnknownImpl that)
           
 
Method Summary
 java.lang.Object clone()
           
 IID getIID()
           
 UInt32 handleInComingCall(UInt32 dwCallType, Pointer.Void htaskCaller, UInt32 dwTickCount, INTERFACEINFO lpInterfaceInfo)
          This method is an object-based method that provides the ability to filter or reject incoming calls (or call backs) to an object or a process.
 UInt32 messagePending(Pointer.Void htaskCallee, UInt32 dwTickCount, UInt32 dwPendingType)
          This client-based method is called by COM when a Windows message appears in a COM application's message queue while the application is waiting for a reply to a remote call.
 UInt32 retryRejectedCall(Pointer.Void htaskCallee, UInt32 dwTickCount, UInt32 dwRejectType)
          This client-based method gives the application an opportunity to display a dialog box so the user can retry or cancel the call, or switch to the task identified by threadIDCallee.
 
Methods inherited from class com.jniwrapper.win32.com.impl.IUnknownImpl
acceptIOPerformer, addRef, asVoidPointer, dumpVTBL, equals, fromVoidPointer, getDebugInfo, getInterfaceIdentifier, getLength, hashCode, invokeStandardVirtualMethod, invokeStandardVirtualMethod, invokeStandardVirtualMethod, invokeStandardVirtualMethod, invokeStandardVirtualMethod, invokeStandardVirtualMethod, invokeStandardVirtualMethod, invokeVirtualMethod, invokeVirtualMethod, invokeVirtualMethod, invokeVirtualMethod, invokeVirtualMethod, invokeVirtualMethod, isAutoDelete, isNull, isSameObject, queryInterface, queryInterface, read, release, setAutoDelete, setNull, setValue, write
 
Methods inherited from class com.jniwrapper.Parameter
, a, a, asReturnValue, b, dataBufferAssigned, getAlignedLength, getAlignmentRequirement, getDataBuffer, getDataBufferOffset, indent, pop, push, read, read, setDataBuffer, toByteArray, write
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jniwrapper.win32.com.IUnknown
addRef, isNull, queryInterface, release, setNull
 
Methods inherited from interface com.jniwrapper.AutoDeleteParameter
isAutoDelete, setAutoDelete
 

Field Detail

INTERFACE_IDENTIFIER

public static final java.lang.String INTERFACE_IDENTIFIER
See Also:
Constant Field Values
Constructor Detail

IMessageFilterImpl

public IMessageFilterImpl()

IMessageFilterImpl

protected IMessageFilterImpl(IUnknownImpl that)
                      throws ComException

IMessageFilterImpl

public IMessageFilterImpl(IUnknown that)
                   throws ComException

IMessageFilterImpl

public IMessageFilterImpl(CLSID clsid,
                          ClsCtx dwClsContext)
                   throws ComException

IMessageFilterImpl

public IMessageFilterImpl(CLSID clsid,
                          IUnknownImpl pUnkOuter,
                          ClsCtx dwClsContext)
                   throws ComException
Method Detail

handleInComingCall

public UInt32 handleInComingCall(UInt32 dwCallType,
                                 Pointer.Void htaskCaller,
                                 UInt32 dwTickCount,
                                 INTERFACEINFO lpInterfaceInfo)
Description copied from interface: IMessageFilter
This method is an object-based method that provides the ability to filter or reject incoming calls (or call backs) to an object or a process.

This method is called prior to each method invocation originating outside the current process.

Specified by:
handleInComingCall in interface IMessageFilter
Parameters:
dwCallType - Kind of incoming call that has been received. Valid values are from the enumeration CallType
htaskCaller - Handle of the task calling this task.
dwTickCount - Elapsed tick count since the outgoing call was made if dwCallType is not CallType.CALLTYPE_TOPLEVEL.

If dwCallType is CallType. CALLTYPE_TOPLEVEL, dwTickCount should be ignored.

lpInterfaceInfo - An INTERFACEINFO structure, which identifies the object, the interface, and the method making the call.

In the case of DDE calls, lpInterfaceInfo can be NULL because the DDE layer does not return interface information.

Returns:
  • ServerCall.SERVERCALL_ISHANDLED - The application might be able to process the call.
  • ServerCall.SERVERCALL_REJECTED - The application cannot handle the call due to an unforeseen problem, such as network unavailability, or if it is in the process of terminating.
  • ServerCall.SERVERCALL_RETRYLATER - The application cannot handle the call at this time. For example, an application might return this value when it is in a user-controlled modal state.

  • retryRejectedCall

    public UInt32 retryRejectedCall(Pointer.Void htaskCallee,
                                    UInt32 dwTickCount,
                                    UInt32 dwRejectType)
    Description copied from interface: IMessageFilter
    This client-based method gives the application an opportunity to display a dialog box so the user can retry or cancel the call, or switch to the task identified by threadIDCallee.

    Specified by:
    retryRejectedCall in interface IMessageFilter
    Parameters:
    htaskCallee - Handle of the server task that rejected the call.
    dwTickCount - Number of elapsed ticks since the call was made.
    dwRejectType - Specifies either ServerCall.SERVERCALL_REJECTED or ServerCall.SERVERCALL_RETRYLATER, as returned by the object application.
    Returns:
  • -1: The call should be canceled. COM then returns RPC_E_CALL_REJECTED from the original method call.
  • Value >= 0 and <100: The call is to be retried immediately.
  • Value >= 100: COM will wait for this many milliseconds and then retry the call

  • messagePending

    public UInt32 messagePending(Pointer.Void htaskCallee,
                                 UInt32 dwTickCount,
                                 UInt32 dwPendingType)
    Description copied from interface: IMessageFilter
    This client-based method is called by COM when a Windows message appears in a COM application's message queue while the application is waiting for a reply to a remote call.

    Handling input while waiting for an outgoing call to finish can introduce complications. The application should determine whether to process the message without interrupting the call, continue waiting, or cancel the operation.

    Specified by:
    messagePending in interface IMessageFilter
    Parameters:
    htaskCallee - Task handle of the called application that has not yet responded.
    dwTickCount - Number of ticks since the call was made.
    dwPendingType - Type of call made during which a message or event was received.
    Returns:
  • PENDINGMSG_CANCELCALL: Cancel the outgoing call.
  • PENDINGMSG_WAITNOPROCESS: Continue waiting for the reply and do not dispatch the message unless it is a task-switching or window-activation message.
  • PENDINGMSG_WAITDEFPROCESS: Because of the increased resources available in 32-bit systems, you are unlikely to get this return value. It now indicates the same state as PENDINGMSG_WAITNOPROCESS.

  • getIID

    public IID getIID()
    Overrides:
    getIID in class IUnknownImpl

    clone

    public java.lang.Object clone()
    Overrides:
    clone in class IUnknownImpl