/*** Autogenerated by WIDL 11.13 from /home/runner/build_wine/wine/include/rtscom.idl - Do not edit ***/

#ifdef _WIN32
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 475
#endif
#include <rpc.h>
#include <rpcndr.h>
#endif

#ifndef COM_NO_WINDOWS_H
#include <windows.h>
#include <ole2.h>
#endif

#ifndef __rtscom_h__
#define __rtscom_h__

/* Forward declarations */

#ifndef __IStylusPlugin_FWD_DEFINED__
#define __IStylusPlugin_FWD_DEFINED__
typedef interface IStylusPlugin IStylusPlugin;
#ifdef __cplusplus
interface IStylusPlugin;
#endif /* __cplusplus */
#endif

#ifndef __IStylusSyncPlugin_FWD_DEFINED__
#define __IStylusSyncPlugin_FWD_DEFINED__
typedef interface IStylusSyncPlugin IStylusSyncPlugin;
#ifdef __cplusplus
interface IStylusSyncPlugin;
#endif /* __cplusplus */
#endif

#ifndef __IStylusAsyncPlugin_FWD_DEFINED__
#define __IStylusAsyncPlugin_FWD_DEFINED__
typedef interface IStylusAsyncPlugin IStylusAsyncPlugin;
#ifdef __cplusplus
interface IStylusAsyncPlugin;
#endif /* __cplusplus */
#endif

#ifndef __IRealTimeStylus_FWD_DEFINED__
#define __IRealTimeStylus_FWD_DEFINED__
typedef interface IRealTimeStylus IRealTimeStylus;
#ifdef __cplusplus
interface IRealTimeStylus;
#endif /* __cplusplus */
#endif

#ifndef __RealTimeStylus_FWD_DEFINED__
#define __RealTimeStylus_FWD_DEFINED__
#ifdef __cplusplus
typedef class RealTimeStylus RealTimeStylus;
#else
typedef struct RealTimeStylus RealTimeStylus;
#endif /* defined __cplusplus */
#endif /* defined __RealTimeStylus_FWD_DEFINED__ */

/* Headers for imported files */

#include <oaidl.h>
#include <msinkaut.h>
#include <tpcshrd.h>

#ifdef __cplusplus
extern "C" {
#endif

#ifndef __IRealTimeStylus_FWD_DEFINED__
#define __IRealTimeStylus_FWD_DEFINED__
typedef interface IRealTimeStylus IRealTimeStylus;
#ifdef __cplusplus
interface IRealTimeStylus;
#endif /* __cplusplus */
#endif

typedef DWORD CURSOR_ID;
typedef CURSOR_ID STYLUS_ID;
typedef enum StylusQueue {
    SyncStylusQueue = 0x1,
    AsyncStylusQueueImmediate = 0x2,
    AsyncStylusQueue = 0x3
} StylusQueue;
typedef struct StylusInfo {
    TABLET_CONTEXT_ID tcid;
    STYLUS_ID cid;
    BOOL bIsInvertedCursor;
} StylusInfo;
typedef enum RealTimeStylusDataInterest {
    RTSDI_AllData = 0xffffffff,
    RTSDI_None = 0,
    RTSDI_Error = 0x1,
    RTSDI_RealTimeStylusEnabled = 0x2,
    RTSDI_RealTimeStylusDisabled = 0x4,
    RTSDI_StylusNew = 0x8,
    RTSDI_StylusInRange = 0x10,
    RTSDI_InAirPackets = 0x20,
    RTSDI_StylusOutOfRange = 0x40,
    RTSDI_StylusDown = 0x80,
    RTSDI_Packets = 0x100,
    RTSDI_StylusUp = 0x200,
    RTSDI_StylusButtonUp = 0x400,
    RTSDI_StylusButtonDown = 0x800,
    RTSDI_SystemEvents = 0x1000,
    RTSDI_TabletAdded = 0x2000,
    RTSDI_TabletRemoved = 0x4000,
    RTSDI_CustomStylusDataAdded = 0x8000,
    RTSDI_UpdateMapping = 0x10000,
    RTSDI_DefaultEvents = (((((RTSDI_RealTimeStylusEnabled | RTSDI_RealTimeStylusDisabled) | RTSDI_StylusDown) | RTSDI_Packets) | RTSDI_StylusUp) | RTSDI_SystemEvents) | RTSDI_CustomStylusDataAdded
} RealTimeStylusDataInterest;
/*****************************************************************************
 * IStylusPlugin interface
 */
#ifndef __IStylusPlugin_INTERFACE_DEFINED__
#define __IStylusPlugin_INTERFACE_DEFINED__

DEFINE_GUID(IID_IStylusPlugin, 0xa81436d8, 0x4757, 0x4fd1, 0xa1,0x85, 0x13,0x3f,0x97,0xc6,0xc5,0x45);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("a81436d8-4757-4fd1-a185-133f97c6c545")
IStylusPlugin : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE RealTimeStylusEnabled(
        IRealTimeStylus *piRtsSrc,
        ULONG cTcidCount,
        const TABLET_CONTEXT_ID *pTcids) = 0;

    virtual HRESULT STDMETHODCALLTYPE RealTimeStylusDisabled(
        IRealTimeStylus *piRtsSrc,
        ULONG cTcidCount,
        const TABLET_CONTEXT_ID *pTcids) = 0;

    virtual HRESULT STDMETHODCALLTYPE StylusInRange(
        IRealTimeStylus *piRtsSrc,
        TABLET_CONTEXT_ID tcid,
        STYLUS_ID sid) = 0;

    virtual HRESULT STDMETHODCALLTYPE StylusOutOfRange(
        IRealTimeStylus *piRtsSrc,
        TABLET_CONTEXT_ID tcid,
        STYLUS_ID sid) = 0;

    virtual HRESULT STDMETHODCALLTYPE StylusDown(
        IRealTimeStylus *piRtsSrc,
        const StylusInfo *pStylusInfo,
        ULONG cPropCountPerPkt,
        LONG *pPacket,
        LONG **ppInOutPkt) = 0;

    virtual HRESULT STDMETHODCALLTYPE StylusUp(
        IRealTimeStylus *piRtsSrc,
        const StylusInfo *pStylusInfo,
        ULONG cPropCountPerPkt,
        LONG *pPacket,
        LONG **ppInOutPkt) = 0;

    virtual HRESULT STDMETHODCALLTYPE StylusButtonDown(
        IRealTimeStylus *piRtsSrc,
        STYLUS_ID sid,
        const GUID *pGuidStylusButton,
        POINT *pStylusPos) = 0;

    virtual HRESULT STDMETHODCALLTYPE StylusButtonUp(
        IRealTimeStylus *piRtsSrc,
        STYLUS_ID sid,
        const GUID *pGuidStylusButton,
        POINT *pStylusPos) = 0;

    virtual HRESULT STDMETHODCALLTYPE InAirPackets(
        IRealTimeStylus *piRtsSrc,
        const StylusInfo *pStylusInfo,
        ULONG cPktCount,
        ULONG cPktBuffLength,
        LONG *pPackets,
        ULONG *pcInOutPkts,
        LONG **ppInOutPkts) = 0;

    virtual HRESULT STDMETHODCALLTYPE Packets(
        IRealTimeStylus *piRtsSrc,
        const StylusInfo *pStylusInfo,
        ULONG cPktCount,
        ULONG cPktBuffLength,
        LONG *pPackets,
        ULONG *pcInOutPkts,
        LONG **ppInOutPkts) = 0;

    virtual HRESULT STDMETHODCALLTYPE CustomStylusDataAdded(
        IRealTimeStylus *piRtsSrc,
        const GUID *pGuidId,
        ULONG cbData,
        const BYTE *pbData) = 0;

    virtual HRESULT STDMETHODCALLTYPE SystemEvent(
        IRealTimeStylus *piRtsSrc,
        TABLET_CONTEXT_ID tcid,
        STYLUS_ID sid,
        SYSTEM_EVENT event,
        SYSTEM_EVENT_DATA eventdata) = 0;

    virtual HRESULT STDMETHODCALLTYPE TabletAdded(
        IRealTimeStylus *piRtsSrc,
        IInkTablet *piTablet) = 0;

    virtual HRESULT STDMETHODCALLTYPE TabletRemoved(
        IRealTimeStylus *piRtsSrc,
        LONG iTabletIndex) = 0;

    virtual HRESULT STDMETHODCALLTYPE Error(
        IRealTimeStylus *piRtsSrc,
        IStylusPlugin *piPlugin,
        RealTimeStylusDataInterest dataInterest,
        HRESULT hrErrorCode,
        LONG_PTR *lptrKey) = 0;

    virtual HRESULT STDMETHODCALLTYPE UpdateMapping(
        IRealTimeStylus *piRtsSrc) = 0;

    virtual HRESULT STDMETHODCALLTYPE DataInterest(
        RealTimeStylusDataInterest *pDataInterest) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(IStylusPlugin, 0xa81436d8, 0x4757, 0x4fd1, 0xa1,0x85, 0x13,0x3f,0x97,0xc6,0xc5,0x45)
#endif
#else
typedef struct IStylusPluginVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IStylusPlugin *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IStylusPlugin *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IStylusPlugin *This);

    /*** IStylusPlugin methods ***/
    HRESULT (STDMETHODCALLTYPE *RealTimeStylusEnabled)(
        IStylusPlugin *This,
        IRealTimeStylus *piRtsSrc,
        ULONG cTcidCount,
        const TABLET_CONTEXT_ID *pTcids);

    HRESULT (STDMETHODCALLTYPE *RealTimeStylusDisabled)(
        IStylusPlugin *This,
        IRealTimeStylus *piRtsSrc,
        ULONG cTcidCount,
        const TABLET_CONTEXT_ID *pTcids);

    HRESULT (STDMETHODCALLTYPE *StylusInRange)(
        IStylusPlugin *This,
        IRealTimeStylus *piRtsSrc,
        TABLET_CONTEXT_ID tcid,
        STYLUS_ID sid);

    HRESULT (STDMETHODCALLTYPE *StylusOutOfRange)(
        IStylusPlugin *This,
        IRealTimeStylus *piRtsSrc,
        TABLET_CONTEXT_ID tcid,
        STYLUS_ID sid);

    HRESULT (STDMETHODCALLTYPE *StylusDown)(
        IStylusPlugin *This,
        IRealTimeStylus *piRtsSrc,
        const StylusInfo *pStylusInfo,
        ULONG cPropCountPerPkt,
        LONG *pPacket,
        LONG **ppInOutPkt);

    HRESULT (STDMETHODCALLTYPE *StylusUp)(
        IStylusPlugin *This,
        IRealTimeStylus *piRtsSrc,
        const StylusInfo *pStylusInfo,
        ULONG cPropCountPerPkt,
        LONG *pPacket,
        LONG **ppInOutPkt);

    HRESULT (STDMETHODCALLTYPE *StylusButtonDown)(
        IStylusPlugin *This,
        IRealTimeStylus *piRtsSrc,
        STYLUS_ID sid,
        const GUID *pGuidStylusButton,
        POINT *pStylusPos);

    HRESULT (STDMETHODCALLTYPE *StylusButtonUp)(
        IStylusPlugin *This,
        IRealTimeStylus *piRtsSrc,
        STYLUS_ID sid,
        const GUID *pGuidStylusButton,
        POINT *pStylusPos);

    HRESULT (STDMETHODCALLTYPE *InAirPackets)(
        IStylusPlugin *This,
        IRealTimeStylus *piRtsSrc,
        const StylusInfo *pStylusInfo,
        ULONG cPktCount,
        ULONG cPktBuffLength,
        LONG *pPackets,
        ULONG *pcInOutPkts,
        LONG **ppInOutPkts);

    HRESULT (STDMETHODCALLTYPE *Packets)(
        IStylusPlugin *This,
        IRealTimeStylus *piRtsSrc,
        const StylusInfo *pStylusInfo,
        ULONG cPktCount,
        ULONG cPktBuffLength,
        LONG *pPackets,
        ULONG *pcInOutPkts,
        LONG **ppInOutPkts);

    HRESULT (STDMETHODCALLTYPE *CustomStylusDataAdded)(
        IStylusPlugin *This,
        IRealTimeStylus *piRtsSrc,
        const GUID *pGuidId,
        ULONG cbData,
        const BYTE *pbData);

    HRESULT (STDMETHODCALLTYPE *SystemEvent)(
        IStylusPlugin *This,
        IRealTimeStylus *piRtsSrc,
        TABLET_CONTEXT_ID tcid,
        STYLUS_ID sid,
        SYSTEM_EVENT event,
        SYSTEM_EVENT_DATA eventdata);

    HRESULT (STDMETHODCALLTYPE *TabletAdded)(
        IStylusPlugin *This,
        IRealTimeStylus *piRtsSrc,
        IInkTablet *piTablet);

    HRESULT (STDMETHODCALLTYPE *TabletRemoved)(
        IStylusPlugin *This,
        IRealTimeStylus *piRtsSrc,
        LONG iTabletIndex);

    HRESULT (STDMETHODCALLTYPE *Error)(
        IStylusPlugin *This,
        IRealTimeStylus *piRtsSrc,
        IStylusPlugin *piPlugin,
        RealTimeStylusDataInterest dataInterest,
        HRESULT hrErrorCode,
        LONG_PTR *lptrKey);

    HRESULT (STDMETHODCALLTYPE *UpdateMapping)(
        IStylusPlugin *This,
        IRealTimeStylus *piRtsSrc);

    HRESULT (STDMETHODCALLTYPE *DataInterest)(
        IStylusPlugin *This,
        RealTimeStylusDataInterest *pDataInterest);

    END_INTERFACE
} IStylusPluginVtbl;

