/* This header file machine-generated by mktyplib.exe */
/* Interface to type library: VBIDE */

#ifndef _VBIDE_H_
#define _VBIDE_H_

DEFINE_GUID(LIBID_VBIDE,0xEF404E00L,0xEDA6,0x101A,0x8D,0xAF,0x00,0xDD,0x01,0x0F,0x7E,0xBB);
#ifndef BEGIN_INTERFACE
#define BEGIN_INTERFACE
#endif

interface VBEOBJ;

interface _VBProjects;

#ifdef __cplusplus
class VBProjects;
#endif

interface _VBProject;

#ifdef __cplusplus
class VBProject;
#endif

interface _VBComponents;

#ifdef __cplusplus
class VBComponents;
#endif

interface _VBComponent;

#ifdef __cplusplus
class VBComponent;
#endif

interface VBForm;

interface _ContainedVBControls;

#ifdef __cplusplus
class ContainedVBControls;
#endif

interface _VBControls;

#ifdef __cplusplus
class VBControls;
#endif

interface _SelectedControls;

#ifdef __cplusplus
class SelectedVBControls;
#endif

interface VBControl;

interface _AddIns;

#ifdef __cplusplus
class AddIns;
#endif

interface AddIn;

interface _Windows;

#ifdef __cplusplus
class Windows;
#endif

interface Window;

interface _LinkedWindows;

#ifdef __cplusplus
class LinkedWindows;
#endif

interface _Properties;

#ifdef __cplusplus
class Properties;
#endif

interface Events;

interface _VBProjectsEvents;

#ifdef __cplusplus
class VBProjectsEvents;
#endif

interface _VBComponentsEvents;

#ifdef __cplusplus
class VBComponentsEvents;
#endif

interface _ReferencesEvents;

#ifdef __cplusplus
class ReferencesEvents;
#endif

#ifdef __cplusplus
class VBControlsEvents;
#endif

#ifdef __cplusplus
class SelectedVBControlsEvents;
#endif

#ifdef __cplusplus
class FileControlEvents;
#endif

#ifdef __cplusplus
class CommandBarEvents;
#endif

#ifdef __cplusplus
class CodeModule;
#endif

#ifdef __cplusplus
class CodePanes;
#endif

#ifdef __cplusplus
class CodePane;
#endif

interface Reference;

interface _References;

#ifdef __cplusplus
class References;
#endif

#ifdef __cplusplus
class Members;
#endif

interface Member;

interface Application;

interface _ProjectTemplate;

interface _Components;

#ifdef __cplusplus
class Components;
#endif

interface _Component;

#ifdef __cplusplus
class Component;
#endif

interface SelectedComponents;

interface FormTemplate;

interface ControlTemplate;

interface ControlTemplates;

interface SelectedControlTemplates;

interface _MenuLine;

interface SubMenu;

interface _FileControl;

DEFINE_GUID(IID_Application,0xEF404E01L,0xEDA6,0x101A,0x8D,0xAF,0x00,0xDD,0x01,0x0F,0x7E,0xBB);

/* Definition of interface: Application */
#undef INTERFACE
#define INTERFACE Application

DECLARE_INTERFACE_(Application, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* Application methods */
    STDMETHOD(get_Name)(THIS_ BSTR FAR* lpbstrReturn) PURE;
    STDMETHOD(get_Application)(THIS_ Application FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_Parent)(THIS_ Application FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_FullName)(THIS_ BSTR FAR* lpbstrReturn) PURE;
    STDMETHOD(get_LastUsedPath)(THIS_ BSTR FAR* lpbstrReturn) PURE;
    STDMETHOD(put_LastUsedPath)(THIS_ BSTR bstrNewPath) PURE;
    STDMETHOD(get_Version)(THIS_ BSTR FAR* lpbstrReturn) PURE;
    STDMETHOD(get_ActiveProject)(THIS_ _ProjectTemplate FAR* FAR* lppptReturn) PURE;
    STDMETHOD(get_FileControl)(THIS_ _FileControl FAR* FAR* lppfcReturn) PURE;
    STDMETHOD(get_AddInMenu)(THIS_ SubMenu FAR* FAR* lppmReturn) PURE;
    STDMETHOD(LoadProject)(THIS_ BSTR FileName, VARIANT_BOOL ReplaceCurrent, _ProjectTemplate FAR* FAR* lppptReturn) PURE;
    STDMETHOD(get_ReadOnlyMode)(THIS_ short FAR* pReadOnlyMode) PURE;
    STDMETHOD(put_ReadOnlyMode)(THIS_ short ReadOnlyMode) PURE;
};

typedef enum vbextFileTypes {
    vbextFileTypeForm = 0,
    vbextFileTypeModule = 1,
    vbextFileTypeClass = 2,
    vbextFileTypeProject = 3,
    vbextFileTypeExe = 4,
    vbextFileTypeFrx = 5,
    vbextFileTypeRes = 6,
    vbextFileTypeUserControl = 7,
    vbextFileTypePropertyPage = 8,
    vbextFileTypeDocObject = 9,
    vbextFileTypeBinary = 10,
    vbextFileTypeGroupProject = 11,
    vbextFileTypeDesigners = 12
} vbextFileTypes;

typedef enum vbext_FileType {
    vbext_ft_Form = 0,
    vbext_ft_Module = 1,
    vbext_ft_Class = 2,
    vbext_ft_Project = 3,
    vbext_ft_Exe = 4,
    vbext_ft_Frx = 5,
    vbext_ft_Res = 6,
    vbext_ft_UserControl = 7,
    vbext_ft_PropertyPage = 8,
    vbext_ft_DocObject = 9,
    vbext_ft_Binary = 10,
    vbext_ft_GroupProject = 11,
    vbext_ft_Designers = 12
} vbext_FileType;

typedef enum vbextWrite {
    vbextWriteSuccess = 0,
    vbextWriteCancelled = 1,
    vbextWriteFailed = 2
} vbextWrite;

typedef enum vbextDisconnectMode {
    vbextHostShutdown = 0,
    vbextUserClosed = 1
} vbextDisconnectMode;

typedef enum vbext_VBADisplayModel {
    vbext_dm_SDI = 0,
    vbext_dm_MDI = 1
} vbext_VBADisplayModel;

