vbAccelerator - Contents of code file: WinSubHook.idl

[
  uuid(5293da82-fb26-406a-a31b-76ae1aa16a0e),
  version(1.4),
  helpstring("Window/Subclass/Hook/Timer interface 1.4"),
]
library WinSubHook
{
    importlib("stdole2.tlb");

    typedef enum {
      MSG_AFTER = 0,
      MSG_BEFORE = 1,
    } eMsgWhen;

   typedef enum {
      ALL_MESSAGES = -1,
      WM_NULL = 0x0000,
      WM_CREATE = 0x0001,
      WM_DESTROY = 0x0002,
      WM_MOVE = 0x0003,
      WM_SIZE = 0x0005,
      WM_ACTIVATE = 0x0006,
      WM_SETFOCUS = 0x0007,
      WM_KILLFOCUS = 0x0008,
      WM_ENABLE = 0x000A,
      WM_SETREDRAW = 0x000B,
      WM_SETTEXT = 0x000C,
      WM_GETTEXT = 0x000D,
      WM_GETTEXTLENGTH = 0x000E,
      WM_PAINT = 0x000F,
      WM_CLOSE = 0x0010,
      WM_QUERYENDSESSION = 0x0011,
      WM_QUIT = 0x0012,
      WM_QUERYOPEN = 0x0013,
      WM_ERASEBKGND = 0x0014,
      WM_SYSCOLORCHANGE = 0x0015,
      WM_ENDSESSION = 0x0016,
      WM_SHOWWINDOW = 0x0018,
      WM_WININICHANGE = 0x001A,
      WM_SETTINGCHANGE = 0x001A,
      WM_DEVMODECHANGE = 0x001B,
      WM_ACTIVATEAPP = 0x001C,
      WM_FONTCHANGE = 0x001D,
      WM_TIMECHANGE = 0x001E,
      WM_CANCELMODE = 0x001F,
      WM_SETCURSOR = 0x0020,
      WM_MOUSEACTIVATE = 0x0021,
      WM_CHILDACTIVATE = 0x0022,
      WM_QUEUESYNC = 0x0023,
      WM_GETMINMAXINFO = 0x0024,
      WM_PAINTICON = 0x0026,
      WM_ICONERASEBKGND = 0x0027,
      WM_NEXTDLGCTL = 0x0028,
      WM_SPOOLERSTATUS = 0x002A,
      WM_DRAWITEM = 0x002B,
      WM_MEASUREITEM = 0x002C,
      WM_DELETEITEM = 0x002D,
      WM_VKEYTOITEM = 0x002E,
      WM_CHARTOITEM = 0x002F,
      WM_SETFONT = 0x0030,
      WM_GETFONT = 0x0031,
      WM_SETHOTKEY = 0x0032,
      WM_GETHOTKEY = 0x0033,
      WM_QUERYDRAGICON = 0x0037,
      WM_COMPAREITEM = 0x0039,
      WM_GETOBJECT = 0x003D,
      WM_COMPACTING = 0x0041,
      WM_WINDOWPOSCHANGING = 0x0046,
      WM_WINDOWPOSCHANGED = 0x0047,
      WM_POWER = 0x0048,
      WM_COPYDATA = 0x004A,
      WM_CANCELJOURNAL = 0x004B,
      WM_NOTIFY = 0x004E,
      WM_INPUTLANGCHANGEREQUEST = 0x0050,
      WM_INPUTLANGCHANGE = 0x0051,
      WM_TCARD = 0x0052,
      WM_HELP = 0x0053,
      WM_USERCHANGED = 0x0054,
      WM_NOTIFYFORMAT = 0x0055,
      WM_CONTEXTMENU = 0x007B,
      WM_STYLECHANGING = 0x007C,
      WM_STYLECHANGED = 0x007D,
      WM_DISPLAYCHANGE = 0x007E,
      WM_GETICON = 0x007F,
      WM_SETICON = 0x0080,
      WM_NCCREATE = 0x0081,
      WM_NCDESTROY = 0x0082,
      WM_NCCALCSIZE = 0x0083,
      WM_NCHITTEST = 0x0084,
      WM_NCPAINT = 0x0085,
      WM_NCACTIVATE = 0x0086,
      WM_GETDLGCODE = 0x0087,
      WM_SYNCPAINT = 0x0088,
      WM_NCMOUSEMOVE = 0x00A0,
      WM_NCLBUTTONDOWN = 0x00A1,
      WM_NCLBUTTONUP = 0x00A2,
      WM_NCLBUTTONDBLCLK = 0x00A3,
      WM_NCRBUTTONDOWN = 0x00A4,
      WM_NCRBUTTONUP = 0x00A5,
      WM_NCRBUTTONDBLCLK = 0x00A6,
      WM_NCMBUTTONDOWN = 0x00A7,
      WM_NCMBUTTONUP = 0x00A8,
      WM_NCMBUTTONDBLCLK = 0x00A9,
      WM_KEYFIRST = 0x0100,
      WM_KEYDOWN = 0x0100,
      WM_KEYUP = 0x0101,
      WM_CHAR = 0x0102,
      WM_DEADCHAR = 0x0103,
      WM_SYSKEYDOWN = 0x0104,
      WM_SYSKEYUP = 0x0105,
      WM_SYSCHAR = 0x0106,
      WM_SYSDEADCHAR = 0x0107,
      WM_KEYLAST = 0x0108,
      WM_IME_STARTCOMPOSITION = 0x010D,
      WM_IME_ENDCOMPOSITION = 0x010E,
      WM_IME_COMPOSITION = 0x010F,
      WM_IME_KEYLAST = 0x010F,
      WM_INITDIALOG = 0x0110,
      WM_COMMAND = 0x0111,
      WM_SYSCOMMAND = 0x0112,
      WM_TIMER = 0x0113,
      WM_HSCROLL = 0x0114,
      WM_VSCROLL = 0x0115,
      WM_INITMENU = 0x0116,
      WM_INITMENUPOPUP = 0x0117,
      WM_MENUSELECT = 0x011F,
      WM_MENUCHAR = 0x0120,
      WM_ENTERIDLE = 0x0121,
      WM_MENURBUTTONUP = 0x0122,
      WM_MENUDRAG = 0x0123,
      WM_MENUGETOBJECT = 0x0124,
      WM_UNINITMENUPOPUP = 0x0125,
      WM_MENUCOMMAND = 0x0126,
      WM_CTLCOLORMSGBOX = 0x0132,
      WM_CTLCOLOREDIT = 0x0133,
      WM_CTLCOLORLISTBOX = 0x0134,
      WM_CTLCOLORBTN = 0x0135,
      WM_CTLCOLORDLG = 0x0136,
      WM_CTLCOLORSCROLLBAR = 0x0137,
      WM_CTLCOLORSTATIC = 0x0138,
      WM_MOUSEFIRST = 0x0200,
      WM_MOUSEMOVE = 0x0200,
      WM_LBUTTONDOWN = 0x0201,
      WM_LBUTTONUP = 0x0202,
      WM_LBUTTONDBLCLK = 0x0203,
      WM_RBUTTONDOWN = 0x0204,
      WM_RBUTTONUP = 0x0205,
      WM_RBUTTONDBLCLK = 0x0206,
      WM_MBUTTONDOWN = 0x0207,
      WM_MBUTTONUP = 0x0208,
      WM_MBUTTONDBLCLK = 0x0209,
      WM_MOUSEWHEEL = 0x020A,
      WM_PARENTNOTIFY = 0x0210,
      WM_ENTERMENULOOP = 0x0211,
      WM_EXITMENULOOP = 0x0212,
      WM_NEXTMENU = 0x0213,
      WM_SIZING = 0x0214,
      WM_CAPTURECHANGED = 0x0215,
      WM_MOVING = 0x0216,
      WM_DEVICECHANGE = 0x0219,
      WM_MDICREATE = 0x0220,
      WM_MDIDESTROY = 0x0221,
      WM_MDIACTIVATE = 0x0222,
      WM_MDIRESTORE = 0x0223,
      WM_MDINEXT = 0x0224,
      WM_MDIMAXIMIZE = 0x0225,
      WM_MDITILE = 0x0226,
      WM_MDICASCADE = 0x0227,
      WM_MDIICONARRANGE = 0x0228,
      WM_MDIGETACTIVE = 0x0229,
      WM_MDISETMENU = 0x0230,
      WM_ENTERSIZEMOVE = 0x0231,
      WM_EXITSIZEMOVE = 0x0232,
      WM_DROPFILES = 0x0233,
      WM_MDIREFRESHMENU = 0x0234,
      WM_IME_SETCONTEXT = 0x0281,
      WM_IME_NOTIFY = 0x0282,
      WM_IME_CONTROL = 0x0283,
      WM_IME_COMPOSITIONFULL = 0x0284,
      WM_IME_SELECT = 0x0285,
      WM_IME_CHAR = 0x0286,
      WM_IME_REQUEST = 0x0288,
      WM_IME_KEYDOWN = 0x0290,
      WM_IME_KEYUP = 0x0291,
      WM_MOUSEHOVER = 0x02A1,
      WM_MOUSELEAVE = 0x02A3,
      WM_CUT = 0x0300,
      WM_COPY = 0x0301,
      WM_PASTE = 0x0302,
      WM_CLEAR = 0x0303,
      WM_UNDO = 0x0304,
      WM_RENDERFORMAT = 0x0305,
      WM_RENDERALLFORMATS = 0x0306,
      WM_DESTROYCLIPBOARD = 0x0307,
      WM_DRAWCLIPBOARD = 0x0308,
      WM_PAINTCLIPBOARD = 0x0309,
      WM_VSCROLLCLIPBOARD = 0x030A,
      WM_SIZECLIPBOARD = 0x030B,
      WM_ASKCBFORMATNAME = 0x030C,
      WM_CHANGECBCHAIN = 0x030D,
      WM_HSCROLLCLIPBOARD = 0x030E,
      WM_QUERYNEWPALETTE = 0x030F,
      WM_PALETTEISCHANGING = 0x0310,
      WM_PALETTECHANGED = 0x0311,
      WM_HOTKEY = 0x0312,
      WM_PRINT = 0x0317,
      WM_PRINTCLIENT = 0x0318,
      WM_HANDHELDFIRST = 0x0358,
      WM_HANDHELDLAST = 0x035F,
      WM_AFXFIRST = 0x0360,
      WM_AFXLAST = 0x037F,
      WM_PENWINFIRST = 0x0380,
      WM_PENWINLAST = 0x038F,
      WM_USER = 0x0400,    
      WM_APP = 0x8000,
   } eMsg;

    typedef enum {
        CS_VREDRAW = 1,
        CS_HREDRAW = 2,
        CS_KEYCVTWINDOW = 4,
        CS_DBLCLKS = 8,
        CS_OWNDC = 32,
        CS_CLASSDC = 64,
        CS_PARENTDC = 128,
        CS_NOKEYCVT = 256,
        CS_NOCLOSE = 512,
        CS_SAVEBITS = 2048,
        CS_BYTEALIGNCLIENT = 4096,
        CS_BYTEALIGNWINDOW = 8192,
        CS_PUBLICCLASS = 16384,
    } eClassStyle;

    typedef enum {
        AS_WINDOWCLASS = 0,
      PREDEFINED_BUTTON = 1,
        PREDEFINED_COMBOBOX = 2,
        PREDEFINED_EDIT = 3,
        PREDEFINED_LISTBOX = 4,
        PREDEFINED_MDICLIENT = 5,
        PREDEFINED_RICHEDIT = 6,
        PREDEFINED_RICHEDIT_CLASS = 7,
      PREDEFINED_SCROLLBAR = 8,
      PREDEFINED_STATIC = 9,
    } eWindowClass;

    typedef enum {
        WS_OVERLAPPED = 0x0,
        WS_POPUP = 0x80000000,
        WS_CHILD = 0x40000000,
        WS_MINIMIZE = 0x20000000,
        WS_VISIBLE = 0x10000000,
        WS_DISABLED = 0x8000000,
        WS_CLIPSIBLINGS = 0x4000000,
        WS_CLIPCHILDREN = 0x2000000,
        WS_MAXIMIZE = 0x1000000,
        WS_CAPTION = 0xC00000,
        WS_BORDER = 0x800000,
        WS_DLGFRAME = 0x400000,
        WS_VSCROLL = 0x200000,
        WS_HSCROLL = 0x100000,
        WS_SYSMENU = 0x80000,
        WS_THICKFRAME = 0x40000,
        WS_GROUP = 0x20000,
        WS_TABSTOP = 0x10000,
        WS_MINIMIZEBOX = 0x20000,
        WS_MAXIMIZEBOX = 0x10000,
        WS_TILED = 0x0,
        WS_ICONIC = 0x20000000,
        WS_SIZEBOX = 0x40000,
      WS_OVERLAPPEDWINDOW = 0xCF0000,
      WS_POPUPWINDOW = 0x80880000,
    } eWindowStyle;

    typedef enum { 
        WS_EX_DLGMODALFRAME = 0x1,
        WS_EX_NOPARENTNOTIFY = 0x4,
        WS_EX_TOPMOST = 0x8,
        WS_EX_ACCEPTFILES = 0x10,
        WS_EX_TRANSPARENT = 0x20,
        WS_EX_MDICHILD = 0x40,
        WS_EX_TOOLWINDOW = 0x80,
        WS_EX_WINDOWEDGE = 0x100,
        WS_EX_CLIENTEDGE = 0x200,
        WS_EX_CONTEXTHELP = 0x400,
        WS_EX_RIGHT = 0x1000,
        WS_EX_LEFT = 0x0,
        WS_EX_RTLREADING = 0x2000,
        WS_EX_LTRREADING = 0x0,
        WS_EX_LEFTSCROLLBAR = 0x4000,
        WS_EX_RIGHTSCROLLBAR = 0x0,
        WS_EX_CONTROLPARENT = 0x10000,
        WS_EX_STATICEDGE = 0x20000,
        WS_EX_APPWINDOW = 0x40000,
        WS_EX_OVERLAPPEDWINDOW = 0x300,
        WS_EX_PALETTEWINDOW = 0x188,
        WS_EX_LAYERED = 0x80000,
    } eWindowStyleEx;

    typedef enum {
        HCBT_MOVESIZE = 0,
        HCBT_MINMAX = 1,
        HCBT_QS = 2,
        HCBT_CREATEWND = 3,
        HCBT_DESTROYWND = 4,
        HCBT_ACTIVATE = 5,
        HCBT_CLICKSKIPPED = 6,
        HCBT_KEYSKIPPED = 7,
        HCBT_SYSCOMMAND = 8,
        HCBT_SETFOCUS = 9,
        PM_NOREMOVE = 0,
        PM_REMOVE = 1,
        PM_NOYIELD = 2,
        HC_ACTION = 0,
        HC_GETNEXT = 1,
        HC_SKIP = 2,
        HC_NOREMOVE = 3,
        HC_NOREM = 3,
        HC_SYSMODALON = 4,
        HC_SYSMODALOFF = 5,
        MSGF_DIALOGBOX = 0,
        MSGF_MESSAGEBOX = 1,
        MSGF_MENU = 2,
        MSGF_SCROLLBAR = 5,
        MSGF_NEXTWINDOW = 6,
        MSGF_MAX = 8,
        MSGF_USER = 4096,
        MSGF_DDEMGR = 32769,
        HSHELL_WINDOWCREATED = 1,
        HSHELL_WINDOWDESTROYED = 2,
        HSHELL_ACTIVATESHELLWINDOW = 3,
        HSHELL_WINDOWACTIVATED = 4,
        HSHELL_GETMINRECT = 5,
        HSHELL_REDRAW = 6,
        HSHELL_TASKMAN = 7,
        HSHELL_LANGUAGE = 8
    } eHookCode;

    typedef enum {
        WH_MSGFILTER = -1,
        WH_KEYBOARD = 2,
        WH_GETMESSAGE = 3,
        WH_CALLWNDPROC = 4,
        WH_CBT = 5,
        WH_MOUSE = 7,
        WH_DEBUG = 9,
        WH_SHELL = 10,
        WH_FOREGROUNDIDLE = 11,
      WH_CALLWNDPROCRET = 12,
    } eHookType;

   typedef enum {
      AC_SRC_OVER = 0x0,
      AC_SRC_ALPHA = 0x1,
      AC_SRC_NO_PREMULT_ALPHA = 0x1,
      AC_SRC_NO_ALPHA = 0x2,
      AC_DST_NO_PREMULT_ALPHA = 0x10,
      AC_DST_NO_ALPHA = 0x20,
      LWA_COLORKEY = 0x1,
      LWA_ALPHA = 0x2,
      ULW_COLORKEY = 0x1,
      ULW_ALPHA = 0x2,
      ULW_OPAQUE = 0x4,
   } eLayeredConsts;

   typedef struct {
      long   cbSize;
      long   Style;
      long   lpfnWndProc;
      long   cbClsExtra;
      long   cbWndExtra;
      long   hInstance;
      long   hIcon;
      long   hCursor;
      long   hbrBackground;
      long   lpszMenuName;
      long   lpszClassName;
      long   hIconSm;
   } tWNDCLASSEX;

   typedef struct { 
      long   left; 
      long   top; 
      long   right; 
      long   bottom; 
   } tRECT;

   typedef struct { 
      long   x; 
      long   y; 
   } tPOINT;
   
   typedef struct {
      long   cx;
      long   cy;
   } tSIZE;

   typedef struct {
      long   hwnd;     
      long   message; 
      long   wParam; 
      long   lParam; 
      long   time; 
      POINT   pt; 
   } tMSG; 
 
    typedef struct {
      long   lParam;
      long   wParam;
      long   message;
      long   hWnd;
    } tCWPSTRUCT;

    typedef struct {
      long   lResult;
      long   lParam;
      long   wParam;
      long   message;
      long   hWnd;
    } tCWPRETSTRUCT;

    typedef struct {
      long   fMouse;
      long   hWndActive;
    } tCBTACTIVATESTRUCT;

    typedef struct {
      long   lpCreateParams;
      long   hInstance;
      long   hMenu;
      long   hwndParent;
      int      cy;
      int      cx;
      int      y;
      int      x;
      long   style;
      long   lpszName;
      long   lpszClass;
      long   dwExStyle;
    } tCREATESTRUCT;

    typedef struct {
      long   lpcs;
      long   hwndInsertAfter;
    } tCBT_CREATEWND;

    typedef struct {
      POINT   pt;
      long   hWnd;
      long   wHitTestCode;
      long   dwExtraInfo;
    } tMOUSEHOOKSTRUCT;

    typedef struct {
      long   idThread;
      long   idThreadInstaller;
      long   lParam;
      long   wParam;
      int      code;
    } tDEBUGHOOKINFO;

    typedef struct {
      long   message;
      long   paramL;
      long   paramH;
      long   time;
      long   hWnd;
    } tEVENTMSG;
   
   typedef struct {
      long   hWnd;
      long   hWndInsertAfter;
      long   x;
      long   y;
      long   cx;
      long   cy;
      long   Flags;
   } tWINDOWPOS;

   typedef struct {
      long   dwOSVersionInfoSize;
      long   dwMajorVersion;
      long   dwMinorVersion;
      long   dwBuildNumber;
      long   dwPlatformId;
      byte   szCSDVersion[128];
   } tOSVERSIONINFO;

   typedef struct {
      byte   BlendOp;
      byte   BlendFlags;
      byte   SourceConstantAlpha;
      byte   AlphaFormat;
   } tBLENDFUNCTION;

   typedef struct {
      byte b;
      byte g;
      byte r;
      byte a;
   } tBGRA;

   typedef struct {
      long Value;
   } tLONG;
  
   typedef struct {
      long   biSize;
      long   biWidth;
      long   biHeight;
      short   biPlanes;
      short   biBitCount;
      long   biCompression;
      long   biSizeImage;
      long   biXPelsPerMeter;
      long   biYPelsPerMeter;
      long   biClrUsed;
      long   biClrImportant;
   } tBITMAPINFOHEADER;

    [dllname("<invalid typelib>")]
    module Constants {
      const long BS_PUSHBUTTON         = 0x00000000L;
      const long BS_DEFPUSHBUTTON         = 0x00000001L;
      const long BS_CHECKBOX            = 0x00000002L;
      const long BS_AUTOCHECKBOX         = 0x00000003L;
      const long BS_RADIOBUTTON         = 0x00000004L;
      const long BS_3STATE            = 0x00000005L;
      const long BS_AUTO3STATE         = 0x00000006L;
      const long BS_GROUPBOX            = 0x00000007L;
      const long BS_USERBUTTON         = 0x00000008L;
      const long BS_AUTORADIOBUTTON      = 0x00000009L;
      const long BS_OWNERDRAW            = 0x0000000BL;
      const long BS_LEFTTEXT            = 0x00000020L;
      const long BS_TEXT               = 0x00000000L;
      const long BS_ICON               = 0x00000040L;
      const long BS_BITMAP            = 0x00000080L;
      const long BS_LEFT               = 0x00000100L;
      const long BS_RIGHT               = 0x00000200L;
      const long BS_CENTER            = 0x00000300L;
      const long BS_TOP               = 0x00000400L;
      const long BS_BOTTOM            = 0x00000800L;
      const long BS_VCENTER            = 0x00000C00L;
      const long BS_PUSHLIKE            = 0x00001000L;
      const long BS_MULTILINE            = 0x00002000L;
      const long BS_NOTIFY            = 0x00004000L;
      const long BS_FLAT               = 0x00008000L;
      const long BS_RIGHTBUTTON         = 0x00000020L;
      const long BN_CLICKED            = 0;
      const long BN_PAINT               = 1;
      const long BN_HILITE            = 2;
      const long BN_UNHILITE            = 3;
      const long BN_DISABLE            = 4;
      const long BN_DOUBLECLICKED         = 5;
      const long BN_PUSHED            = 2;
      const long BN_UNPUSHED            = 2;
      const long BN_DBLCLK            = 5;
      const long BN_SETFOCUS            = 6;
      const long BN_KILLFOCUS            = 7;
      const long BM_GETCHECK            = 0x00F0;
      const long BM_SETCHECK            = 0x00F1;
      const long BM_GETSTATE            = 0x00F2;
      const long BM_SETSTATE            = 0x00F3;
      const long BM_SETSTYLE            = 0x00F4;
      const long BM_CLICK               = 0x00F5;
      const long BM_GETIMAGE            = 0x00F6;
      const long BM_SETIMAGE            = 0x00F7;
      const long BST_UNCHECKED         = 0x0000;
      const long BST_CHECKED            = 0x0001;
      const long BST_INDETERMINATE      = 0x0002;
      const long BST_PUSHED            = 0x0004;
      const long BST_FOCUS            = 0x0008;
      const long ES_LEFT               = 0x0000L;
      const long ES_CENTER            = 0x0001L;
      const long ES_RIGHT               = 0x0002L;
      const long ES_MULTILINE            = 0x0004L;
      const long ES_UPPERCASE            = 0x0008L;
      const long ES_LOWERCASE            = 0x0010L;
      const long ES_PASSWORD            = 0x0020L;
      const long ES_AUTOVSCROLL         = 0x0040L;
      const long ES_AUTOHSCROLL         = 0x0080L;
      const long ES_NOHIDESEL            = 0x0100L;
      const long ES_OEMCONVERT         = 0x0400L;
      const long ES_READONLY            = 0x0800L;
      const long ES_WANTRETURN         = 0x1000L;
      const long ES_NUMBER            = 0x2000L;
      const long EN_SETFOCUS            = 0x0100;
      const long EN_KILLFOCUS            = 0x0200;
      const long EN_CHANGE            = 0x0300;
      const long EN_UPDATE            = 0x0400;
      const long EN_ERRSPACE            = 0x0500;
      const long EN_MAXTEXT            = 0x0501;
      const long EN_HSCROLL            = 0x0601;
      const long EN_VSCROLL            = 0x0602;
      const long EC_LEFTMARGIN         = 0x0001;
      const long EC_RIGHTMARGIN         = 0x0002;
      const long EC_USEFONTINFO         = 0xffff;
      const long EMSIS_COMPOSITIONSTRING  = 0x0001;
      const long EIMES_GETCOMPSTRATONCE   = 0x0001;
      const long EIMES_CANCELCOMPSTRINFOCUS = 0x0002;
      const long EIMES_COMPLETECOMPSTRKILLFOCUS = 0x0004;
      const long EM_GETSEL            = 0x00B0;
      const long EM_SETSEL            = 0x00B1;
      const long EM_GETRECT            = 0x00B2;
      const long EM_SETRECT            = 0x00B3;
      const long EM_SETRECTNP            = 0x00B4;
      const long EM_SCROLL            = 0x00B5;
      const long EM_LINESCROLL         = 0x00B6;
      const long EM_SCROLLCARET         = 0x00B7;
      const long EM_GETMODIFY            = 0x00B8;
      const long EM_SETMODIFY            = 0x00B9;
      const long EM_GETLINECOUNT         = 0x00BA;
      const long EM_LINEINDEX            = 0x00BB;
      const long EM_SETHANDLE            = 0x00BC;
      const long EM_GETHANDLE            = 0x00BD;
      const long EM_GETTHUMB            = 0x00BE;
      const long EM_LINELENGTH         = 0x00C1;
      const long EM_REPLACESEL         = 0x00C2;
      const long EM_GETLINE            = 0x00C4;
      const long EM_LIMITTEXT            = 0x00C5;
      const long EM_CANUNDO            = 0x00C6;
      const long EM_UNDO               = 0x00C7;
      const long EM_FMTLINES            = 0x00C8;
      const long EM_LINEFROMCHAR         = 0x00C9;
      const long EM_SETTABSTOPS         = 0x00CB;
      const long EM_SETPASSWORDCHAR      = 0x00CC;
      const long EM_EMPTYUNDOBUFFER      = 0x00CD;
      const long EM_GETFIRSTVISIBLELINE   = 0x00CE;
      const long EM_SETREADONLY         = 0x00CF;
      const long EM_SETWORDBREAKPROC      = 0x00D0;
      const long EM_GETWORDBREAKPROC      = 0x00D1;
      const long EM_GETPASSWORDCHAR      = 0x00D2;
      const long EM_SETMARGINS         = 0x00D3;
      const long EM_GETMARGINS         = 0x00D4;
      const long EM_SETLIMITTEXT          = 0x00C5;
      const long EM_GETLIMITTEXT         = 0x00D5;
      const long EM_POSFROMCHAR         = 0x00D6;
      const long EM_CHARFROMPOS         = 0x00D7;
      const long EM_SETIMESTATUS         = 0x00D8;
      const long EM_GETIMESTATUS         = 0x00D9;
      const long SS_LEFT               = 0x00000000L;
      const long SS_CENTER            = 0x00000001L;
      const long SS_RIGHT               = 0x00000002L;
      const long SS_ICON               = 0x00000003L;
      const long SS_BLACKRECT            = 0x00000004L;
      const long SS_GRAYRECT            = 0x00000005L;
      const long SS_WHITERECT            = 0x00000006L;
      const long SS_BLACKFRAME         = 0x00000007L;
      const long SS_GRAYFRAME            = 0x00000008L;
      const long SS_WHITEFRAME         = 0x00000009L;
      const long SS_USERITEM            = 0x0000000AL;
      const long SS_SIMPLE            = 0x0000000BL;
      const long SS_LEFTNOWORDWRAP      = 0x0000000CL;
      const long SS_OWNERDRAW            = 0x0000000DL;
      const long SS_BITMAP            = 0x0000000EL;
      const long SS_ENHMETAFILE         = 0x0000000FL;
      const long SS_ETCHEDHORZ         = 0x00000010L;
      const long SS_ETCHEDVERT         = 0x00000011L;
      const long SS_ETCHEDFRAME         = 0x00000012L;
      const long SS_TYPEMASK            = 0x0000001FL;
      const long SS_NOPREFIX            = 0x00000080L;
      const long SS_NOTIFY            = 0x00000100L;
      const long SS_CENTERIMAGE         = 0x00000200L;
      const long SS_RIGHTJUST            = 0x00000400L;
      const long SS_REALSIZEIMAGE         = 0x00000800L;
      const long SS_SUNKEN            = 0x00001000L;
      const long SS_ENDELLIPSIS         = 0x00004000L;
      const long SS_PATHELLIPSIS         = 0x00008000L;
      const long SS_WORDELLIPSIS         = 0x0000C000L;
      const long SS_ELLIPSISMASK         = 0x0000C000L;
      const long STM_SETICON            = 0x0170;
      const long STM_GETICON            = 0x0171;
      const long STM_SETIMAGE            = 0x0172;
      const long STM_GETIMAGE            = 0x0173;
      const long STN_CLICKED            = 0;
      const long STN_DBLCLK            = 1;
      const long STN_ENABLE            = 2;
      const long STN_DISABLE            = 3;
      const long STM_MSGMAX            = 0x0174;
      const long LB_OKAY               = 0;
      const long LB_ERR               = (-1);
      const long LB_ERRSPACE            = (-2);
      const long LBN_ERRSPACE            = (-2);
      const long LBN_SELCHANGE         = 1;
      const long LBN_DBLCLK            = 2;
      const long LBN_SELCANCEL         = 3;
      const long LBN_SETFOCUS            = 4;
      const long LBN_KILLFOCUS         = 5;
      const long LB_ADDSTRING            = 0x0180;
      const long LB_INSERTSTRING         = 0x0181;
      const long LB_DELETESTRING         = 0x0182;
      const long LB_SELITEMRANGEEX      = 0x0183;
      const long LB_RESETCONTENT         = 0x0184;
      const long LB_SETSEL            = 0x0185;
      const long LB_SETCURSEL            = 0x0186;
      const long LB_GETSEL            = 0x0187;
      const long LB_GETCURSEL            = 0x0188;
      const long LB_GETTEXT            = 0x0189;
      const long LB_GETTEXTLEN         = 0x018A;
      const long LB_GETCOUNT            = 0x018B;
      const long LB_SELECTSTRING         = 0x018C;
      const long LB_DIR               = 0x018D;
      const long LB_GETTOPINDEX         = 0x018E;
      const long LB_FINDSTRING         = 0x018F;
      const long LB_GETSELCOUNT         = 0x0190;
      const long LB_GETSELITEMS         = 0x0191;
      const long LB_SETTABSTOPS         = 0x0192;
      const long LB_GETHORIZONTALEXTENT   = 0x0193;
      const long LB_SETHORIZONTALEXTENT   = 0x0194;
      const long LB_SETCOLUMNWIDTH      = 0x0195;
      const long LB_ADDFILE            = 0x0196;
      const long LB_SETTOPINDEX         = 0x0197;
      const long LB_GETITEMRECT         = 0x0198;
      const long LB_GETITEMDATA         = 0x0199;
      const long LB_SETITEMDATA         = 0x019A;
      const long LB_SELITEMRANGE         = 0x019B;
      const long LB_SETANCHORINDEX      = 0x019C;
      const long LB_GETANCHORINDEX      = 0x019D;
      const long LB_SETCARETINDEX         = 0x019E;
      const long LB_GETCARETINDEX         = 0x019F;
      const long LB_SETITEMHEIGHT         = 0x01A0;
      const long LB_GETITEMHEIGHT         = 0x01A1;
      const long LB_FINDSTRINGEXACT      = 0x01A2;
      const long LB_SETLOCALE            = 0x01A5;
      const long LB_GETLOCALE            = 0x01A6;
      const long LB_SETCOUNT            = 0x01A7;
      const long LB_INITSTORAGE         = 0x01A8;
      const long LB_ITEMFROMPOINT         = 0x01A9;
      const long LB_MSGMAX            = 0x01B0;
      const long LBS_NOTIFY            = 0x0001L;
      const long LBS_SORT               = 0x0002L;
      const long LBS_NOREDRAW            = 0x0004L;
      const long LBS_MULTIPLESEL         = 0x0008L;
      const long LBS_OWNERDRAWFIXED      = 0x0010L;
      const long LBS_OWNERDRAWVARIABLE   = 0x0020L;
      const long LBS_HASSTRINGS         = 0x0040L;
      const long LBS_USETABSTOPS         = 0x0080L;
      const long LBS_NOINTEGRALHEIGHT      = 0x0100L;
      const long LBS_MULTICOLUMN         = 0x0200L;
      const long LBS_WANTKEYBOARDINPUT   = 0x0400L;
      const long LBS_EXTENDEDSEL         = 0x0800L;
      const long LBS_DISABLENOSCROLL      = 0x1000L;
      const long LBS_NODATA            = 0x2000L;
      const long LBS_NOSEL            = 0x4000L;
      const long LBS_STANDARD            =(0x0001L | 0x0002L | 0x200000 |
       0x800000);
      const long CB_OKAY               = 0;
      const long CB_ERR               = (-1);
      const long CB_ERRSPACE            = (-2);
      const long CBN_ERRSPACE            = (-1);
      const long CBN_SELCHANGE         = 1;
      const long CBN_DBLCLK            = 2;
      const long CBN_SETFOCUS            = 3;
      const long CBN_KILLFOCUS         = 4;
      const long CBN_EDITCHANGE         = 5;
      const long CBN_EDITUPDATE         = 6;
      const long CBN_DROPDOWN            = 7;
      const long CBN_CLOSEUP            = 8;
      const long CBN_SELENDOK            = 9;
      const long CBN_SELENDCANCEL         = 10;
      const long CBS_SIMPLE            = 0x0001L;
      const long CBS_DROPDOWN            = 0x0002L;
      const long CBS_DROPDOWNLIST         = 0x0003L;
      const long CBS_OWNERDRAWFIXED      = 0x0010L;
      const long CBS_OWNERDRAWVARIABLE   = 0x0020L;
      const long CBS_AUTOHSCROLL         = 0x0040L;
      const long CBS_OEMCONVERT         = 0x0080L;
      const long CBS_SORT               = 0x0100L;
      const long CBS_HASSTRINGS         = 0x0200L;
      const long CBS_NOINTEGRALHEIGHT      = 0x0400L;
      const long CBS_DISABLENOSCROLL      = 0x0800L;
      const long CBS_UPPERCASE         = 0x2000L;
      const long CBS_LOWERCASE         = 0x4000L;
      const long CB_GETEDITSEL            = 0x0140;
      const long CB_LIMITTEXT             = 0x0141;
      const long CB_SETEDITSEL            = 0x0142;
      const long CB_ADDSTRING             = 0x0143;
      const long CB_DELETESTRING          = 0x0144;
      const long CB_DIR                   = 0x0145;
      const long CB_GETCOUNT              = 0x0146;
      const long CB_GETCURSEL             = 0x0147;
      const long CB_GETLBTEXT             = 0x0148;
      const long CB_GETLBTEXTLEN          = 0x0149;
      const long CB_INSERTSTRING          = 0x014A;
      const long CB_RESETCONTENT          = 0x014B;
      const long CB_FINDSTRING            = 0x014C;
      const long CB_SELECTSTRING          = 0x014D;
      const long CB_SETCURSEL             = 0x014E;
      const long CB_SHOWDROPDOWN          = 0x014F;
      const long CB_GETITEMDATA           = 0x0150;
      const long CB_SETITEMDATA           = 0x0151;
      const long CB_GETDROPPEDCONTROLRECT = 0x0152;
      const long CB_SETITEMHEIGHT         = 0x0153;
      const long CB_GETITEMHEIGHT         = 0x0154;
      const long CB_SETEXTENDEDUI         = 0x0155;
      const long CB_GETEXTENDEDUI         = 0x0156;
      const long CB_GETDROPPEDSTATE       = 0x0157;
      const long CB_FINDSTRINGEXACT       = 0x0158;
      const long CB_SETLOCALE             = 0x0159;
      const long CB_GETLOCALE             = 0x015A;
      const long CB_GETTOPINDEX           = 0x015b;
      const long CB_SETTOPINDEX           = 0x015c;
      const long CB_GETHORIZONTALEXTENT   = 0x015d;
      const long CB_SETHORIZONTALEXTENT   = 0x015e;
      const long CB_GETDROPPEDWIDTH       = 0x015f;
      const long CB_SETDROPPEDWIDTH       = 0x0160;
      const long CB_INITSTORAGE           = 0x0161;
      const long CB_MSGMAX                = 0x0162;
      const long SBS_HORZ                 = 0x0000L;
      const long SBS_VERT                 = 0x0001L;
      const long SBS_TOPALIGN             = 0x0002L;
      const long SBS_LEFTALIGN            = 0x0002L;
      const long SBS_BOTTOMALIGN          = 0x0004L;
      const long SBS_RIGHTALIGN           = 0x0004L;
      const long SBS_SIZEBOXTOPLEFTALIGN  = 0x0002L;
      const long SBS_SIZEBOXBOTTOMRIGHTALIGN = 0x0004L;
      const long SBS_SIZEBOX              = 0x0008L;
      const long SBS_SIZEGRIP             = 0x0010L;
      const long SBM_SETPOS               = 0x00E0;
      const long SBM_GETPOS               = 0x00E1;
      const long SBM_SETRANGE             = 0x00E2;
      const long SBM_SETRANGEREDRAW       = 0x00E6;
      const long SBM_GETRANGE             = 0x00E3;
      const long SBM_ENABLE_ARROWS        = 0x00E4;
      const long SBM_SETSCROLLINFO        = 0x00E9;
      const long SBM_GETSCROLLINFO        = 0x00EA;
      const long SIF_RANGE            = 0x0001;
      const long SIF_PAGE               = 0x0002;
      const long SIF_POS               = 0x0004;
      const long SIF_DISABLENOSCROLL      = 0x0008;
      const long SIF_TRACKPOS            = 0x0010;
      const long SIF_ALL                  = (0x0001 | 0x0002 | 0x0004 | 0x0010);
        const long GWL_WNDPROC            = 0xfffffffc;
      const long COL_SYS_MASK            = 0x80000000;
      const long PS_SOLID               = 0x0;
      const long SIZE_RESTORED         = 0x0;
      const long SW_HIDE               = 0x0;
      const long SW_SHOWNOACTIVATE      = 0x4;
      const long SW_SHOW               = 0x5;
      const long SWP_HIDEWINDOW         = 0x80;
      const long SWP_SHOWWINDOW         = 0x40;
      const long BITSPIXEL            = 12;
      const long SPI_GETMENUANIMATION      = 0x1002;
      const long SPI_GETDROPSHADOW      = 0x1024;
    };

    [dllname("gdi32.dll")]
    module Gdi32 {
      [entry("CreateSolidBrush")] 
         long  CreateSolidBrush([in] long crColor);
      [entry("BitBlt")]
         long BitBlt([in] long hDestDC, [in] long x, [in] long y, [in] long
          nWidth, [in] long nHeight, [in] long hSrcDC, [in] long xSrc, [in]
          long ySrc, [in] long dwRop);
      [entry("CreateCompatibleBitmap")]   
         long CreateCompatibleBitmap([in] long hDC, [in] long nWidth, [in] long
          nHeight);
      [entry("CreateCompatibleDC")]
         long CreateCompatibleDC([in] long hDC);
      [entry("CreateDIBSection")]
         long CreateDIBSection([in] long hDC, [in] tBITMAPINFOHEADER*
          pBitmapInfo, [in] long un, [in, out] long* lplpVoid, [in] long
          Handle, [in] long dw);
      [entry("CreatePen")]
         long CreatePen ([in] long nPenStyle, [in] long nWidth, [in] long
          crColor);
      [entry("DeleteDC")]
         long DeleteDC([in] long hDC);
      [entry("DeleteObject")]
         long DeleteObject([in] long hObject);
      [entry("GetDeviceCaps")]
         long GetDeviceCaps([in] long hdc, [in] long nIndex);
      [entry("LineTo")]
         long LineTo ([in] long hDC, [in] long x, [in] long y);
      [entry("MoveToEx")]
         long MoveToEx([in] long hDC, [in] long x, [in] long y, [in] tPOINT*
          lpPoint);
      [entry("SelectObject")]
         long SelectObject([in] long hDC, [in] long hObject);
      [entry("SetPixel")]
         long SetPixel([in] long hDC, [in] long x, [in] long y, [in] long
          crColor);
    };

    [dllname("kernel32.dll")]
    module Kernel32 {
        [entry("RtlMoveMemory")] 
         void CopyMemory([in] void* hpvDest, [in] void* hpvSource, [in] long
          cbCopy);
      [entry("FreeLibrary")]
         long FreeLibrary([in] long hLibModule);
        [entry("GetModuleHandleA")] 
         long GetModuleHandle([in] LPSTR lpModuleName);
        [entry("GetProcAddress")] 
         long GetProcAddress([in] long hModule,  [in] LPSTR lpProcName);
      [entry("GetTickCount")]
         long GetTickCount();
      [entry("GetVersionExA")]
      long GetVersionEx([in] tOSVERSIONINFO* pVersionInformation);
      [entry("LoadLibraryA")]
      long LoadLibrary ([in] LPSTR lpLibFileName);
    };

    [dllname("user32.dll")]
    module User32 {
      [entry("CallWindowProcA")] 
         long CallWindowProc([in] long lpPrevWndFunc, [in] long hWnd, [in] long
          uMsg, [in] long wParam, [in] long lParam);
      [entry("CreateWindowExA")] 
         long CreateWindowEx([in] long dwExStyle, [in] LPSTR lpClassName, [in]
          LPSTR lpWindowName, [in] long dwStyle, [in] long x, [in] long y, [in]
          long nWidth,    [in] long nHeight, [in] long hWndParent, [in] long
          hMenu, [in] long hInstance, [in] void* lpParam);
      [entry("DefWindowProcA")]
         long DefWindowProc([in] long hWnd, [in] long uMsg, [in] long wParam,
          [in] long lParam);
      [entry("DestroyWindow")] 
         long DestroyWindow([in] long hWnd);
      [entry("FillRect")]
         long FillRect([in] long hDC, [in] tRECT* pRect, [in] long hBrush);
      [entry("GetClientRect")]
         long GetClientRect([in] long hWnd, [in, out] tRECT* pRect);
      [entry("GetDC")]
         long GetDC([in] long hWnd);
      [entry("GetSysColor")]
         long GetSysColor([in] long nIndex);
        [entry("GetWindowLongA")] 
         long GetWindowLong([in] long hWnd, [in] long nIndex);
      [entry("GetWindowRect")]
         long GetWindowRect([in] long hWnd, [in, out] tRECT* pRect);
      [entry("IsWindow")] 
         long IsWindow([in] long hWnd);
      [entry("IsWindowVisible")]
         long IsWindowVisible([in] long hWnd);
      [entry("KillTimer")]
         long KillTimer([in] long hWnd, [in] long idEvent);
      [entry("MoveWindow")]
         long MoveWindow([in] long hWnd, [in] long x, [in] long y, [in] long
          nWidth, [in] long nHeight, [in] long bRepaint);
      [entry("RegisterClassExA")]
         short RegisterClassEx([in] tWNDCLASSEX* pWndClassEx);
      [entry("SendMessageA")]
         long SendMessage([in] long hWnd, [in] long wMsg, [in] long wParam,
          [in] void* lParam);
      [entry("SetTimer")]
         long SetTimer([in] long hWnd, [in] long idEvent, [in] long uElapse,
          [in] long lpTimerFunc);
        [entry("SetWindowLongA")] 
         long SetWindowLong([in] long hWnd, [in] long nIndex, [in] long
          dwNewLong);
      [entry("SetWindowsHookExA")]
         long SetWindowsHookEx([in] long idHook, [in] long lpfn, [in] long
          hmod, [in] long dwThreadId);
      [entry("ShowWindow")]
         long ShowWindow([in] long hWnd, [in] long nCmdShow);
      [entry("SystemParametersInfoA")]
         long SystemParametersInfo([in] long uAction, [in] long uParam, [in,
          out] void *lpvParam, [in] long fuWinIni);
      [entry("UnregisterClassA")] 
         long UnregisterClass([in] LPSTR lpClassname, [in] long hInstance);
      [entry("UnhookWindowsHookEx")]
         long UnhookWindowsHookEx([in] long hhk);
      [entry("UpdateLayeredWindow")]
         long UpdateLayeredWindow([in] long hWnd, [in] long hdcDest, [in] void
          *ptDst, [in] void *pSize, [in] long hdcSrc, [in] void *ptSrc, [in]
          long crKey, [in] void *pBlend, [in] long dwFlags);
      [entry("UpdateWindow")]
         long UpdateWindow([in] long hWnd);
    };

   [
      odl,
      uuid(9f3bc4ba-509b-401b-825f-f37178a4521b),
      version(1.0),
      dual,
      nonextensible,
      oleautomation
    ]
    interface iHook : IDispatch {
        [id(0x00000001)]
        HRESULT After(
                        [in, out] long* lReturn, 
                        [in] eHookCode nCode, 
                        [in] long wParam, 
                        [in] long lParam);
        [id(0x00000002)]
        HRESULT Before(
                        [in, out] VARIANT_BOOL* bHandled, 
                        [in, out] long* lReturn, 
                        [in, out] eHookCode* nCode, 
                        [in, out] long* wParam, 
                        [in, out] long* lParam);
    };

    interface iSubclass;
    [
      odl,
      uuid(4ee6bcf1-71a6-4c15-ae1f-71896d00c6d7),
      version(1.0),
      dual,
      nonextensible,
      oleautomation
    ]
    interface iSubclass : IDispatch {
       [id(0x00000001)]
        HRESULT After(
                        [in, out] long* lReturn, 
                        [in] long hWnd, 
                        [in] eMsg uMsg, 
                        [in] long wParam, 
                        [in] long lParam);
        [id(0x00000002)]
        HRESULT Before(
                        [in, out] VARIANT_BOOL* bHandled, 
                        [in, out] long* lReturn, 
                        [in, out] long* hWnd, 
                        [in, out] eMsg* uMsg, 
                        [in, out] long* wParam, 
                        [in, out] long* lParam);
    };

    interface iWindow;
    [
      odl,
      uuid(5ffce213-84a4-416e-9dc1-1bd923b4839a),
      version(1.0),
      dual,
      nonextensible,
      oleautomation
    ]
    interface iWindow : IDispatch {
       [id(0x00000001)]
        HRESULT WndProc(
                        [in, out] VARIANT_BOOL* bHandled, 
                        [in, out] long* lReturn, 
                        [in, out] long* hWnd, 
                        [in, out] eMsg* uMsg, 
                        [in, out] long* wParam, 
                        [in, out] long* lParam);
    };

   interface iTimer;
    [
      odl,
      uuid(8d0e28bb-9e87-4008-8354-c8bd20c0b99c),
      version(1.0),
      dual,
      nonextensible,
      oleautomation
    ]
    interface iTimer : IDispatch {
       [id(0x00000001)]
        HRESULT Fire(
                        [in] long lElapsedMS);
    };

};