interface IStylusPlugin {
    CONST_VTBL IStylusPluginVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define IStylusPlugin_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IStylusPlugin_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IStylusPlugin_Release(This) (This)->lpVtbl->Release(This)
/*** IStylusPlugin methods ***/
#define IStylusPlugin_RealTimeStylusEnabled(This,piRtsSrc,cTcidCount,pTcids) (This)->lpVtbl->RealTimeStylusEnabled(This,piRtsSrc,cTcidCount,pTcids)
#define IStylusPlugin_RealTimeStylusDisabled(This,piRtsSrc,cTcidCount,pTcids) (This)->lpVtbl->RealTimeStylusDisabled(This,piRtsSrc,cTcidCount,pTcids)
#define IStylusPlugin_StylusInRange(This,piRtsSrc,tcid,sid) (This)->lpVtbl->StylusInRange(This,piRtsSrc,tcid,sid)
#define IStylusPlugin_StylusOutOfRange(This,piRtsSrc,tcid,sid) (This)->lpVtbl->StylusOutOfRange(This,piRtsSrc,tcid,sid)
#define IStylusPlugin_StylusDown(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt) (This)->lpVtbl->StylusDown(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt)
#define IStylusPlugin_StylusUp(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt) (This)->lpVtbl->StylusUp(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt)
#define IStylusPlugin_StylusButtonDown(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos) (This)->lpVtbl->StylusButtonDown(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos)
#define IStylusPlugin_StylusButtonUp(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos) (This)->lpVtbl->StylusButtonUp(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos)
#define IStylusPlugin_InAirPackets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts) (This)->lpVtbl->InAirPackets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts)
#define IStylusPlugin_Packets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts) (This)->lpVtbl->Packets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts)
#define IStylusPlugin_CustomStylusDataAdded(This,piRtsSrc,pGuidId,cbData,pbData) (This)->lpVtbl->CustomStylusDataAdded(This,piRtsSrc,pGuidId,cbData,pbData)
#define IStylusPlugin_SystemEvent(This,piRtsSrc,tcid,sid,event,eventdata) (This)->lpVtbl->SystemEvent(This,piRtsSrc,tcid,sid,event,eventdata)
#define IStylusPlugin_TabletAdded(This,piRtsSrc,piTablet) (This)->lpVtbl->TabletAdded(This,piRtsSrc,piTablet)
#define IStylusPlugin_TabletRemoved(This,piRtsSrc,iTabletIndex) (This)->lpVtbl->TabletRemoved(This,piRtsSrc,iTabletIndex)
#define IStylusPlugin_Error(This,piRtsSrc,piPlugin,dataInterest,hrErrorCode,lptrKey) (This)->lpVtbl->Error(This,piRtsSrc,piPlugin,dataInterest,hrErrorCode,lptrKey)
#define IStylusPlugin_UpdateMapping(This,piRtsSrc) (This)->lpVtbl->UpdateMapping(This,piRtsSrc)
#define IStylusPlugin_DataInterest(This,pDataInterest) (This)->lpVtbl->DataInterest(This,pDataInterest)
#else
/*** IUnknown methods ***/
static inline HRESULT IStylusPlugin_QueryInterface(IStylusPlugin* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static inline ULONG IStylusPlugin_AddRef(IStylusPlugin* This) {
    return This->lpVtbl->AddRef(This);
}
static inline ULONG IStylusPlugin_Release(IStylusPlugin* This) {
    return This->lpVtbl->Release(This);
}
/*** IStylusPlugin methods ***/
static inline HRESULT IStylusPlugin_RealTimeStylusEnabled(IStylusPlugin* This,IRealTimeStylus *piRtsSrc,ULONG cTcidCount,const TABLET_CONTEXT_ID *pTcids) {
    return This->lpVtbl->RealTimeStylusEnabled(This,piRtsSrc,cTcidCount,pTcids);
}
static inline HRESULT IStylusPlugin_RealTimeStylusDisabled(IStylusPlugin* This,IRealTimeStylus *piRtsSrc,ULONG cTcidCount,const TABLET_CONTEXT_ID *pTcids) {
    return This->lpVtbl->RealTimeStylusDisabled(This,piRtsSrc,cTcidCount,pTcids);
}
static inline HRESULT IStylusPlugin_StylusInRange(IStylusPlugin* This,IRealTimeStylus *piRtsSrc,TABLET_CONTEXT_ID tcid,STYLUS_ID sid) {
    return This->lpVtbl->StylusInRange(This,piRtsSrc,tcid,sid);
}
static inline HRESULT IStylusPlugin_StylusOutOfRange(IStylusPlugin* This,IRealTimeStylus *piRtsSrc,TABLET_CONTEXT_ID tcid,STYLUS_ID sid) {
    return This->lpVtbl->StylusOutOfRange(This,piRtsSrc,tcid,sid);
}
static inline HRESULT IStylusPlugin_StylusDown(IStylusPlugin* This,IRealTimeStylus *piRtsSrc,const StylusInfo *pStylusInfo,ULONG cPropCountPerPkt,LONG *pPacket,LONG **ppInOutPkt) {
    return This->lpVtbl->StylusDown(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt);
}
static inline HRESULT IStylusPlugin_StylusUp(IStylusPlugin* This,IRealTimeStylus *piRtsSrc,const StylusInfo *pStylusInfo,ULONG cPropCountPerPkt,LONG *pPacket,LONG **ppInOutPkt) {
    return This->lpVtbl->StylusUp(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt);
}
static inline HRESULT IStylusPlugin_StylusButtonDown(IStylusPlugin* This,IRealTimeStylus *piRtsSrc,STYLUS_ID sid,const GUID *pGuidStylusButton,POINT *pStylusPos) {
    return This->lpVtbl->StylusButtonDown(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos);
}
static inline HRESULT IStylusPlugin_StylusButtonUp(IStylusPlugin* This,IRealTimeStylus *piRtsSrc,STYLUS_ID sid,const GUID *pGuidStylusButton,POINT *pStylusPos) {
    return This->lpVtbl->StylusButtonUp(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos);
}
static inline HRESULT IStylusPlugin_InAirPackets(IStylusPlugin* This,IRealTimeStylus *piRtsSrc,const StylusInfo *pStylusInfo,ULONG cPktCount,ULONG cPktBuffLength,LONG *pPackets,ULONG *pcInOutPkts,LONG **ppInOutPkts) {
    return This->lpVtbl->InAirPackets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts);
}
static inline HRESULT IStylusPlugin_Packets(IStylusPlugin* This,IRealTimeStylus *piRtsSrc,const StylusInfo *pStylusInfo,ULONG cPktCount,ULONG cPktBuffLength,LONG *pPackets,ULONG *pcInOutPkts,LONG **ppInOutPkts) {
    return This->lpVtbl->Packets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts);
}
static inline HRESULT IStylusPlugin_CustomStylusDataAdded(IStylusPlugin* This,IRealTimeStylus *piRtsSrc,const GUID *pGuidId,ULONG cbData,const BYTE *pbData) {
    return This->lpVtbl->CustomStylusDataAdded(This,piRtsSrc,pGuidId,cbData,pbData);
}
static inline HRESULT IStylusPlugin_SystemEvent(IStylusPlugin* This,IRealTimeStylus *piRtsSrc,TABLET_CONTEXT_ID tcid,STYLUS_ID sid,SYSTEM_EVENT event,SYSTEM_EVENT_DATA eventdata) {
    return This->lpVtbl->SystemEvent(This,piRtsSrc,tcid,sid,event,eventdata);
}
static inline HRESULT IStylusPlugin_TabletAdded(IStylusPlugin* This,IRealTimeStylus *piRtsSrc,IInkTablet *piTablet) {
    return This->lpVtbl->TabletAdded(This,piRtsSrc,piTablet);
}
static inline HRESULT IStylusPlugin_TabletRemoved(IStylusPlugin* This,IRealTimeStylus *piRtsSrc,LONG iTabletIndex) {
    return This->lpVtbl->TabletRemoved(This,piRtsSrc,iTabletIndex);
}
static inline HRESULT IStylusPlugin_Error(IStylusPlugin* This,IRealTimeStylus *piRtsSrc,IStylusPlugin *piPlugin,RealTimeStylusDataInterest dataInterest,HRESULT hrErrorCode,LONG_PTR *lptrKey) {
    return This->lpVtbl->Error(This,piRtsSrc,piPlugin,dataInterest,hrErrorCode,lptrKey);
}
static inline HRESULT IStylusPlugin_UpdateMapping(IStylusPlugin* This,IRealTimeStylus *piRtsSrc) {
    return This->lpVtbl->UpdateMapping(This,piRtsSrc);
}
static inline HRESULT IStylusPlugin_DataInterest(IStylusPlugin* This,RealTimeStylusDataInterest *pDataInterest) {
    return This->lpVtbl->DataInterest(This,pDataInterest);
}
#endif
#endif

