std_ole_v1.idl 3.89 KB
Newer Older
Huw Davies's avatar
Huw Davies committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/*
 * Copyright (C) 2003 Robert Shearman
 *               2005 Huw Davies
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
17
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Huw Davies's avatar
Huw Davies committed
18 19 20
 *
 */

21
#pragma makedep regtypelib
22

Huw Davies's avatar
Huw Davies committed
23 24
[
  uuid(00020430-0000-0000-C000-000000000046),
25
  restricted,
Huw Davies's avatar
Huw Davies committed
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
  version(1.0),
  helpstring("OLE Automation")
]
library stdole
{
	/* typedefs aren't stored in the type library.
           These type names are known by the type compiler so it
           doesn't really matter what we define them as. */

    typedef void *VARIANT;
    typedef wchar_t *BSTR;
    typedef unsigned long SCODE;
    typedef unsigned long HRESULT;
    
    typedef struct GUID {
        unsigned long  Data1;
        unsigned short Data2;
        unsigned short Data3;
        unsigned char  Data4[ 8 ];
    } GUID;

    typedef struct DISPPARAMS {
        VARIANT *rgvarg;
        long *rgdispidNamedArgs;
        unsigned int cArgs;
        unsigned int cNamedArgs;
    } DISPPARAMS;

    typedef struct EXCEPINFO {
        unsigned short wCode;
        unsigned short wReserved;
        BSTR  bstrSource;
        BSTR  bstrDescription;
        BSTR  bstrHelpFile;
        unsigned long dwHelpContext;
        void *pvReserved;
        void *pfnDeferredFillIn;
        SCODE scode;
    } EXCEPINFO;

    [
        odl,
        uuid(00000000-0000-0000-C000-000000000046)
    ]
    interface IUnknown
    {
        [restricted]
        HRESULT QueryInterface(
                               [in] GUID *riid,
                               [out] void **ppvObj);

        [restricted]
        unsigned long AddRef();

        [restricted]
        unsigned long Release();
    }

    [
        odl,
        uuid(00020400-0000-0000-C000-000000000046)
    ]
    interface IDispatch : IUnknown
    {
        [restricted]
        HRESULT GetTypeInfoCount(
                                 [out] unsigned int *pctinfo);

        [restricted]
        HRESULT GetTypeInfo(
                            [in] unsigned int itinfo,
                            [in] unsigned long lcid,
                            [out] void **pptinfo);

        [restricted]
        HRESULT GetIDsOfNames(
                              [in] GUID *riid,
                              [in] char **rgszNames,
                              [in] unsigned int cNames,
                              [in] unsigned long lcid,
                              [out] long *rgdispid);

        [restricted]
        HRESULT Invoke(
                       [in] long dispidMember,
                       [in] GUID *riid,
                       [in] unsigned long lcid,
                       [in] unsigned short wFlags,
                       [in] DISPPARAMS *pdispparams,
                       [out] VARIANT *pvarResult,
                       [out] EXCEPINFO *pexcepinfo,
                       [out] unsigned int *puArgErr);

    }

    [
        odl,
        uuid(00020404-0000-0000-C000-000000000046)
    ]
    interface IEnumVARIANT : IUnknown
    {
        HRESULT Next(
                     [in] unsigned long celt,
                     [in] VARIANT *rgvar,
                     [out] unsigned long *pceltFetched);

        HRESULT Skip(
                     [in] unsigned long celt);

        HRESULT Reset();

        HRESULT Clone(
                      [out] IEnumVARIANT **ppenum);
    }
};