DEFINE_GUID(IID_VBEOBJ,0x0002E100L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: VBEOBJ */
#undef INTERFACE
#define INTERFACE VBEOBJ

DECLARE_INTERFACE_(VBEOBJ, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* VBEOBJ methods */
    STDMETHOD(get_Name)(THIS_ BSTR FAR* lpbstrReturn) PURE;
    STDMETHOD(get_FullName)(THIS_ BSTR FAR* lpbstrReturn) PURE;
    STDMETHOD(get_LastUsedPath)(THIS_ BSTR FAR* lpbstrReturn) PURE;
    STDMETHOD(put_LastUsedPath)(THIS_ BSTR bstrNewPath) PURE;
    STDMETHOD(get_Version)(THIS_ BSTR FAR* lpbstrReturn) PURE;
    STDMETHOD(get_ReadOnlyMode)(THIS_ short FAR* pReadOnlyMode) PURE;
    STDMETHOD(put_ReadOnlyMode)(THIS_ short ReadOnlyMode) PURE;
    STDMETHOD(get_VBProjects)(THIS_ VBProjects FAR* FAR* lppptReturn) PURE;
    STDMETHOD(get_CommandBars)(THIS_ CommandBars FAR* FAR* ppcbs) PURE;
    STDMETHOD(get_CodePanes)(THIS_ CodePanes FAR* FAR* ppCodePanes) PURE;
    STDMETHOD(get_Windows)(THIS_ Windows FAR* FAR* ppwnsVBWindows) PURE;
    STDMETHOD(get_Events)(THIS_ Events FAR* FAR* ppevtEvents) PURE;
    STDMETHOD(get_AddIns)(THIS_ AddIns FAR* FAR* lpppAddIns) PURE;
    STDMETHOD(get_ActiveVBProject)(THIS_ VBProject FAR* FAR* lppptReturn) PURE;
    STDMETHOD(putref_ActiveVBProject)(THIS_ VBProject FAR* lppptReturn) PURE;
    STDMETHOD(get_SelectedVBComponent)(THIS_ VBComponent FAR* FAR* lppscReturn) PURE;
    STDMETHOD(get_TemplatePath)(THIS_ BSTR FAR* lpbstrPath) PURE;
    STDMETHOD(get_MainWindow)(THIS_ Window FAR* FAR* ppwin) PURE;
    STDMETHOD(get_ActiveWindow)(THIS_ Window FAR* FAR* ppwinActive) PURE;
    STDMETHOD(get_ActiveCodePane)(THIS_ CodePane FAR* FAR* ppCodePane) PURE;
    STDMETHOD(putref_ActiveCodePane)(THIS_ CodePane FAR* ppCodePane) PURE;
    STDMETHOD(Quit)(THIS) PURE;
    STDMETHOD(get_DisplayModel)(THIS_ enum vbext_VBADisplayModel FAR* lpDispModel) PURE;
    STDMETHOD(put_DisplayModel)(THIS_ enum vbext_VBADisplayModel DispModel) PURE;
    STDMETHOD(get_Reserved0)(THIS_ AddIns FAR* FAR* lpppAddIns) PURE;
};

DEFINE_GUID(IID__FileControl,0xEF404E08L,0xEDA6,0x101A,0x8D,0xAF,0x00,0xDD,0x01,0x0F,0x7E,0xBB);

/* Definition of interface: _FileControl */
#undef INTERFACE
#define INTERFACE _FileControl

DECLARE_INTERFACE_(_FileControl, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _FileControl methods */
    STDMETHOD(get_Application)(THIS_ Application FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_Parent)(THIS_ Application FAR* FAR* lppaReturn) PURE;
    STDMETHOD(ConnectEvents)(THIS_ IDispatch * pdspSink, long FAR* lplReturn) PURE;
    STDMETHOD(DisconnectEvents)(THIS_ long hConnection) PURE;
};

DEFINE_GUID(DIID__FileControlEvents,0xEF404E0AL,0xEDA6,0x101A,0x8D,0xAF,0x00,0xDD,0x01,0x0F,0x7E,0xBB);

/* Definition of dispatch interface: _FileControlEvents */
#undef INTERFACE
#define INTERFACE _FileControlEvents

DECLARE_INTERFACE_(_FileControlEvents, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _FileControlEvents methods:
    void AfterAddFile(BSTR FileName);
    void AfterChangeFileName(short FileType, BSTR NewName, BSTR OldName);
    void AfterCloseFile(SAFEARRAY FAR* FileNames);
    void AfterWriteFile(BSTR FileName, short Result);
    void AfterRemoveFile(BSTR FileName);
    void BeforeLoadFile(SAFEARRAY FAR* FileNames);
    void DoGetAddFileName(SAFEARRAY FAR* FileNames, VARIANT_BOOL FAR* CancelDefault);
    void DoGetNewFileName(short FileType, BSTR FAR* NewName, BSTR OldName, VARIANT_BOOL FAR* CancelDefault);
    void DoGetOpenProjectName(BSTR FAR* ProjectName, VARIANT_BOOL FAR* CancelDefault);
    void RequestChangeFileName(short FileType, BSTR NewName, BSTR OldName, VARIANT_BOOL FAR* Cancel);
    void RequestWriteFile(BSTR FileName, VARIANT_BOOL FAR* Cancel);
    void AfterNewProject(BSTR ProjectName);
    */
};

DEFINE_GUID(CLSID_FileControl,0xEF404E0BL,0xEDA6,0x101A,0x8D,0xAF,0x00,0xDD,0x01,0x0F,0x7E,0xBB);

#ifdef __cplusplus
class FileControl;
#endif

DEFINE_GUID(IID_MenuItems,0xEF404E12L,0xEDA6,0x101A,0x8D,0xAF,0x00,0xDD,0x01,0x0F,0x7E,0xBB);

/* Definition of interface: MenuItems */
#undef INTERFACE
#define INTERFACE MenuItems

DECLARE_INTERFACE_(MenuItems, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* MenuItems methods */
    STDMETHOD(Item)(THIS_ BSTR Index, IDispatch * FAR* lppidReturn) PURE;
    STDMETHOD(get_Application)(THIS_ Application FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_Parent)(THIS_ IDispatch * FAR* lppidReturn) PURE;
    STDMETHOD(_NewEnum)(THIS_ IUnknown * FAR* lppiuReturn) PURE;
    STDMETHOD(get_Count)(THIS_ long FAR* lplReturn) PURE;
    STDMETHOD(Add)(THIS_ BSTR bstrCaption, _MenuLine FAR* FAR* lppmlReturn) PURE;
    STDMETHOD(AddMenu)(THIS_ BSTR bstrCaption, SubMenu FAR* FAR* lppmReturn) PURE;
    STDMETHOD(Remove)(THIS_ IDispatch * MenuItem, long FAR* lpsReturn) PURE;
};

DEFINE_GUID(IID_SubMenu,0xEF404E15L,0xEDA6,0x101A,0x8D,0xAF,0x00,0xDD,0x01,0x0F,0x7E,0xBB);

/* Definition of interface: SubMenu */
#undef INTERFACE
#define INTERFACE SubMenu

DECLARE_INTERFACE_(SubMenu, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* SubMenu methods */
    STDMETHOD(get_MenuItems)(THIS_ MenuItems FAR* FAR* lppmiReturn) PURE;
    STDMETHOD(get_Application)(THIS_ Application FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_Parent)(THIS_ MenuItems FAR* FAR* lppmiReturn) PURE;
    STDMETHOD(get_Caption)(THIS_ BSTR FAR* lpbstrReturn) PURE;
    STDMETHOD(put_Caption)(THIS_ BSTR bstrCaption) PURE;
    STDMETHOD(get_Enabled)(THIS_ VARIANT_BOOL FAR* lpfReturn) PURE;
    STDMETHOD(put_Enabled)(THIS_ VARIANT_BOOL sEnabled) PURE;
};

DEFINE_GUID(IID__MenuLine,0xEF404E18L,0xEDA6,0x101A,0x8D,0xAF,0x00,0xDD,0x01,0x0F,0x7E,0xBB);

/* Definition of interface: _MenuLine */
#undef INTERFACE
#define INTERFACE _MenuLine

DECLARE_INTERFACE_(_MenuLine, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _MenuLine methods */
    STDMETHOD(get_Caption)(THIS_ BSTR FAR* lpbstrReturn) PURE;
    STDMETHOD(put_Caption)(THIS_ BSTR bstrCaption) PURE;
    STDMETHOD(get_Application)(THIS_ Application FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_Parent)(THIS_ MenuItems FAR* FAR* lppmiReturn) PURE;
    STDMETHOD(get_Enabled)(THIS_ VARIANT_BOOL FAR* lpfReturn) PURE;
    STDMETHOD(put_Enabled)(THIS_ VARIANT_BOOL sEnabled) PURE;
    STDMETHOD(get_Checked)(THIS_ VARIANT_BOOL FAR* lpfReturn) PURE;
    STDMETHOD(put_Checked)(THIS_ VARIANT_BOOL fChecked) PURE;
    STDMETHOD(get_HelpContextID)(THIS_ long FAR* lplReturn) PURE;
    STDMETHOD(put_HelpContextID)(THIS_ long ulHelpID) PURE;
    STDMETHOD(get_HelpFile)(THIS_ BSTR FAR* lpbstrReturn) PURE;
    STDMETHOD(put_HelpFile)(THIS_ BSTR bstrFileName) PURE;
    STDMETHOD(ConnectEvents)(THIS_ IDispatch * pdspSink, long FAR* lplReturn) PURE;
    STDMETHOD(DisconnectEvents)(THIS_ long hConnection) PURE;
};

DEFINE_GUID(DIID_MenuLineEvents,0xEF404E1AL,0xEDA6,0x101A,0x8D,0xAF,0x00,0xDD,0x01,0x0F,0x7E,0xBB);

/* Definition of dispatch interface: MenuLineEvents */
#undef INTERFACE
#define INTERFACE MenuLineEvents

DECLARE_INTERFACE_(MenuLineEvents, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* MenuLineEvents methods:
    void AfterClick(void);
    */
};

DEFINE_GUID(CLSID_MenuLine,0xEF404E1BL,0xEDA6,0x101A,0x8D,0xAF,0x00,0xDD,0x01,0x0F,0x7E,0xBB);

#ifdef __cplusplus
class MenuLine;
#endif

typedef enum vbext_WindowType {
    vbext_wt_CodeWindow = 0,
    vbext_wt_Designer = 1,
    vbext_wt_Browser = 2,
    vbext_wt_Watch = 3,
    vbext_wt_Locals = 4,
    vbext_wt_Immediate = 5,
    vbext_wt_ProjectWindow = 6,
    vbext_wt_PropertyWindow = 7,
    vbext_wt_Find = 8,
    vbext_wt_FindReplace = 9,
    vbext_wt_Toolbox = 10,
    vbext_wt_LinkedWindowFrame = 11,
    vbext_wt_MainWindow = 12,
    vbext_wt_Preview = 13,
    vbext_wt_ColorPalette = 14,
    vbext_wt_ToolWindow = 15
} vbext_WindowType;

typedef enum vbext_WindowState {
    vbext_ws_Normal = 0,
    vbext_ws_Minimize = 1,
    vbext_ws_Maximize = 2
} vbext_WindowState;

DEFINE_GUID(IID_Window,0x0002E10EL,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: Window */
#undef INTERFACE
#define INTERFACE Window

DECLARE_INTERFACE_(Window, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* Window methods */
    STDMETHOD(get_VBEOBJ)(THIS_ VBEOBJ FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_Collection)(THIS_ Windows FAR* FAR* lppaReturn) PURE;
    STDMETHOD(Close)(THIS) PURE;
    STDMETHOD(get_Caption)(THIS_ BSTR FAR* pbstrTitle) PURE;
    STDMETHOD(get_Visible)(THIS_ VARIANT_BOOL FAR* pfVisible) PURE;
    STDMETHOD(put_Visible)(THIS_ VARIANT_BOOL fVisible) PURE;
    STDMETHOD(get_Left)(THIS_ long FAR* plLeft) PURE;
    STDMETHOD(put_Left)(THIS_ long lLeft) PURE;
    STDMETHOD(get_Top)(THIS_ long FAR* plTop) PURE;
    STDMETHOD(put_Top)(THIS_ long lTop_r) PURE;
    STDMETHOD(get_Width)(THIS_ long FAR* plWidth) PURE;
    STDMETHOD(put_Width)(THIS_ long lWidth) PURE;
    STDMETHOD(get_Height)(THIS_ long FAR* plHeight) PURE;
    STDMETHOD(put_Height)(THIS_ long lHeight_r) PURE;
    STDMETHOD(get_WindowState)(THIS_ enum vbext_WindowState FAR* plWindowState) PURE;
    STDMETHOD(put_WindowState)(THIS_ enum vbext_WindowState wstWindowState) PURE;
    STDMETHOD(SetFocus)(THIS) PURE;
    STDMETHOD(get_Type)(THIS_ enum vbext_WindowType FAR* pKind) PURE;
    STDMETHOD(SetKind)(THIS_ enum vbext_WindowType eKind) PURE;
    STDMETHOD(get_LinkedWindows)(THIS_ LinkedWindows FAR* FAR* ppwnsCollection) PURE;
    STDMETHOD(get_LinkedWindowFrame)(THIS_ Window FAR* FAR* ppwinFrame) PURE;
    STDMETHOD(Detach)(THIS) PURE;
    STDMETHOD(Attach)(THIS_ long lWindowHandle) PURE;
    STDMETHOD(get_HWnd)(THIS_ long FAR* plWindowHandle) PURE;
};

DEFINE_GUID(IID__Windows,0x0002E10DL,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: _Windows */
#undef INTERFACE
#define INTERFACE _Windows

DECLARE_INTERFACE_(_Windows, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _Windows methods */
    STDMETHOD(get_VBEOBJ)(THIS_ VBEOBJ FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_Parent)(THIS_ VBEOBJ FAR* FAR* lppaReturn) PURE;
    STDMETHOD(Item)(THIS_ VARIANT index, Window FAR* FAR* lppcReturn) PURE;
    STDMETHOD(get_Count)(THIS_ long FAR* lplReturn) PURE;
    STDMETHOD(_NewEnum)(THIS_ IUnknown * FAR* lppiuReturn) PURE;
    STDMETHOD(CreateToolWindow)(THIS_ AddIn FAR* AddInInst, BSTR ProgId, BSTR Caption, BSTR GuidPosition, IDispatch * FAR* DocObj, Window FAR* FAR* lppcReturn) PURE;
};

DEFINE_GUID(CLSID_Windows,0x0002E184L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

#ifdef __cplusplus
class Windows;
#endif

DEFINE_GUID(IID__LinkedWindows,0x0002E10FL,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: _LinkedWindows */
#undef INTERFACE
#define INTERFACE _LinkedWindows

DECLARE_INTERFACE_(_LinkedWindows, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _LinkedWindows methods */
    STDMETHOD(get_VBEOBJ)(THIS_ VBEOBJ FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_Parent)(THIS_ Window FAR* FAR* ppptReturn) PURE;
    STDMETHOD(Item)(THIS_ VARIANT index, Window FAR* FAR* lppcReturn) PURE;
    STDMETHOD(get_Count)(THIS_ long FAR* lplReturn) PURE;
    STDMETHOD(_NewEnum)(THIS_ IUnknown * FAR* lppiuReturn) PURE;
    STDMETHOD(Remove)(THIS_ Window FAR* Window) PURE;
    STDMETHOD(Add)(THIS_ Window FAR* Window) PURE;
};

DEFINE_GUID(CLSID_LinkedWindows,0x0002E186L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

#ifdef __cplusplus
class LinkedWindows;
#endif

DEFINE_GUID(IID_Events,0x0002E112L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: Events */
#undef INTERFACE
#define INTERFACE Events

DECLARE_INTERFACE_(Events, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* Events methods */
    STDMETHOD(get_VBProjectsEvents)(THIS_ VBProjectsEvents FAR* FAR* ppceNew) PURE;
    STDMETHOD(get_VBComponentsEvents)(THIS_ VBProject FAR* VBProject, VBComponentsEvents FAR* FAR* pcceNew) PURE;
    STDMETHOD(get_ReferencesEvents)(THIS_ VBProject FAR* VBProject, ReferencesEvents FAR* FAR* prceNew) PURE;
    STDMETHOD(get_VBControlsEvents)(THIS_ VBProject FAR* VBProject, VBForm FAR* VBForm, VBControlsEvents FAR* FAR* prceNew) PURE;
    STDMETHOD(get_SelectedVBControlsEvents)(THIS_ VBProject FAR* VBProject, VBForm FAR* VBForm, SelectedVBControlsEvents FAR* FAR* prceNew) PURE;
    STDMETHOD(get_CommandBarEvents)(THIS_ IDispatch * CommandBarControl, CommandBarEvents FAR* FAR* prceNew) PURE;
    STDMETHOD(get_FileControlEvents)(THIS_ VBProject FAR* VBProject, FileControlEvents FAR* FAR* prceNew) PURE;
};

DEFINE_GUID(IID__VBProjectsEvents,0x0002E191L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: _VBProjectsEvents */
#undef INTERFACE
#define INTERFACE _VBProjectsEvents

DECLARE_INTERFACE_(_VBProjectsEvents, IUnknown)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;
#endif

    /* _VBProjectsEvents methods */
};

DEFINE_GUID(DIID__dispVBProjectsEvents,0x0002E190L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of dispatch interface: _dispVBProjectsEvents */
#undef INTERFACE
#define INTERFACE _dispVBProjectsEvents

DECLARE_INTERFACE_(_dispVBProjectsEvents, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _dispVBProjectsEvents methods:
    void ItemAdded(VBProject FAR* VBProject);
    void ItemRemoved(VBProject FAR* VBProject);
    void ItemRenamed(VBProject FAR* VBProject, BSTR OldName);
    void ItemActivated(VBProject FAR* VBProject);
    */
};

DEFINE_GUID(CLSID_VBProjectsEvents,0x0002E114L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

#ifdef __cplusplus
class VBProjectsEvents;
#endif

DEFINE_GUID(IID__VBComponentsEvents,0x0002E192L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: _VBComponentsEvents */
#undef INTERFACE
#define INTERFACE _VBComponentsEvents

DECLARE_INTERFACE_(_VBComponentsEvents, IUnknown)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;
#endif

    /* _VBComponentsEvents methods */
};

DEFINE_GUID(DIID__dispVBComponentsEvents,0x0002E193L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of dispatch interface: _dispVBComponentsEvents */
#undef INTERFACE
#define INTERFACE _dispVBComponentsEvents

DECLARE_INTERFACE_(_dispVBComponentsEvents, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _dispVBComponentsEvents methods:
    void ItemAdded(VBComponent FAR* VBComponent);
    void ItemRemoved(VBComponent FAR* VBComponent);
    void ItemRenamed(VBComponent FAR* VBComponent, BSTR OldName);
    void ItemSelected(VBComponent FAR* VBComponent);
    void ItemActivated(VBComponent FAR* VBComponent);
    void ItemReloaded(VBComponent FAR* VBComponent);
    */
};

DEFINE_GUID(CLSID_VBComponentsEvents,0x0002E117L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

#ifdef __cplusplus
class VBComponentsEvents;
#endif

DEFINE_GUID(IID__ReferencesEvents,0x0002E195L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: _ReferencesEvents */
#undef INTERFACE
#define INTERFACE _ReferencesEvents

DECLARE_INTERFACE_(_ReferencesEvents, IUnknown)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;
#endif

    /* _ReferencesEvents methods */
};

DEFINE_GUID(DIID__dispReferencesEvents,0x0002E194L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of dispatch interface: _dispReferencesEvents */
#undef INTERFACE
#define INTERFACE _dispReferencesEvents

DECLARE_INTERFACE_(_dispReferencesEvents, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _dispReferencesEvents methods:
    void ItemAdded(Reference FAR* Reference);
    void ItemRemoved(Reference FAR* Reference);
    */
};

DEFINE_GUID(CLSID_ReferencesEvents,0x0002E196L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

#ifdef __cplusplus
class ReferencesEvents;
#endif

DEFINE_GUID(IID__ContainedVBControlsEvents,0x0002E12AL,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: _ContainedVBControlsEvents */
#undef INTERFACE
#define INTERFACE _ContainedVBControlsEvents

DECLARE_INTERFACE_(_ContainedVBControlsEvents, IUnknown)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;
#endif

    /* _ContainedVBControlsEvents methods */
};

DEFINE_GUID(DIID__dispContainedVBControlsEvents,0x0002E122L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of dispatch interface: _dispContainedVBControlsEvents */
#undef INTERFACE
#define INTERFACE _dispContainedVBControlsEvents

DECLARE_INTERFACE_(_dispContainedVBControlsEvents, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _dispContainedVBControlsEvents methods:
    void ItemAdded(VBControl FAR* VBControl);
    void ItemRemoved(VBControl FAR* VBControl);
    void ItemRenamed(VBControl FAR* VBControl, BSTR OldName, long OldIndex);
    */
};

DEFINE_GUID(CLSID_VBControlsEvents,0x0002E12BL,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

#ifdef __cplusplus
class VBControlsEvents;
#endif

DEFINE_GUID(IID__SelectedVBControlsEvents,0x0002E12CL,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: _SelectedVBControlsEvents */
#undef INTERFACE
#define INTERFACE _SelectedVBControlsEvents

DECLARE_INTERFACE_(_SelectedVBControlsEvents, IUnknown)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;
#endif

    /* _SelectedVBControlsEvents methods */
};

DEFINE_GUID(DIID__dispSelectedVBControlsEvents,0x0002E125L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of dispatch interface: _dispSelectedVBControlsEvents */
#undef INTERFACE
#define INTERFACE _dispSelectedVBControlsEvents

DECLARE_INTERFACE_(_dispSelectedVBControlsEvents, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _dispSelectedVBControlsEvents methods:
    void ItemAdded(VBControl FAR* VBControl);
    void ItemRemoved(VBControl FAR* VBControl);
    */
};

DEFINE_GUID(CLSID_SelectedVBControlsEvents,0x0002E12DL,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

#ifdef __cplusplus
class SelectedVBControlsEvents;
#endif

DEFINE_GUID(IID__CommandBarControlEvents,0x0002E197L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: _CommandBarControlEvents */
#undef INTERFACE
#define INTERFACE _CommandBarControlEvents

DECLARE_INTERFACE_(_CommandBarControlEvents, IUnknown)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;
#endif

    /* _CommandBarControlEvents methods */
};

DEFINE_GUID(DIID__dispCommandBarControlEvents,0x0002E198L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of dispatch interface: _dispCommandBarControlEvents */
#undef INTERFACE
#define INTERFACE _dispCommandBarControlEvents

DECLARE_INTERFACE_(_dispCommandBarControlEvents, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _dispCommandBarControlEvents methods:
    void Click(IDispatch * CommandBarControl, VARIANT_BOOL FAR* handled, VARIANT_BOOL FAR* CancelDefault);
    */
};

DEFINE_GUID(CLSID_CommandBarEvents,0x0002E199L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

#ifdef __cplusplus
class CommandBarEvents;
#endif

DEFINE_GUID(IID__VBFileControlEvents,0x0002E142L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: _VBFileControlEvents */
#undef INTERFACE
#define INTERFACE _VBFileControlEvents

DECLARE_INTERFACE_(_VBFileControlEvents, IUnknown)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;
#endif

    /* _VBFileControlEvents methods */
};

DEFINE_GUID(DIID__dispVBFileControlEvents,0x0002E141L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of dispatch interface: _dispVBFileControlEvents */
#undef INTERFACE
#define INTERFACE _dispVBFileControlEvents

DECLARE_INTERFACE_(_dispVBFileControlEvents, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _dispVBFileControlEvents methods:
    void AfterAddFile(VBProject FAR* VBProject, enum vbext_FileType FileType, BSTR FileName);
    void AfterChangeFileName(VBProject FAR* VBProject, enum vbext_FileType FileType, BSTR NewName, BSTR OldName);
    void AfterCloseFile(VBProject FAR* VBProject, enum vbext_FileType FileType, BSTR FileName, VARIANT_BOOL WasDirty);
    void AfterWriteFile(VBProject FAR* VBProject, enum vbext_FileType FileType, BSTR FileName, short Result);
    void AfterRemoveFile(VBProject FAR* VBProject, enum vbext_FileType FileType, BSTR FileName);
    void BeforeLoadFile(VBProject FAR* VBProject, SAFEARRAY FAR* FAR* FileNames);
    void DoGetNewFileName(VBProject FAR* VBProject, enum vbext_FileType FileType, BSTR FAR* NewName, BSTR OldName, VARIANT_BOOL FAR* CancelDefault);
    void RequestChangeFileName(VBProject FAR* VBProject, enum vbext_FileType FileType, BSTR NewName, BSTR OldName, VARIANT_BOOL FAR* Cancel);
    void RequestWriteFile(VBProject FAR* VBProject, BSTR FileName, VARIANT_BOOL FAR* Cancel);
    */
};

DEFINE_GUID(CLSID_FileControlEvents,0x0002E140L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

#ifdef __cplusplus
class FileControlEvents;
#endif

DEFINE_GUID(IID__ProjectTemplate,0xEF404E22L,0xEDA6,0x101A,0x8D,0xAF,0x00,0xDD,0x01,0x0F,0x7E,0xBB);

/* Definition of interface: _ProjectTemplate */
#undef INTERFACE
#define INTERFACE _ProjectTemplate

DECLARE_INTERFACE_(_ProjectTemplate, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _ProjectTemplate methods */
    STDMETHOD(get_ActiveForm)(THIS_ FormTemplate FAR* FAR* lppftReturn) PURE;
    STDMETHOD(get_Application)(THIS_ Application FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_Parent)(THIS_ Application FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_SelectedComponents)(THIS_ SelectedComponents FAR* FAR* lppscReturn) PURE;
    STDMETHOD(AddFile)(THIS_ BSTR FileName, BSTR FAR* lpbstrReturn) PURE;
    STDMETHOD(RemoveComponent)(THIS_ Component FAR* Comp, VARIANT_BOOL Save, VARIANT_BOOL FAR* lpfReturn) PURE;
    STDMETHOD(AddReference)(THIS_ VARIANT Guid, VARIANT VerMajor, VARIANT VerMinor, VARIANT FileName) PURE;
    STDMETHOD(AddToolboxTypelib)(THIS_ BSTR Guid, short MajorVersion, short MinorVersion, VARIANT FileName) PURE;
    STDMETHOD(AddToolboxProgID)(THIS_ BSTR ProgID, VARIANT FileName) PURE;
    STDMETHOD(AddToolboxVBX)(THIS_ BSTR FileName) PURE;
    STDMETHOD(AddFormTemplate)(THIS_ FormTemplate FAR* FAR* lppftReturn) PURE;
    STDMETHOD(AddMDIFormTemplate)(THIS_ FormTemplate FAR* FAR* lppftReturn) PURE;
    STDMETHOD(get_FileName)(THIS_ BSTR FAR* lpbstrReturn) PURE;
    STDMETHOD(get_IsDirty)(THIS_ VARIANT_BOOL FAR* lpfReturn) PURE;
    STDMETHOD(put_IsDirty)(THIS_ VARIANT_BOOL Dirty) PURE;
    STDMETHOD(WriteProperty)(THIS_ BSTR Section, BSTR Key, BSTR Value) PURE;
    STDMETHOD(ReadProperty)(THIS_ BSTR Section, BSTR Key, BSTR FAR* lpbstrValue) PURE;
    STDMETHOD(ConnectEvents)(THIS_ IDispatch * pdspSink, long FAR* lplReturn) PURE;
    STDMETHOD(DisconnectEvents)(THIS_ long hConnection) PURE;
    STDMETHOD(get_Components)(THIS_ Components FAR* FAR* lppcReturn) PURE;
};

DEFINE_GUID(DIID_ProjectTemplateEvents,0x31DE1170L,0x1602,0x11CE,0xBF,0xDC,0x08,0x00,0x2B,0x2B,0x8C,0xDA);

/* Definition of dispatch interface: ProjectTemplateEvents */
#undef INTERFACE
#define INTERFACE ProjectTemplateEvents

DECLARE_INTERFACE_(ProjectTemplateEvents, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* ProjectTemplateEvents methods:
    void CheckIn(void);
    void CheckOut(void);
    void Fetch(void);
    void UncheckOut(void);
    */
};

DEFINE_GUID(CLSID_ProjectTemplate,0x32CDF9E0L,0x1602,0x11CE,0xBF,0xDC,0x08,0x00,0x2B,0x2B,0x8C,0xDA);

#ifdef __cplusplus
class ProjectTemplate;
#endif

typedef enum vbext_ProjectStartMode {
    vbext_psm_StandAlone = 0,
    vbext_psm_OleServer = 1
} vbext_ProjectStartMode;

typedef enum vbext_ProjectType {
    vbext_pt_StandardExe = 0,
    vbext_pt_ActiveXExe = 1,
    vbext_pt_ActiveXDll = 2,
    vbext_pt_ActiveXControl = 3
} vbext_ProjectType;

typedef enum vbextSCCStatus {
    vbextSCCStatusNotControlled = 0,
    vbextSCCStatusControlled = 1,
    vbextSCCStatusCheckedOut = 2,
    vbextSCCStatusOutOther = 4,
    vbextSCCStatusOutOfDate = 32,
    vbextSCCStatusShared = 512
} vbextSCCStatus;

typedef enum vbext_VBAMode {
    vbext_vm_Run = 0,
    vbext_vm_Break = 1,
    vbext_vm_Design = 2
} vbext_VBAMode;

DEFINE_GUID(IID__VBProject,0x0002E106L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: _VBProject */
#undef INTERFACE
#define INTERFACE _VBProject

DECLARE_INTERFACE_(_VBProject, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _VBProject methods */
    STDMETHOD(get_Name)(THIS_ BSTR FAR* lpbstrName) PURE;
    STDMETHOD(put_Name)(THIS_ BSTR bstrName) PURE;
    STDMETHOD(AddToolboxProgID)(THIS_ BSTR ProgID, VARIANT FileName) PURE;
    STDMETHOD(get_FileName)(THIS_ BSTR FAR* lpbstrReturn) PURE;
    STDMETHOD(get_IsDirty)(THIS_ VARIANT_BOOL FAR* lpfReturn) PURE;
    STDMETHOD(put_IsDirty)(THIS_ VARIANT_BOOL Dirty) PURE;
    STDMETHOD(WriteProperty)(THIS_ BSTR Section, BSTR Key, BSTR Value) PURE;
    STDMETHOD(ReadProperty)(THIS_ BSTR Section, BSTR Key, BSTR FAR* lpbstrValue) PURE;
    STDMETHOD(get_HelpFile)(THIS_ BSTR FAR* lpbstrHelpFile) PURE;
    STDMETHOD(put_HelpFile)(THIS_ BSTR bstrHelpFile) PURE;
    STDMETHOD(get_HelpContextID)(THIS_ long FAR* lpdwContextID) PURE;
    STDMETHOD(put_HelpContextID)(THIS_ long dwContextID) PURE;
    STDMETHOD(get_Description)(THIS_ BSTR FAR* lpbstrDescription) PURE;
    STDMETHOD(put_Description)(THIS_ BSTR bstrDescription) PURE;
    STDMETHOD(get_References)(THIS_ References FAR* FAR* lppReferences) PURE;
    STDMETHOD(get_VBEOBJ)(THIS_ VBEOBJ FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_Collection)(THIS_ VBProjects FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_StartMode)(THIS_ enum vbext_ProjectStartMode FAR* lpStartMode) PURE;
    STDMETHOD(put_StartMode)(THIS_ enum vbext_ProjectStartMode StartMode) PURE;
    STDMETHOD(get_CompatibleOleServer)(THIS_ BSTR FAR* lpbstrCompatibleOleServer) PURE;
    STDMETHOD(put_CompatibleOleServer)(THIS_ BSTR bstrCompatibleOleServer) PURE;
    STDMETHOD(SaveAs)(THIS_ BSTR FileName) PURE;
    STDMETHOD(MakeCompiledFile)(THIS) PURE;
    STDMETHOD(get_Type)(THIS_ enum vbext_ProjectType FAR* lpkind) PURE;
    STDMETHOD(put_Type)(THIS_ enum vbext_ProjectType Type) PURE;
    STDMETHOD(get_IconState)(THIS_ enum vbextSCCStatus FAR* lpIconState) PURE;
    STDMETHOD(put_IconState)(THIS_ enum vbextSCCStatus IconState) PURE;
    STDMETHOD(get_Saved)(THIS_ VARIANT_BOOL FAR* lpfReturn) PURE;
    STDMETHOD(get_VBComponents)(THIS_ VBComponents FAR* FAR* lppcReturn) PURE;
    STDMETHOD(get_BuildFileName)(THIS_ BSTR FAR* lpbstrBldFName) PURE;
    STDMETHOD(put_BuildFileName)(THIS_ BSTR bstrBldFName) PURE;
};

DEFINE_GUID(CLSID_VBProject,0x0002E105L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

#ifdef __cplusplus
class VBProject;
#endif

DEFINE_GUID(IID_VBNewProjects,0x0002E133L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: VBNewProjects */
#undef INTERFACE
#define INTERFACE VBNewProjects

DECLARE_INTERFACE_(VBNewProjects, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* VBNewProjects methods */
    STDMETHOD(Item)(THIS_ VARIANT index, VBProject FAR* FAR* lppcReturn) PURE;
    STDMETHOD(get_VBEOBJ)(THIS_ VBEOBJ FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_Count)(THIS_ long FAR* lplReturn) PURE;
    STDMETHOD(_NewEnum)(THIS_ IUnknown * FAR* lppiuReturn) PURE;
};

DEFINE_GUID(IID__VBProjects,0x0002E102L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: _VBProjects */
#undef INTERFACE
#define INTERFACE _VBProjects

DECLARE_INTERFACE_(_VBProjects, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _VBProjects methods */
    STDMETHOD(Item)(THIS_ VARIANT index, VBProject FAR* FAR* lppcReturn) PURE;
    STDMETHOD(get_VBEOBJ)(THIS_ VBEOBJ FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_Parent)(THIS_ VBEOBJ FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_Count)(THIS_ long FAR* lplReturn) PURE;
    STDMETHOD(_NewEnum)(THIS_ IUnknown * FAR* lppiuReturn) PURE;
    STDMETHOD(Add)(THIS_ enum vbext_ProjectType Type, VARIANT_BOOL Exclusive, VBProject FAR* FAR* lppcReturn) PURE;
    STDMETHOD(AddFromTemplate)(THIS_ BSTR PathName, VARIANT_BOOL Exclusive, VBNewProjects FAR* FAR* lppcReturn) PURE;
    STDMETHOD(AddFromFile)(THIS_ BSTR PathName, VARIANT_BOOL Exclusive, VBNewProjects FAR* FAR* lppcReturn) PURE;
    STDMETHOD(Remove)(THIS_ VBProject FAR* lpc) PURE;
    STDMETHOD(get_StartProject)(THIS_ VBProject FAR* FAR* lppptReturn) PURE;
    STDMETHOD(put_StartProject)(THIS_ VBProject FAR* lpptNewActiveProj) PURE;
    STDMETHOD(FileName)(THIS_ BSTR FAR* lpbstrReturn) PURE;
    STDMETHOD(get_IconState)(THIS_ enum vbextSCCStatus FAR* lpIconState) PURE;
    STDMETHOD(put_IconState)(THIS_ enum vbextSCCStatus IconState) PURE;
    STDMETHOD(SaveAs)(THIS_ BSTR PathName) PURE;
};

DEFINE_GUID(CLSID_VBProjects,0xBE39F3D3L,0x1B13,0x11D0,0x88,0x7F,0x00,0xA0,0xC9,0x0F,0x27,0x44);

#ifdef __cplusplus
class VBProjects;
#endif

DEFINE_GUID(IID_SelectedComponents,0xEF404E1CL,0xEDA6,0x101A,0x8D,0xAF,0x00,0xDD,0x01,0x0F,0x7E,0xBB);

/* Definition of interface: SelectedComponents */
#undef INTERFACE
#define INTERFACE SelectedComponents

DECLARE_INTERFACE_(SelectedComponents, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* SelectedComponents methods */
    STDMETHOD(Item)(THIS_ int index, Component FAR* FAR* lppcReturn) PURE;
    STDMETHOD(get_Application)(THIS_ Application FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_Parent)(THIS_ VBProject FAR* FAR* lppptReturn) PURE;
    STDMETHOD(get_Count)(THIS_ long FAR* lplReturn) PURE;
    STDMETHOD(_NewEnum)(THIS_ IUnknown * FAR* lppiuReturn) PURE;
};

typedef enum vbext_ComponentType {
    vbext_ct_StdModule = 1,
    vbext_ct_ClassModule = 2,
    vbext_ct_MSForm = 3,
    vbext_ct_ResFile = 4,
    vbext_ct_VBForm = 5,
    vbext_ct_VBMDIForm = 6,
    vbext_ct_PropPage = 7,
    vbext_ct_UserControl = 8,
    vbext_ct_DocObject = 9,
    vbext_ct_RelatedDocument = 10,
    vbext_ct_ActiveXDesigner = 11
} vbext_ComponentType;

DEFINE_GUID(IID__Components,0x2F3304A0L,0x1602,0x11CE,0xBF,0xDC,0x08,0x00,0x2B,0x2B,0x8C,0xDA);

/* Definition of interface: _Components */
#undef INTERFACE
#define INTERFACE _Components

DECLARE_INTERFACE_(_Components, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _Components methods */
    STDMETHOD(Item)(THIS_ VARIANT index, Component FAR* FAR* lppcReturn) PURE;
    STDMETHOD(get_Application)(THIS_ Application FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_Parent)(THIS_ ProjectTemplate FAR* FAR* lppptReturn) PURE;
    STDMETHOD(get_Count)(THIS_ long FAR* lplReturn) PURE;
    STDMETHOD(_NewEnum)(THIS_ IUnknown * FAR* lppiuReturn) PURE;
};

typedef enum vbext_StartupObject {
    vbext_so_SubMain = 0,
    vbext_so_None = 1
} vbext_StartupObject;

DEFINE_GUID(CLSID_Components,0x0002E143L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

#ifdef __cplusplus
class Components;
#endif

DEFINE_GUID(IID__VBComponents,0x0002E147L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: _VBComponents */
#undef INTERFACE
#define INTERFACE _VBComponents

DECLARE_INTERFACE_(_VBComponents, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _VBComponents methods */
    STDMETHOD(Item)(THIS_ VARIANT index, VBComponent FAR* FAR* lppcReturn) PURE;
    STDMETHOD(get_Parent)(THIS_ VBProject FAR* FAR* lppptReturn) PURE;
    STDMETHOD(get_Count)(THIS_ long FAR* lplReturn) PURE;
    STDMETHOD(_NewEnum)(THIS_ IUnknown * FAR* lppiuReturn) PURE;
    STDMETHOD(Remove)(THIS_ VBComponent FAR* VBComponent) PURE;
    STDMETHOD(Add)(THIS_ enum vbext_ComponentType ComponentType, VBComponent FAR* FAR* lppComponent) PURE;
    STDMETHOD(get_VBEOBJ)(THIS_ VBEOBJ FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_StartUpObject)(THIS_ VARIANT FAR* lpVar) PURE;
    STDMETHOD(put_StartUpObject)(THIS_ VARIANT varInput) PURE;
    STDMETHOD(AddFile)(THIS_ BSTR FileName, VARIANT_BOOL RelatedDocuement, VBComponent FAR* FAR* lppComponent) PURE;
    STDMETHOD(AddFromTemplate)(THIS_ BSTR FileName, VBComponent FAR* FAR* lppComponent) PURE;
    STDMETHOD(AddCustom)(THIS_ BSTR ProgID, VBComponent FAR* FAR* lppComponent) PURE;
};

DEFINE_GUID(CLSID_VBComponents,0x0002E146L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x49);

#ifdef __cplusplus
class VBComponents;
#endif

DEFINE_GUID(IID__Component,0xEF404E1FL,0xEDA6,0x101A,0x8D,0xAF,0x00,0xDD,0x01,0x0F,0x7E,0xBB);

/* Definition of interface: _Component */
#undef INTERFACE
#define INTERFACE _Component

DECLARE_INTERFACE_(_Component, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _Component methods */
    STDMETHOD(get_Application)(THIS_ Application FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_Parent)(THIS_ Components FAR* FAR* lppcReturn) PURE;
    STDMETHOD(get_IsDirty)(THIS_ VARIANT_BOOL FAR* lpfReturn) PURE;
    STDMETHOD(put_IsDirty)(THIS_ VARIANT_BOOL DirtyFlag) PURE;
    STDMETHOD(get_FileNames)(THIS_ short Index, BSTR FAR* lpbstrReturn) PURE;
    STDMETHOD(SaveAs)(THIS_ BSTR NewFileName, VARIANT_BOOL FAR* lpfReturn) PURE;
    STDMETHOD(get_FileCount)(THIS_ short FAR* lpsReturn) PURE;
    STDMETHOD(get_IconState)(THIS_ long FAR* lpulReturn) PURE;
    STDMETHOD(put_IconState)(THIS_ long Value) PURE;
    STDMETHOD(InsertFile)(THIS_ BSTR FileName) PURE;
    STDMETHOD(Reload)(THIS) PURE;
    STDMETHOD(get_Name)(THIS_ BSTR FAR* pbstrReturn) PURE;
    STDMETHOD(put_Name)(THIS_ BSTR bstrName) PURE;
};

DEFINE_GUID(CLSID_Component,0x0002E144L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

#ifdef __cplusplus
class Component;
#endif

DEFINE_GUID(IID__VBComponent,0x0002E148L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: _VBComponent */
#undef INTERFACE
#define INTERFACE _VBComponent

DECLARE_INTERFACE_(_VBComponent, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _VBComponent methods */
    STDMETHOD(get_IsDirty)(THIS_ VARIANT_BOOL FAR* lpfReturn) PURE;
    STDMETHOD(put_IsDirty)(THIS_ VARIANT_BOOL DirtyFlag) PURE;
    STDMETHOD(get_FileNames)(THIS_ short Index, BSTR FAR* lpbstrReturn) PURE;
    STDMETHOD(SaveAs)(THIS_ BSTR NewFileName, VARIANT_BOOL FAR* lpfReturn) PURE;
    STDMETHOD(get_FileCount)(THIS_ short FAR* lpsReturn) PURE;
    STDMETHOD(get_IconState)(THIS_ long FAR* lpulReturn) PURE;
    STDMETHOD(put_IconState)(THIS_ long Value) PURE;
    STDMETHOD(InsertFile)(THIS_ BSTR FileName) PURE;
    STDMETHOD(Reload)(THIS) PURE;
    STDMETHOD(get_Name)(THIS_ BSTR FAR* pbstrReturn) PURE;
    STDMETHOD(put_Name)(THIS_ BSTR bstrName) PURE;
    STDMETHOD(get_Designer)(THIS_ IDispatch * FAR* ppDispatch) PURE;
    STDMETHOD(get_CodeModule)(THIS_ CodeModule FAR* FAR* ppVbaModule) PURE;
    STDMETHOD(get_Type)(THIS_ enum vbext_ComponentType FAR* pkind) PURE;
    STDMETHOD(get_VBEOBJ)(THIS_ VBEOBJ FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_Collection)(THIS_ VBComponents FAR* FAR* lppcReturn) PURE;
    STDMETHOD(get_HasOpenDesigner)(THIS_ VARIANT_BOOL FAR* lpfReturn) PURE;
    STDMETHOD(get_Properties)(THIS_ Properties FAR* FAR* lpppReturn) PURE;
    STDMETHOD(DesignerWindow)(THIS_ Window FAR* FAR* lppcReturn) PURE;
    STDMETHOD(ReadProperty)(THIS_ BSTR Key, BSTR FAR* lpbstrValue) PURE;
    STDMETHOD(WriteProperty)(THIS_ BSTR Key, BSTR Value) PURE;
    STDMETHOD(Activate)(THIS) PURE;
    STDMETHOD(get_HelpContextID)(THIS_ long FAR* lpdwContextID) PURE;
    STDMETHOD(put_HelpContextID)(THIS_ long dwContextID) PURE;
    STDMETHOD(get_Description)(THIS_ BSTR FAR* lpbstrDescription) PURE;
    STDMETHOD(put_Description)(THIS_ BSTR bstrDescription) PURE;
    STDMETHOD(get_DesignerID)(THIS_ BSTR FAR* pbstrReturn) PURE;
};

DEFINE_GUID(CLSID_VBComponent,0x0002E145L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x49);

#ifdef __cplusplus
class VBComponent;
#endif

DEFINE_GUID(IID_FormTemplate,0x79B1F921L,0xEC2C,0x101A,0xB1,0xF9,0x08,0x00,0x2B,0x2B,0x8C,0xDA);

/* Definition of interface: FormTemplate */
#undef INTERFACE
#define INTERFACE FormTemplate

DECLARE_INTERFACE_(FormTemplate, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* FormTemplate methods */
    STDMETHOD(get_Application)(THIS_ Application FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_Parent)(THIS_ _ProjectTemplate FAR* FAR* lppptReturn) PURE;
    STDMETHOD(get_SelectedControlTemplates)(THIS_ SelectedControlTemplates FAR* FAR* lppsctReturn) PURE;
    STDMETHOD(get_ControlTemplates)(THIS_ ControlTemplates FAR* FAR* lppctReturn) PURE;
    STDMETHOD(get_Properties)(THIS_ Properties FAR* FAR* lpppReturn) PURE;
    STDMETHOD(AddMenuTemplate)(THIS_ BSTR Name, ControlTemplate FAR* Parent, ControlTemplate FAR* FAR* lppctReturn) PURE;
    STDMETHOD(InsertFile)(THIS_ BSTR FileName) PURE;
};

DEFINE_GUID(IID_VBForm,0x0002E11BL,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: VBForm */
#undef INTERFACE
#define INTERFACE VBForm

DECLARE_INTERFACE_(VBForm, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* VBForm methods */
    STDMETHOD(get_VBEOBJ)(THIS_ VBEOBJ FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_Parent)(THIS_ VBComponent FAR* FAR* lpComponent) PURE;
    STDMETHOD(get_ContainedVBControls)(THIS_ ContainedVBControls FAR* FAR* lppsctReturn) PURE;
    STDMETHOD(get_SelectedVBControls)(THIS_ SelectedVBControls FAR* FAR* lppctReturn) PURE;
    STDMETHOD(get_CanPaste)(THIS_ VARIANT_BOOL FAR* lpfReturn) PURE;
    STDMETHOD(Paste)(THIS) PURE;
    STDMETHOD(SelectAll)(THIS_ long FAR* lpSelectAll) PURE;
    STDMETHOD(get_VBControls)(THIS_ VBControls FAR* FAR* lppvbfcReturn) PURE;
};

DEFINE_GUID(IID_ControlTemplate,0x79B1F922L,0xEC2C,0x101A,0xB1,0xF9,0x08,0x00,0x2B,0x2B,0x8C,0xDA);

/* Definition of interface: ControlTemplate */
#undef INTERFACE
#define INTERFACE ControlTemplate

DECLARE_INTERFACE_(ControlTemplate, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* ControlTemplate methods */
    STDMETHOD(get_ClassName)(THIS_ BSTR FAR* lpbstrReturn) PURE;
    STDMETHOD(get_Application)(THIS_ Application FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_Parent)(THIS_ ControlTemplates FAR* FAR* lppctReturn) PURE;
    STDMETHOD(get_Container)(THIS_ IDispatch * FAR* lppidReturn) PURE;
    STDMETHOD(putref_Container)(THIS_ IDispatch * NewContainer) PURE;
    STDMETHOD(get_Properties)(THIS_ Properties FAR* FAR* lpppReturn) PURE;
    STDMETHOD(ZOrder)(THIS_ int Position, ControlTemplate FAR* FAR* lppctReturn) PURE;
};

typedef enum vbext_ControlType {
    vbext_ct_Light = 1,
    vbext_ct_Standard = 2,
    vbext_ct_Container = 3
} vbext_ControlType;

DEFINE_GUID(IID_VBControl,0x0002E11DL,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: VBControl */
#undef INTERFACE
#define INTERFACE VBControl

DECLARE_INTERFACE_(VBControl, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* VBControl methods */
    STDMETHOD(get_ClassName)(THIS_ BSTR FAR* lpbstrReturn) PURE;
    STDMETHOD(get_VBEOBJ)(THIS_ VBEOBJ FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_Collection)(THIS_ VBControls FAR* FAR* lpvbfccReturn) PURE;
    STDMETHOD(get_Container)(THIS_ IDispatch * FAR* lppidReturn) PURE;
    STDMETHOD(putref_Container)(THIS_ IDispatch * NewContainer) PURE;
    STDMETHOD(get_Properties)(THIS_ Properties FAR* FAR* lpppReturn) PURE;
    STDMETHOD(get_ContainedVBControls)(THIS_ ContainedVBControls FAR* FAR* lpppReturn) PURE;
    STDMETHOD(get_InSelection)(THIS_ VARIANT_BOOL FAR* lpfReturn) PURE;
    STDMETHOD(put_InSelection)(THIS_ VARIANT_BOOL fInSelections) PURE;
    STDMETHOD(get_ControlObject)(THIS_ IDispatch * FAR* lppidReturn) PURE;
    STDMETHOD(get_ControlType)(THIS_ enum vbext_ControlType FAR* pkind) PURE;
    STDMETHOD(ZOrder)(THIS_ int Position, VBControl FAR* FAR* lppvbcReturn) PURE;
    STDMETHOD(get_ProgID)(THIS_ BSTR FAR* lpbstrReturn) PURE;
    STDMETHOD(get_WizardHook)(THIS_ IUnknown * FAR* lppunk) PURE;
};

DEFINE_GUID(IID_Property,0x0002E18DL,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: Property */
#undef INTERFACE
#define INTERFACE Property

DECLARE_INTERFACE_(Property, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* Property methods */
    STDMETHOD(get_Value)(THIS_ VARIANT FAR* lppvReturn) PURE;
    STDMETHOD(put_Value)(THIS_ VARIANT NewValue) PURE;
    STDMETHOD(get_IndexedValue)(THIS_ VARIANT Index1, VARIANT Index2, VARIANT Index3, VARIANT Index4, VARIANT FAR* lppvReturn) PURE;
    STDMETHOD(put_IndexedValue)(THIS_ VARIANT Index1, VARIANT Index2, VARIANT Index3, VARIANT Index4, VARIANT NewValue) PURE;
    STDMETHOD(get_NumIndices)(THIS_ short FAR* lpiRetVal) PURE;
    STDMETHOD(get_Application)(THIS_ IDispatch * FAR* lppidReturn) PURE;
    STDMETHOD(get_Parent)(THIS_ Properties FAR* FAR* lpppReturn) PURE;
    STDMETHOD(get_Name)(THIS_ BSTR FAR* lpbstrReturn) PURE;
    STDMETHOD(get_VBEOBJ)(THIS_ VBEOBJ FAR* FAR* lpaReturn) PURE;
    STDMETHOD(get_Collection)(THIS_ Properties FAR* FAR* lpppReturn) PURE;
    STDMETHOD(get_Object)(THIS_ IUnknown * FAR* lppunk) PURE;
    STDMETHOD(putref_Object)(THIS_ IUnknown * lpunk) PURE;
};

DEFINE_GUID(IID__Properties,0x0002E189L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: _Properties */
#undef INTERFACE
#define INTERFACE _Properties

DECLARE_INTERFACE_(_Properties, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _Properties methods */
    STDMETHOD(Item)(THIS_ VARIANT index, Property FAR* FAR* lplppReturn) PURE;
    STDMETHOD(get_Application)(THIS_ IDispatch * FAR* lppidReturn) PURE;
    STDMETHOD(get_Parent)(THIS_ IDispatch * FAR* lppidReturn) PURE;
    STDMETHOD(get_Count)(THIS_ long FAR* lplReturn) PURE;
    STDMETHOD(_NewEnum)(THIS_ IUnknown * FAR* lppiuReturn) PURE;
    STDMETHOD(get_VBEOBJ)(THIS_ VBEOBJ FAR* FAR* lppaReturn) PURE;
};

DEFINE_GUID(CLSID_Properties,0x0002E18AL,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

#ifdef __cplusplus
class Properties;
#endif

DEFINE_GUID(IID_ControlTemplates,0x79B1F924L,0xEC2C,0x101A,0xB1,0xF9,0x08,0x00,0x2B,0x2B,0x8C,0xDA);

/* Definition of interface: ControlTemplates */
#undef INTERFACE
#define INTERFACE ControlTemplates

DECLARE_INTERFACE_(ControlTemplates, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* ControlTemplates methods */
    STDMETHOD(Item)(THIS_ VARIANT Item, VARIANT Index, ControlTemplate FAR* FAR* lppctReturn) PURE;
    STDMETHOD(get_Application)(THIS_ Application FAR* FAR* lpaReturn) PURE;
    STDMETHOD(get_Parent)(THIS_ FormTemplate FAR* FAR* lppftReturn) PURE;
    STDMETHOD(get_Count)(THIS_ long FAR* lplReturn) PURE;
    STDMETHOD(Add)(THIS_ BSTR ClassName, VARIANT Container, ControlTemplate FAR* FAR* lppctReturn) PURE;
    STDMETHOD(_NewEnum)(THIS_ IUnknown * FAR* lppiuReturn) PURE;
};

DEFINE_GUID(IID__ContainedVBControls,0x0002E11EL,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: _ContainedVBControls */
#undef INTERFACE
#define INTERFACE _ContainedVBControls

DECLARE_INTERFACE_(_ContainedVBControls, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _ContainedVBControls methods */
    STDMETHOD(Item)(THIS_ VARIANT CollectionIndex, VARIANT ControlIndex, VBControl FAR* FAR* lppctReturn) PURE;
    STDMETHOD(get_VBEOBJ)(THIS_ VBEOBJ FAR* FAR* lpaReturn) PURE;
    STDMETHOD(get_Parent)(THIS_ IDispatch * FAR* ppDispatch) PURE;
    STDMETHOD(get_Count)(THIS_ long FAR* lplReturn) PURE;
    STDMETHOD(Add)(THIS_ BSTR ProgID, VBControl FAR* RelativeVBControl, VARIANT_BOOL before, VBControl FAR* FAR* lppctReturn) PURE;
    STDMETHOD(Remove)(THIS_ VBControl FAR* lpcontrol) PURE;
    STDMETHOD(_NewEnum)(THIS_ IUnknown * FAR* lppiuReturn) PURE;
};

DEFINE_GUID(CLSID_ContainedVBControls,0x0002E120L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

#ifdef __cplusplus
class ContainedVBControls;
#endif

DEFINE_GUID(IID__VBControls,0x0002E121L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: _VBControls */
#undef INTERFACE
#define INTERFACE _VBControls

DECLARE_INTERFACE_(_VBControls, _ContainedVBControls)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;

    /* _ContainedVBControls methods */
    STDMETHOD(Item)(THIS_ VARIANT CollectionIndex, VARIANT ControlIndex, VBControl FAR* FAR* lppctReturn) PURE;
    STDMETHOD(get_VBEOBJ)(THIS_ VBEOBJ FAR* FAR* lpaReturn) PURE;
    STDMETHOD(get_Parent)(THIS_ IDispatch * FAR* ppDispatch) PURE;
    STDMETHOD(get_Count)(THIS_ long FAR* lplReturn) PURE;
    STDMETHOD(Add)(THIS_ BSTR ProgID, VBControl FAR* RelativeVBControl, VARIANT_BOOL before, VBControl FAR* FAR* lppctReturn) PURE;
    STDMETHOD(Remove)(THIS_ VBControl FAR* lpcontrol) PURE;
    STDMETHOD(_NewEnum)(THIS_ IUnknown * FAR* lppiuReturn) PURE;
#endif

    /* _VBControls methods */
};

DEFINE_GUID(CLSID_VBControls,0x0002E123L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

#ifdef __cplusplus
class VBControls;
#endif

DEFINE_GUID(IID_SelectedControlTemplates,0x79B1F926L,0xEC2C,0x101A,0xB1,0xF9,0x08,0x00,0x2B,0x2B,0x8C,0xDA);

/* Definition of interface: SelectedControlTemplates */
#undef INTERFACE
#define INTERFACE SelectedControlTemplates

DECLARE_INTERFACE_(SelectedControlTemplates, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* SelectedControlTemplates methods */
    STDMETHOD(Item)(THIS_ long Item, ControlTemplate FAR* FAR* lppctReturn) PURE;
    STDMETHOD(get_Application)(THIS_ Application FAR* FAR* lpaReturn) PURE;
    STDMETHOD(get_Parent)(THIS_ FormTemplate FAR* FAR* lppftReturn) PURE;
    STDMETHOD(get_Count)(THIS_ long FAR* lplReturn) PURE;
    STDMETHOD(_NewEnum)(THIS_ IUnknown * FAR* lppiuReturn) PURE;
};

DEFINE_GUID(IID__SelectedControls,0x0002E124L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: _SelectedControls */
#undef INTERFACE
#define INTERFACE _SelectedControls

DECLARE_INTERFACE_(_SelectedControls, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _SelectedControls methods */
    STDMETHOD(Item)(THIS_ VARIANT CollectionIndex, VARIANT ControlIndex, VBControl FAR* FAR* lppvbcReturn) PURE;
    STDMETHOD(get_VBEOBJ)(THIS_ VBEOBJ FAR* FAR* lpaReturn) PURE;
    STDMETHOD(get_Parent)(THIS_ VBForm FAR* FAR* lppiuReturn) PURE;
    STDMETHOD(get_Count)(THIS_ long FAR* lplReturn) PURE;
    STDMETHOD(_NewEnum)(THIS_ IUnknown * FAR* lppiuReturn) PURE;
    STDMETHOD(Clear)(THIS_ long FAR* lpClear) PURE;
    STDMETHOD(Cut)(THIS) PURE;
    STDMETHOD(Copy)(THIS) PURE;
};

DEFINE_GUID(CLSID_SelectedVBControls,0x0002E126L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

#ifdef __cplusplus
class SelectedVBControls;
#endif

typedef enum vbextMenuShortcut {
    vbextMenuShortcutCtrlA = 1,
    vbextMenuShortcutCtrlB = 2,
    vbextMenuShortcutCtrlC = 3,
    vbextMenuShortcutCtrlD = 4,
    vbextMenuShortcutCtrlE = 5,
    vbextMenuShortcutCtrlF = 6,
    vbextMenuShortcutCtrlG = 7,
    vbextMenuShortcutCtrlH = 8,
    vbextMenuShortcutCtrlI = 9,
    vbextMenuShortcutCtrlJ = 10,
    vbextMenuShortcutCtrlK = 11,
    vbextMenuShortcutCtrlL = 12,
    vbextMenuShortcutCtrlM = 13,
    vbextMenuShortcutCtrlN = 14,
    vbextMenuShortcutCtrlO = 15,
    vbextMenuShortcutCtrlP = 16,
    vbextMenuShortcutCtrlQ = 17,
    vbextMenuShortcutCtrlR = 18,
    vbextMenuShortcutCtrlS = 19,
    vbextMenuShortcutCtrlT = 20,
    vbextMenuShortcutCtrlU = 21,
    vbextMenuShortcutCtrlV = 22,
    vbextMenuShortcutCtrlW = 23,
    vbextMenuShortcutCtrlX = 24,
    vbextMenuShortcutCtrlY = 25,
    vbextMenuShortcutCtrlZ = 26,
    vbextMenuShortcutF1 = 27,
    vbextMenuShortcutF2 = 28,
    vbextMenuShortcutF3 = 29,
    vbextMenuShortcutF4 = 30,
    vbextMenuShortcutF5 = 31,
    vbextMenuShortcutF6 = 32,
    vbextMenuShortcutF7 = 33,
    vbextMenuShortcutF8 = 34,
    vbextMenuShortcutF9 = 35,
    vbextMenuShortcutF11 = 37,
    vbextMenuShortcutF12 = 38,
    vbextMenuShortcutCtrlF1 = 39,
    vbextMenuShortcutCtrlF2 = 40,
    vbextMenuShortcutCtrlF3 = 41,
    vbextMenuShortcutCtrlF4 = 42,
    vbextMenuShortcutCtrlF5 = 43,
    vbextMenuShortcutCtrlF6 = 44,
    vbextMenuShortcutCtrlF7 = 45,
    vbextMenuShortcutCtrlF8 = 46,
    vbextMenuShortcutCtrlF9 = 47,
    vbextMenuShortcutCtrlF11 = 49,
    vbextMenuShortcutCtrlF12 = 50,
    vbextMenuShortcutShiftF1 = 51,
    vbextMenuShortcutShiftF2 = 52,
    vbextMenuShortcutShiftF3 = 53,
    vbextMenuShortcutShiftF4 = 54,
    vbextMenuShortcutShiftF5 = 55,
    vbextMenuShortcutShiftF6 = 56,
    vbextMenuShortcutShiftF7 = 57,
    vbextMenuShortcutShiftF8 = 58,
    vbextMenuShortcutShiftF9 = 59,
    vbextMenuShortcutShiftF11 = 61,
    vbextMenuShortcutShiftF12 = 62,
    vbextMenuShortcutCtrlShiftF1 = 63,
    vbextMenuShortcutCtrlShiftF2 = 64,
    vbextMenuShortcutCtrlShiftF3 = 65,
    vbextMenuShortcutCtrlShiftF4 = 66,
    vbextMenuShortcutCtrlShiftF5 = 67,
    vbextMenuShortcutCtrlShiftF6 = 68,
    vbextMenuShortcutCtrlShiftF7 = 69,
    vbextMenuShortcutCtrlShiftF8 = 70,
    vbextMenuShortcutCtrlShiftF9 = 71,
    vbextMenuShortcutCtrlShiftF11 = 73,
    vbextMenuShortcutCtrlShiftF12 = 74,
    vbextMenuShortcutCtrlIns = 75,
    vbextMenuShortcutShiftIns = 76,
    vbextMenuShortcutDel = 77,
    vbextMenuShortcutShiftDel = 78,
    vbextMenuShortcutAltBksp = 79
} vbextMenuShortcut;

DEFINE_GUID(IID__AddIns,0x0002E109L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: _AddIns */
#undef INTERFACE
#define INTERFACE _AddIns

DECLARE_INTERFACE_(_AddIns, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _AddIns methods */
    STDMETHOD(Item)(THIS_ VARIANT Index, AddIn FAR* FAR* lppaddin) PURE;
    STDMETHOD(get_VBEOBJ)(THIS_ VBEOBJ FAR* FAR* lppVBA) PURE;
    STDMETHOD(get_Parent)(THIS_ VBEOBJ FAR* FAR* lppVBA) PURE;
    STDMETHOD(get_Count)(THIS_ long FAR* lplReturn) PURE;
    STDMETHOD(_NewEnum)(THIS_ IUnknown * FAR* lppiuReturn) PURE;
    STDMETHOD(Update)(THIS) PURE;
};

DEFINE_GUID(CLSID_Addins,0x0002E183L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

#ifdef __cplusplus
class Addins;
#endif

typedef enum vbext_ConnectMode {
    vbext_cm_AfterStartup = 0,
    vbext_cm_Startup = 1,
    vbext_cm_External = 2
} vbext_ConnectMode;

typedef enum vbext_DisconnectMode {
    vbext_dm_HostShutdown = 0,
    vbext_dm_UserClosed = 1
} vbext_DisconnectMode;

DEFINE_GUID(IID_AddIn,0x0002E10BL,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: AddIn */
#undef INTERFACE
#define INTERFACE AddIn

DECLARE_INTERFACE_(AddIn, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* AddIn methods */
    STDMETHOD(get_Description)(THIS_ BSTR FAR* lpbstr) PURE;
    STDMETHOD(put_Description)(THIS_ BSTR bstr) PURE;
    STDMETHOD(get_VBEOBJ)(THIS_ VBEOBJ FAR* FAR* lppVBE) PURE;
    STDMETHOD(get_Collection)(THIS_ AddIns FAR* FAR* lppaddins) PURE;
    STDMETHOD(get_ProgID)(THIS_ BSTR FAR* lpbstr) PURE;
    STDMETHOD(get_Guid)(THIS_ BSTR FAR* lpbstr) PURE;
    STDMETHOD(get_Connect)(THIS_ VARIANT_BOOL FAR* lpfConnect) PURE;
    STDMETHOD(put_Connect)(THIS_ VARIANT_BOOL fConnect) PURE;
    STDMETHOD(get_Object)(THIS_ IDispatch * FAR* lppdisp) PURE;
    STDMETHOD(put_Object)(THIS_ IDispatch * _lpdispObject) PURE;
};

DEFINE_GUID(IID_IDTExtensibility,0x0002E151L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: IDTExtensibility */
#undef INTERFACE
#define INTERFACE IDTExtensibility

DECLARE_INTERFACE_(IDTExtensibility, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* IDTExtensibility methods */
    STDMETHOD(OnConnection)(THIS_ IDispatch * VBInst, enum vbext_ConnectMode ConnectMode, AddIn FAR* AddInInst, SAFEARRAY FAR* FAR* custom) PURE;
    STDMETHOD(OnDisconnection)(THIS_ enum vbext_DisconnectMode RemoveMode, SAFEARRAY FAR* FAR* custom) PURE;
    STDMETHOD(OnAddInsUpdate)(THIS_ SAFEARRAY FAR* FAR* custom) PURE;
    STDMETHOD(OnStartupComplete)(THIS_ SAFEARRAY FAR* FAR* custom) PURE;
};

typedef enum {
    vbext_pk_Proc = 0,
    vbext_pk_Let = 1,
    vbext_pk_Set = 2,
    vbext_pk_Get = 3
} vbext_ProcKind;

DEFINE_GUID(IID__CodeModule,0x0002E16DL,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: _CodeModule */
#undef INTERFACE
#define INTERFACE _CodeModule

DECLARE_INTERFACE_(_CodeModule, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _CodeModule methods */
    STDMETHOD(get_Parent)(THIS_ VBComponent FAR* FAR* retval) PURE;
    STDMETHOD(get_VBEOBJ)(THIS_ VBEOBJ FAR* FAR* retval) PURE;
    STDMETHOD(get_Name)(THIS_ BSTR FAR* pbstrName) PURE;
    STDMETHOD(put_Name)(THIS_ BSTR bstrName) PURE;
    STDMETHOD(AddFromString)(THIS_ BSTR String) PURE;
    STDMETHOD(AddFromFile)(THIS_ BSTR FileName) PURE;
    STDMETHOD(get_Lines)(THIS_ long StartLine, long Count, BSTR FAR* String) PURE;
    STDMETHOD(get_CountOfLines)(THIS_ long FAR* CountOfLines) PURE;
    STDMETHOD(InsertLines)(THIS_ long Line, BSTR String) PURE;
    STDMETHOD(DeleteLines)(THIS_ long StartLine, long Count) PURE;
    STDMETHOD(ReplaceLine)(THIS_ long Line, BSTR String) PURE;
    STDMETHOD(get_ProcStartLine)(THIS_ BSTR ProcName, vbext_ProcKind ProcKind, long FAR* ProcStartLine) PURE;
    STDMETHOD(get_ProcCountLines)(THIS_ BSTR ProcName, vbext_ProcKind ProcKind, long FAR* ProcCountLines) PURE;
    STDMETHOD(get_ProcBodyLine)(THIS_ BSTR ProcName, vbext_ProcKind ProcKind, long FAR* ProcBodyLine) PURE;
    STDMETHOD(get_ProcOfLine)(THIS_ long line, vbext_ProcKind FAR* ProcKind, BSTR FAR* pbstrName) PURE;
    STDMETHOD(get_CountOfDeclarationLines)(THIS_ long FAR* pDeclCountOfLines) PURE;
    STDMETHOD(CreateEventProc)(THIS_ BSTR EventName, BSTR ObjectName, long FAR* line) PURE;
    STDMETHOD(Find)(THIS_ BSTR Target, long FAR* StartLine, long FAR* StartColumn, long FAR* EndLine, long FAR* EndColumn, VARIANT_BOOL WholeWord, VARIANT_BOOL MatchCase, VARIANT_BOOL PatternSearch, VARIANT_BOOL FAR* pfFound) PURE;
    STDMETHOD(get_CodePane)(THIS_ CodePane FAR* FAR* CodePane) PURE;
    STDMETHOD(get_Members)(THIS_ Members FAR* FAR* Members) PURE;
};

DEFINE_GUID(CLSID_CodeModule,0x0002E16FL,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

#ifdef __cplusplus
class CodeModule;
#endif

DEFINE_GUID(IID__CodePanes,0x0002E171L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: _CodePanes */
#undef INTERFACE
#define INTERFACE _CodePanes

DECLARE_INTERFACE_(_CodePanes, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _CodePanes methods */
    STDMETHOD(get_Parent)(THIS_ VBEOBJ FAR* FAR* retval) PURE;
    STDMETHOD(get_VBEOBJ)(THIS_ VBEOBJ FAR* FAR* retval) PURE;
    STDMETHOD(Item)(THIS_ VARIANT index, CodePane FAR* FAR* CodePane) PURE;
    STDMETHOD(get_Count)(THIS_ long FAR* Count) PURE;
    STDMETHOD(_NewEnum)(THIS_ IUnknown * FAR* ppenum) PURE;
    STDMETHOD(get_Current)(THIS_ CodePane FAR* FAR* CodePane) PURE;
    STDMETHOD(put_Current)(THIS_ CodePane FAR* CodePane) PURE;
};

DEFINE_GUID(CLSID_CodePanes,0x0002E173L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

#ifdef __cplusplus
class CodePanes;
#endif

typedef enum {
    vbext_cv_ProcedureView = 0,
    vbext_cv_FullModuleView = 1
} vbext_CodePaneview;

DEFINE_GUID(IID__CodePane,0x0002E175L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: _CodePane */
#undef INTERFACE
#define INTERFACE _CodePane

DECLARE_INTERFACE_(_CodePane, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _CodePane methods */
    STDMETHOD(get_Collection)(THIS_ CodePanes FAR* FAR* retval) PURE;
    STDMETHOD(get_VBEOBJ)(THIS_ VBEOBJ FAR* FAR* retval) PURE;
    STDMETHOD(get_Window)(THIS_ Window FAR* FAR* retval) PURE;
    STDMETHOD(GetSelection)(THIS_ long FAR* StartLine, long FAR* StartColumn, long FAR* EndLine, long FAR* EndColumn) PURE;
    STDMETHOD(SetSelection)(THIS_ long StartLine, long StartColumn, long EndLine, long EndColumn) PURE;
    STDMETHOD(get_TopLine)(THIS_ long FAR* TopLine) PURE;
    STDMETHOD(put_TopLine)(THIS_ long TopLine) PURE;
    STDMETHOD(get_CountOfVisibleLines)(THIS_ long FAR* CountOfVisibleLines) PURE;
    STDMETHOD(get_CodeModule)(THIS_ CodeModule FAR* FAR* CodeModule) PURE;
    STDMETHOD(Show)(THIS) PURE;
    STDMETHOD(get_CodePaneView)(THIS_ vbext_CodePaneview FAR* pCodePaneview) PURE;
};

DEFINE_GUID(CLSID_CodePane,0x0002E177L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

#ifdef __cplusplus
class CodePane;
#endif

DEFINE_GUID(IID__References,0x0002E179L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: _References */
#undef INTERFACE
#define INTERFACE _References

DECLARE_INTERFACE_(_References, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _References methods */
    STDMETHOD(get_Parent)(THIS_ VBProject FAR* FAR* retval) PURE;
    STDMETHOD(get_VBEOBJ)(THIS_ VBEOBJ FAR* FAR* retval) PURE;
    STDMETHOD(Item)(THIS_ VARIANT index, Reference FAR* FAR* Reference) PURE;
    STDMETHOD(get_Count)(THIS_ long FAR* Count) PURE;
    STDMETHOD(_NewEnum)(THIS_ IUnknown * FAR* ppenum) PURE;
    STDMETHOD(AddFromGuid)(THIS_ BSTR Guid, long Major, long Minor, Reference FAR* FAR* Reference) PURE;
    STDMETHOD(AddFromFile)(THIS_ BSTR FileName, Reference FAR* FAR* Reference) PURE;
    STDMETHOD(Remove)(THIS_ Reference FAR* Reference) PURE;
};

typedef enum {
    vbext_rk_TypeLib = 0,
    vbext_rk_Project = 1
} vbext_RefKind;

DEFINE_GUID(IID_Reference,0x0002E17DL,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: Reference */
#undef INTERFACE
#define INTERFACE Reference

DECLARE_INTERFACE_(Reference, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* Reference methods */
    STDMETHOD(get_Collection)(THIS_ References FAR* FAR* retval) PURE;
    STDMETHOD(get_VBEOBJ)(THIS_ VBEOBJ FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_Name)(THIS_ BSTR FAR* pbstrName) PURE;
    STDMETHOD(get_Guid)(THIS_ BSTR FAR* pbstrGuid) PURE;
    STDMETHOD(get_Major)(THIS_ long FAR* pMajor) PURE;
    STDMETHOD(get_Minor)(THIS_ long FAR* pMinor) PURE;
    STDMETHOD(get_FullPath)(THIS_ BSTR FAR* pbstrLocation) PURE;
    STDMETHOD(get_BuiltIn)(THIS_ VARIANT_BOOL FAR* pfIsDefault) PURE;
    STDMETHOD(get_IsBroken)(THIS_ VARIANT_BOOL FAR* pfIsBroken) PURE;
    STDMETHOD(get_Type)(THIS_ vbext_RefKind FAR* pKind) PURE;
    STDMETHOD(get_Description)(THIS_ BSTR FAR* pbstrName) PURE;
};

DEFINE_GUID(DIID__dispReferences_Events,0x0002E19AL,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of dispatch interface: _dispReferences_Events */
#undef INTERFACE
#define INTERFACE _dispReferences_Events

DECLARE_INTERFACE_(_dispReferences_Events, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _dispReferences_Events methods:
    void ItemAdded(Reference FAR* Reference);
    void ItemRemoved(Reference FAR* Reference);
    */
};

DEFINE_GUID(CLSID_References,0x0002E17BL,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

#ifdef __cplusplus
class References;
#endif

DEFINE_GUID(IID__Members,0x0002E180L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: _Members */
#undef INTERFACE
#define INTERFACE _Members

DECLARE_INTERFACE_(_Members, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _Members methods */
    STDMETHOD(get_Parent)(THIS_ CodeModule FAR* FAR* CodeModule) PURE;
    STDMETHOD(get_VBEOBJ)(THIS_ VBEOBJ FAR* FAR* lppaReturn) PURE;
    STDMETHOD(Item)(THIS_ VARIANT var, Member FAR* FAR* ppMember) PURE;
    STDMETHOD(get_Count)(THIS_ long FAR* Count) PURE;
    STDMETHOD(_NewEnum)(THIS_ IUnknown * FAR* ppenum) PURE;
};

DEFINE_GUID(CLSID_Members,0x0002E181L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

#ifdef __cplusplus
class Members;
#endif

typedef enum {
    vbext_mt_Method = 1,
    vbext_mt_Property = 2,
    vbext_mt_Variable = 3,
    vbext_mt_Event = 4,
    vbext_mt_Const = 5
} vbext_MemberType;

typedef enum {
    vbext_Private = 1,
    vbext_Public = 2,
    vbext_Friend = 3
} vbext_Scope;

DEFINE_GUID(IID_Member,0x0002E182L,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);

/* Definition of interface: Member */
#undef INTERFACE
#define INTERFACE Member

DECLARE_INTERFACE_(Member, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* Member methods */
    STDMETHOD(get_Collection)(THIS_ Members FAR* FAR* ppMembers) PURE;
    STDMETHOD(get_VBEOBJ)(THIS_ VBEOBJ FAR* FAR* lppaReturn) PURE;
    STDMETHOD(get_Name)(THIS_ BSTR FAR* pbstrName) PURE;
    STDMETHOD(get_Type)(THIS_ vbext_MemberType FAR* pKind) PURE;
    STDMETHOD(get_Scope)(THIS_ vbext_Scope FAR* pScope) PURE;
    STDMETHOD(get_Static)(THIS_ VARIANT_BOOL FAR* pfStatic) PURE;
    STDMETHOD(get_CodeLocation)(THIS_ long FAR* pline) PURE;
    STDMETHOD(get_Description)(THIS_ BSTR FAR* pbstrName) PURE;
    STDMETHOD(put_Description)(THIS_ BSTR bstrName) PURE;
    STDMETHOD(get_HelpContextId)(THIS_ long FAR* phelpId) PURE;
    STDMETHOD(put_HelpContextId)(THIS_ long helpId) PURE;
    STDMETHOD(get_Hidden)(THIS_ VARIANT_BOOL FAR* pfHidden) PURE;
    STDMETHOD(put_Hidden)(THIS_ VARIANT_BOOL fHidden) PURE;
    STDMETHOD(get_Browsable)(THIS_ VARIANT_BOOL FAR* pfBrowsable) PURE;
    STDMETHOD(put_Browsable)(THIS_ VARIANT_BOOL fBrowsable) PURE;
    STDMETHOD(get_UIDefault)(THIS_ VARIANT_BOOL FAR* pfBrowsable) PURE;
    STDMETHOD(put_UIDefault)(THIS_ VARIANT_BOOL fBrowsable) PURE;
    STDMETHOD(get_StandardMethod)(THIS_ long FAR* pStandardMethod) PURE;
    STDMETHOD(put_StandardMethod)(THIS_ long StandardMethod) PURE;
    STDMETHOD(get_Bindable)(THIS_ VARIANT_BOOL FAR* pfBrowsable) PURE;
    STDMETHOD(put_Bindable)(THIS_ VARIANT_BOOL fBrowsable) PURE;
    STDMETHOD(get_DefaultBind)(THIS_ VARIANT_BOOL FAR* pfBrowsable) PURE;
    STDMETHOD(put_DefaultBind)(THIS_ VARIANT_BOOL fBrowsable) PURE;
    STDMETHOD(get_DisplayBind)(THIS_ VARIANT_BOOL FAR* pfBrowsable) PURE;
    STDMETHOD(put_DisplayBind)(THIS_ VARIANT_BOOL fBrowsable) PURE;
    STDMETHOD(get_RequestEdit)(THIS_ VARIANT_BOOL FAR* pfBrowsable) PURE;
    STDMETHOD(put_RequestEdit)(THIS_ VARIANT_BOOL fBrowsable) PURE;
    STDMETHOD(get_Category)(THIS_ BSTR FAR* pbstrCategory) PURE;
    STDMETHOD(put_Category)(THIS_ BSTR bstrCategory) PURE;
    STDMETHOD(get_PropertyPage)(THIS_ BSTR FAR* pbstrPropertyPage) PURE;
    STDMETHOD(put_PropertyPage)(THIS_ BSTR bstrPropertyPage) PURE;
};

DEFINE_GUID(IID__VBBuildEvents,0xCC62AD81L,0x99EE,0x11D1,0xB6,0xE0,0x00,0xA0,0xC9,0x0F,0x27,0x44);

/* Definition of interface: _VBBuildEvents */
#undef INTERFACE
#define INTERFACE _VBBuildEvents

DECLARE_INTERFACE_(_VBBuildEvents, IUnknown)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;
#endif

    /* _VBBuildEvents methods */
};

DEFINE_GUID(DIID__dispVBBuildEvents,0xCC62AD82L,0x99EE,0x11D1,0xB6,0xE0,0x00,0xA0,0xC9,0x0F,0x27,0x44);

/* Definition of dispatch interface: _dispVBBuildEvents */
#undef INTERFACE
#define INTERFACE _dispVBBuildEvents

DECLARE_INTERFACE_(_dispVBBuildEvents, IDispatch)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;
#endif

    /* _dispVBBuildEvents methods:
    void BeginCompile(VBProject FAR* VBProject);
    void EnterRunMode(void);
    void EnterDesignMode(void);
    */
};

DEFINE_GUID(CLSID_VBBuildEvents,0xCC62AD83L,0x99EE,0x11D1,0xB6,0xE0,0x00,0xA0,0xC9,0x0F,0x27,0x44);

#ifdef __cplusplus
class VBBuildEvents;
#endif

DEFINE_GUID(IID_Events2,0xCC62AD84L,0x99EE,0x11D1,0xB6,0xE0,0x00,0xA0,0xC9,0x0F,0x27,0x44);

/* Definition of interface: Events2 */
#undef INTERFACE
#define INTERFACE Events2

DECLARE_INTERFACE_(Events2, Events)
{
BEGIN_INTERFACE
#ifndef NO_BASEINTERFACE_FUNCS

    /* IUnknown methods */
    STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;

    /* IDispatch methods */
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE;

    STDMETHOD(GetTypeInfo)(
      THIS_
      UINT itinfo,
      LCID lcid,
      ITypeInfo FAR* FAR* pptinfo) PURE;

    STDMETHOD(GetIDsOfNames)(
      THIS_
      REFIID riid,
      OLECHAR FAR* FAR* rgszNames,
      UINT cNames,
      LCID lcid,
      DISPID FAR* rgdispid) PURE;

    STDMETHOD(Invoke)(
      THIS_
      DISPID dispidMember,
      REFIID riid,
      LCID lcid,
      WORD wFlags,
      DISPPARAMS FAR* pdispparams,
      VARIANT FAR* pvarResult,
      EXCEPINFO FAR* pexcepinfo,
      UINT FAR* puArgErr) PURE;

    /* Events methods */
    STDMETHOD(get_VBProjectsEvents)(THIS_ VBProjectsEvents FAR* FAR* ppceNew) PURE;
    STDMETHOD(get_VBComponentsEvents)(THIS_ VBProject FAR* VBProject, VBComponentsEvents FAR* FAR* pcceNew) PURE;
    STDMETHOD(get_ReferencesEvents)(THIS_ VBProject FAR* VBProject, ReferencesEvents FAR* FAR* prceNew) PURE;
    STDMETHOD(get_VBControlsEvents)(THIS_ VBProject FAR* VBProject, VBForm FAR* VBForm, VBControlsEvents FAR* FAR* prceNew) PURE;
    STDMETHOD(get_SelectedVBControlsEvents)(THIS_ VBProject FAR* VBProject, VBForm FAR* VBForm, SelectedVBControlsEvents FAR* FAR* prceNew) PURE;
    STDMETHOD(get_CommandBarEvents)(THIS_ IDispatch * CommandBarControl, CommandBarEvents FAR* FAR* prceNew) PURE;
    STDMETHOD(get_FileControlEvents)(THIS_ VBProject FAR* VBProject, FileControlEvents FAR* FAR* prceNew) PURE;
#endif

    /* Events2 methods */
    STDMETHOD(get_VBBuildEvents)(THIS_ VBBuildEvents FAR* FAR* ppceNew) PURE;
};

#endif