#endif


#endif  /* __IStylusPlugin_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IStylusSyncPlugin interface
 */
#ifndef __IStylusSyncPlugin_INTERFACE_DEFINED__
#define __IStylusSyncPlugin_INTERFACE_DEFINED__

DEFINE_GUID(IID_IStylusSyncPlugin, 0xa157b174, 0x482f, 0x4d71, 0xa3,0xf6, 0x3a,0x41,0xdd,0xd1,0x1b,0xe9);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("a157b174-482f-4d71-a3f6-3a41ddd11be9")
IStylusSyncPlugin : public IStylusPlugin
{
};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(IStylusSyncPlugin, 0xa157b174, 0x482f, 0x4d71, 0xa3,0xf6, 0x3a,0x41,0xdd,0xd1,0x1b,0xe9)
#endif
#else
typedef struct IStylusSyncPluginVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IStylusSyncPlugin *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IStylusSyncPlugin *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IStylusSyncPlugin *This);

    /*** IStylusPlugin methods ***/
    HRESULT (STDMETHODCALLTYPE *RealTimeStylusEnabled)(
        IStylusSyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        ULONG cTcidCount,
        const TABLET_CONTEXT_ID *pTcids);

    HRESULT (STDMETHODCALLTYPE *RealTimeStylusDisabled)(
        IStylusSyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        ULONG cTcidCount,
        const TABLET_CONTEXT_ID *pTcids);

    HRESULT (STDMETHODCALLTYPE *StylusInRange)(
        IStylusSyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        TABLET_CONTEXT_ID tcid,
        STYLUS_ID sid);

    HRESULT (STDMETHODCALLTYPE *StylusOutOfRange)(
        IStylusSyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        TABLET_CONTEXT_ID tcid,
        STYLUS_ID sid);

    HRESULT (STDMETHODCALLTYPE *StylusDown)(
        IStylusSyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        const StylusInfo *pStylusInfo,
        ULONG cPropCountPerPkt,
        LONG *pPacket,
        LONG **ppInOutPkt);

    HRESULT (STDMETHODCALLTYPE *StylusUp)(
        IStylusSyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        const StylusInfo *pStylusInfo,
        ULONG cPropCountPerPkt,
        LONG *pPacket,
        LONG **ppInOutPkt);

    HRESULT (STDMETHODCALLTYPE *StylusButtonDown)(
        IStylusSyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        STYLUS_ID sid,
        const GUID *pGuidStylusButton,
        POINT *pStylusPos);

    HRESULT (STDMETHODCALLTYPE *StylusButtonUp)(
        IStylusSyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        STYLUS_ID sid,
        const GUID *pGuidStylusButton,
        POINT *pStylusPos);

    HRESULT (STDMETHODCALLTYPE *InAirPackets)(
        IStylusSyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        const StylusInfo *pStylusInfo,
        ULONG cPktCount,
        ULONG cPktBuffLength,
        LONG *pPackets,
        ULONG *pcInOutPkts,
        LONG **ppInOutPkts);

    HRESULT (STDMETHODCALLTYPE *Packets)(
        IStylusSyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        const StylusInfo *pStylusInfo,
        ULONG cPktCount,
        ULONG cPktBuffLength,
        LONG *pPackets,
        ULONG *pcInOutPkts,
        LONG **ppInOutPkts);

    HRESULT (STDMETHODCALLTYPE *CustomStylusDataAdded)(
        IStylusSyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        const GUID *pGuidId,
        ULONG cbData,
        const BYTE *pbData);

    HRESULT (STDMETHODCALLTYPE *SystemEvent)(
        IStylusSyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        TABLET_CONTEXT_ID tcid,
        STYLUS_ID sid,
        SYSTEM_EVENT event,
        SYSTEM_EVENT_DATA eventdata);

    HRESULT (STDMETHODCALLTYPE *TabletAdded)(
        IStylusSyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        IInkTablet *piTablet);

    HRESULT (STDMETHODCALLTYPE *TabletRemoved)(
        IStylusSyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        LONG iTabletIndex);

    HRESULT (STDMETHODCALLTYPE *Error)(
        IStylusSyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        IStylusPlugin *piPlugin,
        RealTimeStylusDataInterest dataInterest,
        HRESULT hrErrorCode,
        LONG_PTR *lptrKey);

    HRESULT (STDMETHODCALLTYPE *UpdateMapping)(
        IStylusSyncPlugin *This,
        IRealTimeStylus *piRtsSrc);

    HRESULT (STDMETHODCALLTYPE *DataInterest)(
        IStylusSyncPlugin *This,
        RealTimeStylusDataInterest *pDataInterest);

    END_INTERFACE
} IStylusSyncPluginVtbl;

interface IStylusSyncPlugin {
    CONST_VTBL IStylusSyncPluginVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define IStylusSyncPlugin_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IStylusSyncPlugin_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IStylusSyncPlugin_Release(This) (This)->lpVtbl->Release(This)
/*** IStylusPlugin methods ***/
#define IStylusSyncPlugin_RealTimeStylusEnabled(This,piRtsSrc,cTcidCount,pTcids) (This)->lpVtbl->RealTimeStylusEnabled(This,piRtsSrc,cTcidCount,pTcids)
#define IStylusSyncPlugin_RealTimeStylusDisabled(This,piRtsSrc,cTcidCount,pTcids) (This)->lpVtbl->RealTimeStylusDisabled(This,piRtsSrc,cTcidCount,pTcids)
#define IStylusSyncPlugin_StylusInRange(This,piRtsSrc,tcid,sid) (This)->lpVtbl->StylusInRange(This,piRtsSrc,tcid,sid)
#define IStylusSyncPlugin_StylusOutOfRange(This,piRtsSrc,tcid,sid) (This)->lpVtbl->StylusOutOfRange(This,piRtsSrc,tcid,sid)
#define IStylusSyncPlugin_StylusDown(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt) (This)->lpVtbl->StylusDown(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt)
#define IStylusSyncPlugin_StylusUp(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt) (This)->lpVtbl->StylusUp(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt)
#define IStylusSyncPlugin_StylusButtonDown(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos) (This)->lpVtbl->StylusButtonDown(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos)
#define IStylusSyncPlugin_StylusButtonUp(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos) (This)->lpVtbl->StylusButtonUp(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos)
#define IStylusSyncPlugin_InAirPackets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts) (This)->lpVtbl->InAirPackets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts)
#define IStylusSyncPlugin_Packets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts) (This)->lpVtbl->Packets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts)
#define IStylusSyncPlugin_CustomStylusDataAdded(This,piRtsSrc,pGuidId,cbData,pbData) (This)->lpVtbl->CustomStylusDataAdded(This,piRtsSrc,pGuidId,cbData,pbData)
#define IStylusSyncPlugin_SystemEvent(This,piRtsSrc,tcid,sid,event,eventdata) (This)->lpVtbl->SystemEvent(This,piRtsSrc,tcid,sid,event,eventdata)
#define IStylusSyncPlugin_TabletAdded(This,piRtsSrc,piTablet) (This)->lpVtbl->TabletAdded(This,piRtsSrc,piTablet)
#define IStylusSyncPlugin_TabletRemoved(This,piRtsSrc,iTabletIndex) (This)->lpVtbl->TabletRemoved(This,piRtsSrc,iTabletIndex)
#define IStylusSyncPlugin_Error(This,piRtsSrc,piPlugin,dataInterest,hrErrorCode,lptrKey) (This)->lpVtbl->Error(This,piRtsSrc,piPlugin,dataInterest,hrErrorCode,lptrKey)
#define IStylusSyncPlugin_UpdateMapping(This,piRtsSrc) (This)->lpVtbl->UpdateMapping(This,piRtsSrc)
#define IStylusSyncPlugin_DataInterest(This,pDataInterest) (This)->lpVtbl->DataInterest(This,pDataInterest)
#else
/*** IUnknown methods ***/
static inline HRESULT IStylusSyncPlugin_QueryInterface(IStylusSyncPlugin* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static inline ULONG IStylusSyncPlugin_AddRef(IStylusSyncPlugin* This) {
    return This->lpVtbl->AddRef(This);
}
static inline ULONG IStylusSyncPlugin_Release(IStylusSyncPlugin* This) {
    return This->lpVtbl->Release(This);
}
/*** IStylusPlugin methods ***/
static inline HRESULT IStylusSyncPlugin_RealTimeStylusEnabled(IStylusSyncPlugin* This,IRealTimeStylus *piRtsSrc,ULONG cTcidCount,const TABLET_CONTEXT_ID *pTcids) {
    return This->lpVtbl->RealTimeStylusEnabled(This,piRtsSrc,cTcidCount,pTcids);
}
static inline HRESULT IStylusSyncPlugin_RealTimeStylusDisabled(IStylusSyncPlugin* This,IRealTimeStylus *piRtsSrc,ULONG cTcidCount,const TABLET_CONTEXT_ID *pTcids) {
    return This->lpVtbl->RealTimeStylusDisabled(This,piRtsSrc,cTcidCount,pTcids);
}
static inline HRESULT IStylusSyncPlugin_StylusInRange(IStylusSyncPlugin* This,IRealTimeStylus *piRtsSrc,TABLET_CONTEXT_ID tcid,STYLUS_ID sid) {
    return This->lpVtbl->StylusInRange(This,piRtsSrc,tcid,sid);
}
static inline HRESULT IStylusSyncPlugin_StylusOutOfRange(IStylusSyncPlugin* This,IRealTimeStylus *piRtsSrc,TABLET_CONTEXT_ID tcid,STYLUS_ID sid) {
    return This->lpVtbl->StylusOutOfRange(This,piRtsSrc,tcid,sid);
}
static inline HRESULT IStylusSyncPlugin_StylusDown(IStylusSyncPlugin* This,IRealTimeStylus *piRtsSrc,const StylusInfo *pStylusInfo,ULONG cPropCountPerPkt,LONG *pPacket,LONG **ppInOutPkt) {
    return This->lpVtbl->StylusDown(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt);
}
static inline HRESULT IStylusSyncPlugin_StylusUp(IStylusSyncPlugin* This,IRealTimeStylus *piRtsSrc,const StylusInfo *pStylusInfo,ULONG cPropCountPerPkt,LONG *pPacket,LONG **ppInOutPkt) {
    return This->lpVtbl->StylusUp(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt);
}
static inline HRESULT IStylusSyncPlugin_StylusButtonDown(IStylusSyncPlugin* This,IRealTimeStylus *piRtsSrc,STYLUS_ID sid,const GUID *pGuidStylusButton,POINT *pStylusPos) {
    return This->lpVtbl->StylusButtonDown(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos);
}
static inline HRESULT IStylusSyncPlugin_StylusButtonUp(IStylusSyncPlugin* This,IRealTimeStylus *piRtsSrc,STYLUS_ID sid,const GUID *pGuidStylusButton,POINT *pStylusPos) {
    return This->lpVtbl->StylusButtonUp(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos);
}
static inline HRESULT IStylusSyncPlugin_InAirPackets(IStylusSyncPlugin* This,IRealTimeStylus *piRtsSrc,const StylusInfo *pStylusInfo,ULONG cPktCount,ULONG cPktBuffLength,LONG *pPackets,ULONG *pcInOutPkts,LONG **ppInOutPkts) {
    return This->lpVtbl->InAirPackets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts);
}
static inline HRESULT IStylusSyncPlugin_Packets(IStylusSyncPlugin* This,IRealTimeStylus *piRtsSrc,const StylusInfo *pStylusInfo,ULONG cPktCount,ULONG cPktBuffLength,LONG *pPackets,ULONG *pcInOutPkts,LONG **ppInOutPkts) {
    return This->lpVtbl->Packets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts);
}
static inline HRESULT IStylusSyncPlugin_CustomStylusDataAdded(IStylusSyncPlugin* This,IRealTimeStylus *piRtsSrc,const GUID *pGuidId,ULONG cbData,const BYTE *pbData) {
    return This->lpVtbl->CustomStylusDataAdded(This,piRtsSrc,pGuidId,cbData,pbData);
}
static inline HRESULT IStylusSyncPlugin_SystemEvent(IStylusSyncPlugin* This,IRealTimeStylus *piRtsSrc,TABLET_CONTEXT_ID tcid,STYLUS_ID sid,SYSTEM_EVENT event,SYSTEM_EVENT_DATA eventdata) {
    return This->lpVtbl->SystemEvent(This,piRtsSrc,tcid,sid,event,eventdata);
}
static inline HRESULT IStylusSyncPlugin_TabletAdded(IStylusSyncPlugin* This,IRealTimeStylus *piRtsSrc,IInkTablet *piTablet) {
    return This->lpVtbl->TabletAdded(This,piRtsSrc,piTablet);
}
static inline HRESULT IStylusSyncPlugin_TabletRemoved(IStylusSyncPlugin* This,IRealTimeStylus *piRtsSrc,LONG iTabletIndex) {
    return This->lpVtbl->TabletRemoved(This,piRtsSrc,iTabletIndex);
}
static inline HRESULT IStylusSyncPlugin_Error(IStylusSyncPlugin* This,IRealTimeStylus *piRtsSrc,IStylusPlugin *piPlugin,RealTimeStylusDataInterest dataInterest,HRESULT hrErrorCode,LONG_PTR *lptrKey) {
    return This->lpVtbl->Error(This,piRtsSrc,piPlugin,dataInterest,hrErrorCode,lptrKey);
}
static inline HRESULT IStylusSyncPlugin_UpdateMapping(IStylusSyncPlugin* This,IRealTimeStylus *piRtsSrc) {
    return This->lpVtbl->UpdateMapping(This,piRtsSrc);
}
static inline HRESULT IStylusSyncPlugin_DataInterest(IStylusSyncPlugin* This,RealTimeStylusDataInterest *pDataInterest) {
    return This->lpVtbl->DataInterest(This,pDataInterest);
}
#endif
#endif

#endif


#endif  /* __IStylusSyncPlugin_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IStylusAsyncPlugin interface
 */
#ifndef __IStylusAsyncPlugin_INTERFACE_DEFINED__
#define __IStylusAsyncPlugin_INTERFACE_DEFINED__

DEFINE_GUID(IID_IStylusAsyncPlugin, 0xa7cca85a, 0x31bc, 0x4cd2, 0xaa,0xdc, 0x32,0x89,0xa3,0xaf,0x11,0xc8);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("a7cca85a-31bc-4cd2-aadc-3289a3af11c8")
IStylusAsyncPlugin : public IStylusPlugin
{
};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(IStylusAsyncPlugin, 0xa7cca85a, 0x31bc, 0x4cd2, 0xaa,0xdc, 0x32,0x89,0xa3,0xaf,0x11,0xc8)
#endif
#else
typedef struct IStylusAsyncPluginVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IStylusAsyncPlugin *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IStylusAsyncPlugin *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IStylusAsyncPlugin *This);

    /*** IStylusPlugin methods ***/
    HRESULT (STDMETHODCALLTYPE *RealTimeStylusEnabled)(
        IStylusAsyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        ULONG cTcidCount,
        const TABLET_CONTEXT_ID *pTcids);

    HRESULT (STDMETHODCALLTYPE *RealTimeStylusDisabled)(
        IStylusAsyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        ULONG cTcidCount,
        const TABLET_CONTEXT_ID *pTcids);

    HRESULT (STDMETHODCALLTYPE *StylusInRange)(
        IStylusAsyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        TABLET_CONTEXT_ID tcid,
        STYLUS_ID sid);

    HRESULT (STDMETHODCALLTYPE *StylusOutOfRange)(
        IStylusAsyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        TABLET_CONTEXT_ID tcid,
        STYLUS_ID sid);

    HRESULT (STDMETHODCALLTYPE *StylusDown)(
        IStylusAsyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        const StylusInfo *pStylusInfo,
        ULONG cPropCountPerPkt,
        LONG *pPacket,
        LONG **ppInOutPkt);

    HRESULT (STDMETHODCALLTYPE *StylusUp)(
        IStylusAsyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        const StylusInfo *pStylusInfo,
        ULONG cPropCountPerPkt,
        LONG *pPacket,
        LONG **ppInOutPkt);

    HRESULT (STDMETHODCALLTYPE *StylusButtonDown)(
        IStylusAsyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        STYLUS_ID sid,
        const GUID *pGuidStylusButton,
        POINT *pStylusPos);

    HRESULT (STDMETHODCALLTYPE *StylusButtonUp)(
        IStylusAsyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        STYLUS_ID sid,
        const GUID *pGuidStylusButton,
        POINT *pStylusPos);

    HRESULT (STDMETHODCALLTYPE *InAirPackets)(
        IStylusAsyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        const StylusInfo *pStylusInfo,
        ULONG cPktCount,
        ULONG cPktBuffLength,
        LONG *pPackets,
        ULONG *pcInOutPkts,
        LONG **ppInOutPkts);

    HRESULT (STDMETHODCALLTYPE *Packets)(
        IStylusAsyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        const StylusInfo *pStylusInfo,
        ULONG cPktCount,
        ULONG cPktBuffLength,
        LONG *pPackets,
        ULONG *pcInOutPkts,
        LONG **ppInOutPkts);

    HRESULT (STDMETHODCALLTYPE *CustomStylusDataAdded)(
        IStylusAsyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        const GUID *pGuidId,
        ULONG cbData,
        const BYTE *pbData);

    HRESULT (STDMETHODCALLTYPE *SystemEvent)(
        IStylusAsyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        TABLET_CONTEXT_ID tcid,
        STYLUS_ID sid,
        SYSTEM_EVENT event,
        SYSTEM_EVENT_DATA eventdata);

    HRESULT (STDMETHODCALLTYPE *TabletAdded)(
        IStylusAsyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        IInkTablet *piTablet);

    HRESULT (STDMETHODCALLTYPE *TabletRemoved)(
        IStylusAsyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        LONG iTabletIndex);

    HRESULT (STDMETHODCALLTYPE *Error)(
        IStylusAsyncPlugin *This,
        IRealTimeStylus *piRtsSrc,
        IStylusPlugin *piPlugin,
        RealTimeStylusDataInterest dataInterest,
        HRESULT hrErrorCode,
        LONG_PTR *lptrKey);

    HRESULT (STDMETHODCALLTYPE *UpdateMapping)(
        IStylusAsyncPlugin *This,
        IRealTimeStylus *piRtsSrc);

    HRESULT (STDMETHODCALLTYPE *DataInterest)(
        IStylusAsyncPlugin *This,
        RealTimeStylusDataInterest *pDataInterest);

    END_INTERFACE
} IStylusAsyncPluginVtbl;

interface IStylusAsyncPlugin {
    CONST_VTBL IStylusAsyncPluginVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define IStylusAsyncPlugin_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IStylusAsyncPlugin_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IStylusAsyncPlugin_Release(This) (This)->lpVtbl->Release(This)
/*** IStylusPlugin methods ***/
#define IStylusAsyncPlugin_RealTimeStylusEnabled(This,piRtsSrc,cTcidCount,pTcids) (This)->lpVtbl->RealTimeStylusEnabled(This,piRtsSrc,cTcidCount,pTcids)
#define IStylusAsyncPlugin_RealTimeStylusDisabled(This,piRtsSrc,cTcidCount,pTcids) (This)->lpVtbl->RealTimeStylusDisabled(This,piRtsSrc,cTcidCount,pTcids)
#define IStylusAsyncPlugin_StylusInRange(This,piRtsSrc,tcid,sid) (This)->lpVtbl->StylusInRange(This,piRtsSrc,tcid,sid)
#define IStylusAsyncPlugin_StylusOutOfRange(This,piRtsSrc,tcid,sid) (This)->lpVtbl->StylusOutOfRange(This,piRtsSrc,tcid,sid)
#define IStylusAsyncPlugin_StylusDown(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt) (This)->lpVtbl->StylusDown(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt)
#define IStylusAsyncPlugin_StylusUp(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt) (This)->lpVtbl->StylusUp(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt)
#define IStylusAsyncPlugin_StylusButtonDown(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos) (This)->lpVtbl->StylusButtonDown(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos)
#define IStylusAsyncPlugin_StylusButtonUp(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos) (This)->lpVtbl->StylusButtonUp(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos)
#define IStylusAsyncPlugin_InAirPackets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts) (This)->lpVtbl->InAirPackets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts)
#define IStylusAsyncPlugin_Packets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts) (This)->lpVtbl->Packets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts)
#define IStylusAsyncPlugin_CustomStylusDataAdded(This,piRtsSrc,pGuidId,cbData,pbData) (This)->lpVtbl->CustomStylusDataAdded(This,piRtsSrc,pGuidId,cbData,pbData)
#define IStylusAsyncPlugin_SystemEvent(This,piRtsSrc,tcid,sid,event,eventdata) (This)->lpVtbl->SystemEvent(This,piRtsSrc,tcid,sid,event,eventdata)
#define IStylusAsyncPlugin_TabletAdded(This,piRtsSrc,piTablet) (This)->lpVtbl->TabletAdded(This,piRtsSrc,piTablet)
#define IStylusAsyncPlugin_TabletRemoved(This,piRtsSrc,iTabletIndex) (This)->lpVtbl->TabletRemoved(This,piRtsSrc,iTabletIndex)
#define IStylusAsyncPlugin_Error(This,piRtsSrc,piPlugin,dataInterest,hrErrorCode,lptrKey) (This)->lpVtbl->Error(This,piRtsSrc,piPlugin,dataInterest,hrErrorCode,lptrKey)
#define IStylusAsyncPlugin_UpdateMapping(This,piRtsSrc) (This)->lpVtbl->UpdateMapping(This,piRtsSrc)
#define IStylusAsyncPlugin_DataInterest(This,pDataInterest) (This)->lpVtbl->DataInterest(This,pDataInterest)
#else
/*** IUnknown methods ***/
static inline HRESULT IStylusAsyncPlugin_QueryInterface(IStylusAsyncPlugin* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static inline ULONG IStylusAsyncPlugin_AddRef(IStylusAsyncPlugin* This) {
    return This->lpVtbl->AddRef(This);
}
static inline ULONG IStylusAsyncPlugin_Release(IStylusAsyncPlugin* This) {
    return This->lpVtbl->Release(This);
}
/*** IStylusPlugin methods ***/
static inline HRESULT IStylusAsyncPlugin_RealTimeStylusEnabled(IStylusAsyncPlugin* This,IRealTimeStylus *piRtsSrc,ULONG cTcidCount,const TABLET_CONTEXT_ID *pTcids) {
    return This->lpVtbl->RealTimeStylusEnabled(This,piRtsSrc,cTcidCount,pTcids);
}
static inline HRESULT IStylusAsyncPlugin_RealTimeStylusDisabled(IStylusAsyncPlugin* This,IRealTimeStylus *piRtsSrc,ULONG cTcidCount,const TABLET_CONTEXT_ID *pTcids) {
    return This->lpVtbl->RealTimeStylusDisabled(This,piRtsSrc,cTcidCount,pTcids);
}
static inline HRESULT IStylusAsyncPlugin_StylusInRange(IStylusAsyncPlugin* This,IRealTimeStylus *piRtsSrc,TABLET_CONTEXT_ID tcid,STYLUS_ID sid) {
    return This->lpVtbl->StylusInRange(This,piRtsSrc,tcid,sid);
}
static inline HRESULT IStylusAsyncPlugin_StylusOutOfRange(IStylusAsyncPlugin* This,IRealTimeStylus *piRtsSrc,TABLET_CONTEXT_ID tcid,STYLUS_ID sid) {
    return This->lpVtbl->StylusOutOfRange(This,piRtsSrc,tcid,sid);
}
static inline HRESULT IStylusAsyncPlugin_StylusDown(IStylusAsyncPlugin* This,IRealTimeStylus *piRtsSrc,const StylusInfo *pStylusInfo,ULONG cPropCountPerPkt,LONG *pPacket,LONG **ppInOutPkt) {
    return This->lpVtbl->StylusDown(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt);
}
static inline HRESULT IStylusAsyncPlugin_StylusUp(IStylusAsyncPlugin* This,IRealTimeStylus *piRtsSrc,const StylusInfo *pStylusInfo,ULONG cPropCountPerPkt,LONG *pPacket,LONG **ppInOutPkt) {
    return This->lpVtbl->StylusUp(This,piRtsSrc,pStylusInfo,cPropCountPerPkt,pPacket,ppInOutPkt);
}
static inline HRESULT IStylusAsyncPlugin_StylusButtonDown(IStylusAsyncPlugin* This,IRealTimeStylus *piRtsSrc,STYLUS_ID sid,const GUID *pGuidStylusButton,POINT *pStylusPos) {
    return This->lpVtbl->StylusButtonDown(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos);
}
static inline HRESULT IStylusAsyncPlugin_StylusButtonUp(IStylusAsyncPlugin* This,IRealTimeStylus *piRtsSrc,STYLUS_ID sid,const GUID *pGuidStylusButton,POINT *pStylusPos) {
    return This->lpVtbl->StylusButtonUp(This,piRtsSrc,sid,pGuidStylusButton,pStylusPos);
}
static inline HRESULT IStylusAsyncPlugin_InAirPackets(IStylusAsyncPlugin* This,IRealTimeStylus *piRtsSrc,const StylusInfo *pStylusInfo,ULONG cPktCount,ULONG cPktBuffLength,LONG *pPackets,ULONG *pcInOutPkts,LONG **ppInOutPkts) {
    return This->lpVtbl->InAirPackets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts);
}
static inline HRESULT IStylusAsyncPlugin_Packets(IStylusAsyncPlugin* This,IRealTimeStylus *piRtsSrc,const StylusInfo *pStylusInfo,ULONG cPktCount,ULONG cPktBuffLength,LONG *pPackets,ULONG *pcInOutPkts,LONG **ppInOutPkts) {
    return This->lpVtbl->Packets(This,piRtsSrc,pStylusInfo,cPktCount,cPktBuffLength,pPackets,pcInOutPkts,ppInOutPkts);
}
static inline HRESULT IStylusAsyncPlugin_CustomStylusDataAdded(IStylusAsyncPlugin* This,IRealTimeStylus *piRtsSrc,const GUID *pGuidId,ULONG cbData,const BYTE *pbData) {
    return This->lpVtbl->CustomStylusDataAdded(This,piRtsSrc,pGuidId,cbData,pbData);
}
static inline HRESULT IStylusAsyncPlugin_SystemEvent(IStylusAsyncPlugin* This,IRealTimeStylus *piRtsSrc,TABLET_CONTEXT_ID tcid,STYLUS_ID sid,SYSTEM_EVENT event,SYSTEM_EVENT_DATA eventdata) {
    return This->lpVtbl->SystemEvent(This,piRtsSrc,tcid,sid,event,eventdata);
}
static inline HRESULT IStylusAsyncPlugin_TabletAdded(IStylusAsyncPlugin* This,IRealTimeStylus *piRtsSrc,IInkTablet *piTablet) {
    return This->lpVtbl->TabletAdded(This,piRtsSrc,piTablet);
}
static inline HRESULT IStylusAsyncPlugin_TabletRemoved(IStylusAsyncPlugin* This,IRealTimeStylus *piRtsSrc,LONG iTabletIndex) {
    return This->lpVtbl->TabletRemoved(This,piRtsSrc,iTabletIndex);
}
static inline HRESULT IStylusAsyncPlugin_Error(IStylusAsyncPlugin* This,IRealTimeStylus *piRtsSrc,IStylusPlugin *piPlugin,RealTimeStylusDataInterest dataInterest,HRESULT hrErrorCode,LONG_PTR *lptrKey) {
    return This->lpVtbl->Error(This,piRtsSrc,piPlugin,dataInterest,hrErrorCode,lptrKey);
}
static inline HRESULT IStylusAsyncPlugin_UpdateMapping(IStylusAsyncPlugin* This,IRealTimeStylus *piRtsSrc) {
    return This->lpVtbl->UpdateMapping(This,piRtsSrc);
}
static inline HRESULT IStylusAsyncPlugin_DataInterest(IStylusAsyncPlugin* This,RealTimeStylusDataInterest *pDataInterest) {
    return This->lpVtbl->DataInterest(This,pDataInterest);
}
#endif
#endif

#endif


#endif  /* __IStylusAsyncPlugin_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IRealTimeStylus interface
 */
#ifndef __IRealTimeStylus_INTERFACE_DEFINED__
#define __IRealTimeStylus_INTERFACE_DEFINED__

DEFINE_GUID(IID_IRealTimeStylus, 0xa8bb5d22, 0x3144, 0x4a7b, 0x93,0xcd, 0xf3,0x4a,0x16,0xbe,0x51,0x3a);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("a8bb5d22-3144-4a7b-93cd-f34a16be513a")
IRealTimeStylus : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE get_Enabled(
        BOOL *pfEnable) = 0;

    virtual HRESULT STDMETHODCALLTYPE put_Enabled(
        BOOL fEnable) = 0;

    virtual HRESULT STDMETHODCALLTYPE get_HWND(
        HANDLE_PTR *phwnd) = 0;

    virtual HRESULT STDMETHODCALLTYPE put_HWND(
        HANDLE_PTR hwnd) = 0;

    virtual HRESULT STDMETHODCALLTYPE get_WindowInputRectangle(
        RECT *prcWndInputRect) = 0;

    virtual HRESULT STDMETHODCALLTYPE put_WindowInputRectangle(
        const RECT *prcWndInputRect) = 0;

    virtual HRESULT STDMETHODCALLTYPE AddStylusSyncPlugin(
        ULONG iIndex,
        IStylusSyncPlugin *piPlugin) = 0;

    virtual HRESULT STDMETHODCALLTYPE RemoveStylusSyncPlugin(
        ULONG iIndex,
        IStylusSyncPlugin **ppiPlugin) = 0;

    virtual HRESULT STDMETHODCALLTYPE RemoveAllStylusSyncPlugins(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStylusSyncPlugin(
        ULONG iIndex,
        IStylusSyncPlugin **ppiPlugin) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStylusSyncPluginCount(
        ULONG *pcPlugins) = 0;

    virtual HRESULT STDMETHODCALLTYPE AddStylusAsyncPlugin(
        ULONG iIndex,
        IStylusAsyncPlugin *piPlugin) = 0;

    virtual HRESULT STDMETHODCALLTYPE RemoveStylusAsyncPlugin(
        ULONG iIndex,
        IStylusAsyncPlugin **ppiPlugin) = 0;

    virtual HRESULT STDMETHODCALLTYPE RemoveAllStylusAsyncPlugins(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStylusAsyncPlugin(
        ULONG iIndex,
        IStylusAsyncPlugin **ppiPlugin) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStylusAsyncPluginCount(
        ULONG *pcPlugins) = 0;

    virtual HRESULT STDMETHODCALLTYPE get_ChildRealTimeStylusPlugin(
        IRealTimeStylus **ppiRTS) = 0;

    virtual HRESULT STDMETHODCALLTYPE putref_ChildRealTimeStylusPlugin(
        IRealTimeStylus *piRTS) = 0;

    virtual HRESULT STDMETHODCALLTYPE AddCustomStylusDataToQueue(
        StylusQueue sq,
        const GUID *pGuidId,
        ULONG cbData,
        BYTE *pbData) = 0;

    virtual HRESULT STDMETHODCALLTYPE ClearStylusQueues(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetAllTabletsMode(
        BOOL fUseMouseForInput) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetSingleTabletMode(
        IInkTablet *piTablet) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetTablet(
        IInkTablet **ppiSingleTablet) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetTabletContextIdFromTablet(
        IInkTablet *piTablet,
        TABLET_CONTEXT_ID *ptcid) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetTabletFromTabletContextId(
        TABLET_CONTEXT_ID tcid,
        IInkTablet **ppiTablet) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetAllTabletContextIds(
        ULONG *pcTcidCount,
        TABLET_CONTEXT_ID **ppTcids) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStyluses(
        IInkCursors **ppiInkCursors) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStylusForId(
        STYLUS_ID sid,
        IInkCursor **ppiInkCursor) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetDesiredPacketDescription(
        ULONG cProperties,
        const GUID *pPropertyGuids) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDesiredPacketDescription(
        ULONG *pcProperties,
        GUID **ppPropertyGuids) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetPacketDescriptionData(
        TABLET_CONTEXT_ID tcid,
        FLOAT *pfInkToDeviceScaleX,
        FLOAT *pfInkToDeviceScaleY,
        ULONG *pcPacketProperties,
        PACKET_PROPERTY **ppPacketProperties) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(IRealTimeStylus, 0xa8bb5d22, 0x3144, 0x4a7b, 0x93,0xcd, 0xf3,0x4a,0x16,0xbe,0x51,0x3a)
#endif
#else
typedef struct IRealTimeStylusVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IRealTimeStylus *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IRealTimeStylus *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IRealTimeStylus *This);

    /*** IRealTimeStylus methods ***/
    HRESULT (STDMETHODCALLTYPE *get_Enabled)(
        IRealTimeStylus *This,
        BOOL *pfEnable);

    HRESULT (STDMETHODCALLTYPE *put_Enabled)(
        IRealTimeStylus *This,
        BOOL fEnable);

    HRESULT (STDMETHODCALLTYPE *get_HWND)(
        IRealTimeStylus *This,
        HANDLE_PTR *phwnd);

    HRESULT (STDMETHODCALLTYPE *put_HWND)(
        IRealTimeStylus *This,
        HANDLE_PTR hwnd);

    HRESULT (STDMETHODCALLTYPE *get_WindowInputRectangle)(
        IRealTimeStylus *This,
        RECT *prcWndInputRect);

    HRESULT (STDMETHODCALLTYPE *put_WindowInputRectangle)(
        IRealTimeStylus *This,
        const RECT *prcWndInputRect);

    HRESULT (STDMETHODCALLTYPE *AddStylusSyncPlugin)(
        IRealTimeStylus *This,
        ULONG iIndex,
        IStylusSyncPlugin *piPlugin);

    HRESULT (STDMETHODCALLTYPE *RemoveStylusSyncPlugin)(
        IRealTimeStylus *This,
        ULONG iIndex,
        IStylusSyncPlugin **ppiPlugin);

    HRESULT (STDMETHODCALLTYPE *RemoveAllStylusSyncPlugins)(
        IRealTimeStylus *This);

    HRESULT (STDMETHODCALLTYPE *GetStylusSyncPlugin)(
        IRealTimeStylus *This,
        ULONG iIndex,
        IStylusSyncPlugin **ppiPlugin);

    HRESULT (STDMETHODCALLTYPE *GetStylusSyncPluginCount)(
        IRealTimeStylus *This,
        ULONG *pcPlugins);

    HRESULT (STDMETHODCALLTYPE *AddStylusAsyncPlugin)(
        IRealTimeStylus *This,
        ULONG iIndex,
        IStylusAsyncPlugin *piPlugin);

    HRESULT (STDMETHODCALLTYPE *RemoveStylusAsyncPlugin)(
        IRealTimeStylus *This,
        ULONG iIndex,
        IStylusAsyncPlugin **ppiPlugin);

    HRESULT (STDMETHODCALLTYPE *RemoveAllStylusAsyncPlugins)(
        IRealTimeStylus *This);

    HRESULT (STDMETHODCALLTYPE *GetStylusAsyncPlugin)(
        IRealTimeStylus *This,
        ULONG iIndex,
        IStylusAsyncPlugin **ppiPlugin);

    HRESULT (STDMETHODCALLTYPE *GetStylusAsyncPluginCount)(
        IRealTimeStylus *This,
        ULONG *pcPlugins);

    HRESULT (STDMETHODCALLTYPE *get_ChildRealTimeStylusPlugin)(
        IRealTimeStylus *This,
        IRealTimeStylus **ppiRTS);

    HRESULT (STDMETHODCALLTYPE *putref_ChildRealTimeStylusPlugin)(
        IRealTimeStylus *This,
        IRealTimeStylus *piRTS);

    HRESULT (STDMETHODCALLTYPE *AddCustomStylusDataToQueue)(
        IRealTimeStylus *This,
        StylusQueue sq,
        const GUID *pGuidId,
        ULONG cbData,
        BYTE *pbData);

    HRESULT (STDMETHODCALLTYPE *ClearStylusQueues)(
        IRealTimeStylus *This);

    HRESULT (STDMETHODCALLTYPE *SetAllTabletsMode)(
        IRealTimeStylus *This,
        BOOL fUseMouseForInput);

    HRESULT (STDMETHODCALLTYPE *SetSingleTabletMode)(
        IRealTimeStylus *This,
        IInkTablet *piTablet);

    HRESULT (STDMETHODCALLTYPE *GetTablet)(
        IRealTimeStylus *This,
        IInkTablet **ppiSingleTablet);

    HRESULT (STDMETHODCALLTYPE *GetTabletContextIdFromTablet)(
        IRealTimeStylus *This,
        IInkTablet *piTablet,
        TABLET_CONTEXT_ID *ptcid);

    HRESULT (STDMETHODCALLTYPE *GetTabletFromTabletContextId)(
        IRealTimeStylus *This,
        TABLET_CONTEXT_ID tcid,
        IInkTablet **ppiTablet);

    HRESULT (STDMETHODCALLTYPE *GetAllTabletContextIds)(
        IRealTimeStylus *This,
        ULONG *pcTcidCount,
        TABLET_CONTEXT_ID **ppTcids);

    HRESULT (STDMETHODCALLTYPE *GetStyluses)(
        IRealTimeStylus *This,
        IInkCursors **ppiInkCursors);

    HRESULT (STDMETHODCALLTYPE *GetStylusForId)(
        IRealTimeStylus *This,
        STYLUS_ID sid,
        IInkCursor **ppiInkCursor);

    HRESULT (STDMETHODCALLTYPE *SetDesiredPacketDescription)(
        IRealTimeStylus *This,
        ULONG cProperties,
        const GUID *pPropertyGuids);

    HRESULT (STDMETHODCALLTYPE *GetDesiredPacketDescription)(
        IRealTimeStylus *This,
        ULONG *pcProperties,
        GUID **ppPropertyGuids);

    HRESULT (STDMETHODCALLTYPE *GetPacketDescriptionData)(
        IRealTimeStylus *This,
        TABLET_CONTEXT_ID tcid,
        FLOAT *pfInkToDeviceScaleX,
        FLOAT *pfInkToDeviceScaleY,
        ULONG *pcPacketProperties,
        PACKET_PROPERTY **ppPacketProperties);

    END_INTERFACE
} IRealTimeStylusVtbl;

interface IRealTimeStylus {
    CONST_VTBL IRealTimeStylusVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define IRealTimeStylus_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IRealTimeStylus_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IRealTimeStylus_Release(This) (This)->lpVtbl->Release(This)
/*** IRealTimeStylus methods ***/
#define IRealTimeStylus_get_Enabled(This,pfEnable) (This)->lpVtbl->get_Enabled(This,pfEnable)
#define IRealTimeStylus_put_Enabled(This,fEnable) (This)->lpVtbl->put_Enabled(This,fEnable)
#define IRealTimeStylus_get_HWND(This,phwnd) (This)->lpVtbl->get_HWND(This,phwnd)
#define IRealTimeStylus_put_HWND(This,hwnd) (This)->lpVtbl->put_HWND(This,hwnd)
#define IRealTimeStylus_get_WindowInputRectangle(This,prcWndInputRect) (This)->lpVtbl->get_WindowInputRectangle(This,prcWndInputRect)
#define IRealTimeStylus_put_WindowInputRectangle(This,prcWndInputRect) (This)->lpVtbl->put_WindowInputRectangle(This,prcWndInputRect)
#define IRealTimeStylus_AddStylusSyncPlugin(This,iIndex,piPlugin) (This)->lpVtbl->AddStylusSyncPlugin(This,iIndex,piPlugin)
#define IRealTimeStylus_RemoveStylusSyncPlugin(This,iIndex,ppiPlugin) (This)->lpVtbl->RemoveStylusSyncPlugin(This,iIndex,ppiPlugin)
#define IRealTimeStylus_RemoveAllStylusSyncPlugins(This) (This)->lpVtbl->RemoveAllStylusSyncPlugins(This)
#define IRealTimeStylus_GetStylusSyncPlugin(This,iIndex,ppiPlugin) (This)->lpVtbl->GetStylusSyncPlugin(This,iIndex,ppiPlugin)
#define IRealTimeStylus_GetStylusSyncPluginCount(This,pcPlugins) (This)->lpVtbl->GetStylusSyncPluginCount(This,pcPlugins)
#define IRealTimeStylus_AddStylusAsyncPlugin(This,iIndex,piPlugin) (This)->lpVtbl->AddStylusAsyncPlugin(This,iIndex,piPlugin)
#define IRealTimeStylus_RemoveStylusAsyncPlugin(This,iIndex,ppiPlugin) (This)->lpVtbl->RemoveStylusAsyncPlugin(This,iIndex,ppiPlugin)
#define IRealTimeStylus_RemoveAllStylusAsyncPlugins(This) (This)->lpVtbl->RemoveAllStylusAsyncPlugins(This)
#define IRealTimeStylus_GetStylusAsyncPlugin(This,iIndex,ppiPlugin) (This)->lpVtbl->GetStylusAsyncPlugin(This,iIndex,ppiPlugin)
#define IRealTimeStylus_GetStylusAsyncPluginCount(This,pcPlugins) (This)->lpVtbl->GetStylusAsyncPluginCount(This,pcPlugins)
#define IRealTimeStylus_get_ChildRealTimeStylusPlugin(This,ppiRTS) (This)->lpVtbl->get_ChildRealTimeStylusPlugin(This,ppiRTS)
#define IRealTimeStylus_putref_ChildRealTimeStylusPlugin(This,piRTS) (This)->lpVtbl->putref_ChildRealTimeStylusPlugin(This,piRTS)
#define IRealTimeStylus_AddCustomStylusDataToQueue(This,sq,pGuidId,cbData,pbData) (This)->lpVtbl->AddCustomStylusDataToQueue(This,sq,pGuidId,cbData,pbData)
#define IRealTimeStylus_ClearStylusQueues(This) (This)->lpVtbl->ClearStylusQueues(This)
#define IRealTimeStylus_SetAllTabletsMode(This,fUseMouseForInput) (This)->lpVtbl->SetAllTabletsMode(This,fUseMouseForInput)
#define IRealTimeStylus_SetSingleTabletMode(This,piTablet) (This)->lpVtbl->SetSingleTabletMode(This,piTablet)
#define IRealTimeStylus_GetTablet(This,ppiSingleTablet) (This)->lpVtbl->GetTablet(This,ppiSingleTablet)
#define IRealTimeStylus_GetTabletContextIdFromTablet(This,piTablet,ptcid) (This)->lpVtbl->GetTabletContextIdFromTablet(This,piTablet,ptcid)
#define IRealTimeStylus_GetTabletFromTabletContextId(This,tcid,ppiTablet) (This)->lpVtbl->GetTabletFromTabletContextId(This,tcid,ppiTablet)
#define IRealTimeStylus_GetAllTabletContextIds(This,pcTcidCount,ppTcids) (This)->lpVtbl->GetAllTabletContextIds(This,pcTcidCount,ppTcids)
#define IRealTimeStylus_GetStyluses(This,ppiInkCursors) (This)->lpVtbl->GetStyluses(This,ppiInkCursors)
#define IRealTimeStylus_GetStylusForId(This,sid,ppiInkCursor) (This)->lpVtbl->GetStylusForId(This,sid,ppiInkCursor)
#define IRealTimeStylus_SetDesiredPacketDescription(This,cProperties,pPropertyGuids) (This)->lpVtbl->SetDesiredPacketDescription(This,cProperties,pPropertyGuids)
#define IRealTimeStylus_GetDesiredPacketDescription(This,pcProperties,ppPropertyGuids) (This)->lpVtbl->GetDesiredPacketDescription(This,pcProperties,ppPropertyGuids)
#define IRealTimeStylus_GetPacketDescriptionData(This,tcid,pfInkToDeviceScaleX,pfInkToDeviceScaleY,pcPacketProperties,ppPacketProperties) (This)->lpVtbl->GetPacketDescriptionData(This,tcid,pfInkToDeviceScaleX,pfInkToDeviceScaleY,pcPacketProperties,ppPacketProperties)
#else
/*** IUnknown methods ***/
static inline HRESULT IRealTimeStylus_QueryInterface(IRealTimeStylus* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static inline ULONG IRealTimeStylus_AddRef(IRealTimeStylus* This) {
    return This->lpVtbl->AddRef(This);
}
static inline ULONG IRealTimeStylus_Release(IRealTimeStylus* This) {
    return This->lpVtbl->Release(This);
}
/*** IRealTimeStylus methods ***/
static inline HRESULT IRealTimeStylus_get_Enabled(IRealTimeStylus* This,BOOL *pfEnable) {
    return This->lpVtbl->get_Enabled(This,pfEnable);
}
static inline HRESULT IRealTimeStylus_put_Enabled(IRealTimeStylus* This,BOOL fEnable) {
    return This->lpVtbl->put_Enabled(This,fEnable);
}
static inline HRESULT IRealTimeStylus_get_HWND(IRealTimeStylus* This,HANDLE_PTR *phwnd) {
    return This->lpVtbl->get_HWND(This,phwnd);
}
static inline HRESULT IRealTimeStylus_put_HWND(IRealTimeStylus* This,HANDLE_PTR hwnd) {
    return This->lpVtbl->put_HWND(This,hwnd);
}
static inline HRESULT IRealTimeStylus_get_WindowInputRectangle(IRealTimeStylus* This,RECT *prcWndInputRect) {
    return This->lpVtbl->get_WindowInputRectangle(This,prcWndInputRect);
}
static inline HRESULT IRealTimeStylus_put_WindowInputRectangle(IRealTimeStylus* This,const RECT *prcWndInputRect) {
    return This->lpVtbl->put_WindowInputRectangle(This,prcWndInputRect);
}
static inline HRESULT IRealTimeStylus_AddStylusSyncPlugin(IRealTimeStylus* This,ULONG iIndex,IStylusSyncPlugin *piPlugin) {
    return This->lpVtbl->AddStylusSyncPlugin(This,iIndex,piPlugin);
}
static inline HRESULT IRealTimeStylus_RemoveStylusSyncPlugin(IRealTimeStylus* This,ULONG iIndex,IStylusSyncPlugin **ppiPlugin) {
    return This->lpVtbl->RemoveStylusSyncPlugin(This,iIndex,ppiPlugin);
}
static inline HRESULT IRealTimeStylus_RemoveAllStylusSyncPlugins(IRealTimeStylus* This) {
    return This->lpVtbl->RemoveAllStylusSyncPlugins(This);
}
static inline HRESULT IRealTimeStylus_GetStylusSyncPlugin(IRealTimeStylus* This,ULONG iIndex,IStylusSyncPlugin **ppiPlugin) {
    return This->lpVtbl->GetStylusSyncPlugin(This,iIndex,ppiPlugin);
}
static inline HRESULT IRealTimeStylus_GetStylusSyncPluginCount(IRealTimeStylus* This,ULONG *pcPlugins) {
    return This->lpVtbl->GetStylusSyncPluginCount(This,pcPlugins);
}
static inline HRESULT IRealTimeStylus_AddStylusAsyncPlugin(IRealTimeStylus* This,ULONG iIndex,IStylusAsyncPlugin *piPlugin) {
    return This->lpVtbl->AddStylusAsyncPlugin(This,iIndex,piPlugin);
}
static inline HRESULT IRealTimeStylus_RemoveStylusAsyncPlugin(IRealTimeStylus* This,ULONG iIndex,IStylusAsyncPlugin **ppiPlugin) {
    return This->lpVtbl->RemoveStylusAsyncPlugin(This,iIndex,ppiPlugin);
}
static inline HRESULT IRealTimeStylus_RemoveAllStylusAsyncPlugins(IRealTimeStylus* This) {
    return This->lpVtbl->RemoveAllStylusAsyncPlugins(This);
}
static inline HRESULT IRealTimeStylus_GetStylusAsyncPlugin(IRealTimeStylus* This,ULONG iIndex,IStylusAsyncPlugin **ppiPlugin) {
    return This->lpVtbl->GetStylusAsyncPlugin(This,iIndex,ppiPlugin);
}
static inline HRESULT IRealTimeStylus_GetStylusAsyncPluginCount(IRealTimeStylus* This,ULONG *pcPlugins) {
    return This->lpVtbl->GetStylusAsyncPluginCount(This,pcPlugins);
}
static inline HRESULT IRealTimeStylus_get_ChildRealTimeStylusPlugin(IRealTimeStylus* This,IRealTimeStylus **ppiRTS) {
    return This->lpVtbl->get_ChildRealTimeStylusPlugin(This,ppiRTS);
}
static inline HRESULT IRealTimeStylus_putref_ChildRealTimeStylusPlugin(IRealTimeStylus* This,IRealTimeStylus *piRTS) {
    return This->lpVtbl->putref_ChildRealTimeStylusPlugin(This,piRTS);
}
static inline HRESULT IRealTimeStylus_AddCustomStylusDataToQueue(IRealTimeStylus* This,StylusQueue sq,const GUID *pGuidId,ULONG cbData,BYTE *pbData) {
    return This->lpVtbl->AddCustomStylusDataToQueue(This,sq,pGuidId,cbData,pbData);
}
static inline HRESULT IRealTimeStylus_ClearStylusQueues(IRealTimeStylus* This) {
    return This->lpVtbl->ClearStylusQueues(This);
}
static inline HRESULT IRealTimeStylus_SetAllTabletsMode(IRealTimeStylus* This,BOOL fUseMouseForInput) {
    return This->lpVtbl->SetAllTabletsMode(This,fUseMouseForInput);
}
static inline HRESULT IRealTimeStylus_SetSingleTabletMode(IRealTimeStylus* This,IInkTablet *piTablet) {
    return This->lpVtbl->SetSingleTabletMode(This,piTablet);
}
static inline HRESULT IRealTimeStylus_GetTablet(IRealTimeStylus* This,IInkTablet **ppiSingleTablet) {
    return This->lpVtbl->GetTablet(This,ppiSingleTablet);
}
static inline HRESULT IRealTimeStylus_GetTabletContextIdFromTablet(IRealTimeStylus* This,IInkTablet *piTablet,TABLET_CONTEXT_ID *ptcid) {
    return This->lpVtbl->GetTabletContextIdFromTablet(This,piTablet,ptcid);
}
static inline HRESULT IRealTimeStylus_GetTabletFromTabletContextId(IRealTimeStylus* This,TABLET_CONTEXT_ID tcid,IInkTablet **ppiTablet) {
    return This->lpVtbl->GetTabletFromTabletContextId(This,tcid,ppiTablet);
}
static inline HRESULT IRealTimeStylus_GetAllTabletContextIds(IRealTimeStylus* This,ULONG *pcTcidCount,TABLET_CONTEXT_ID **ppTcids) {
    return This->lpVtbl->GetAllTabletContextIds(This,pcTcidCount,ppTcids);
}
static inline HRESULT IRealTimeStylus_GetStyluses(IRealTimeStylus* This,IInkCursors **ppiInkCursors) {
    return This->lpVtbl->GetStyluses(This,ppiInkCursors);
}
static inline HRESULT IRealTimeStylus_GetStylusForId(IRealTimeStylus* This,STYLUS_ID sid,IInkCursor **ppiInkCursor) {
    return This->lpVtbl->GetStylusForId(This,sid,ppiInkCursor);
}
static inline HRESULT IRealTimeStylus_SetDesiredPacketDescription(IRealTimeStylus* This,ULONG cProperties,const GUID *pPropertyGuids) {
    return This->lpVtbl->SetDesiredPacketDescription(This,cProperties,pPropertyGuids);
}
static inline HRESULT IRealTimeStylus_GetDesiredPacketDescription(IRealTimeStylus* This,ULONG *pcProperties,GUID **ppPropertyGuids) {
    return This->lpVtbl->GetDesiredPacketDescription(This,pcProperties,ppPropertyGuids);
}
static inline HRESULT IRealTimeStylus_GetPacketDescriptionData(IRealTimeStylus* This,TABLET_CONTEXT_ID tcid,FLOAT *pfInkToDeviceScaleX,FLOAT *pfInkToDeviceScaleY,ULONG *pcPacketProperties,PACKET_PROPERTY **ppPacketProperties) {
    return This->lpVtbl->GetPacketDescriptionData(This,tcid,pfInkToDeviceScaleX,pfInkToDeviceScaleY,pcPacketProperties,ppPacketProperties);
}
#endif
#endif

#endif


#endif  /* __IRealTimeStylus_INTERFACE_DEFINED__ */

/*****************************************************************************
 * RealTimeStylus coclass
 */

DEFINE_GUID(CLSID_RealTimeStylus, 0xe26b366d, 0xf998, 0x43ce, 0x83,0x6f, 0xcb,0x6d,0x90,0x44,0x32,0xb0);

#ifdef __cplusplus
class DECLSPEC_UUID("e26b366d-f998-43ce-836f-cb6d904432b0") RealTimeStylus;
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(RealTimeStylus, 0xe26b366d, 0xf998, 0x43ce, 0x83,0x6f, 0xcb,0x6d,0x90,0x44,0x32,0xb0)
#endif
#endif

/* Begin additional prototypes for all interfaces */


/* End additional prototypes */

#ifdef __cplusplus
}
#endif

#endif /* __rtscom_h__ */
