github.com/hspan/go-ole@v0.0.0/constants.go (about)

     1  package ole
     2  
     3  const (
     4  	CLSCTX_INPROC_SERVER   = 1
     5  	CLSCTX_INPROC_HANDLER  = 2
     6  	CLSCTX_LOCAL_SERVER    = 4
     7  	CLSCTX_INPROC_SERVER16 = 8
     8  	CLSCTX_REMOTE_SERVER   = 16
     9  	CLSCTX_ALL             = CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER
    10  	CLSCTX_INPROC          = CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER
    11  	CLSCTX_SERVER          = CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER
    12  )
    13  
    14  const (
    15  	COINIT_APARTMENTTHREADED = 0x2
    16  	COINIT_MULTITHREADED     = 0x0
    17  	COINIT_DISABLE_OLE1DDE   = 0x4
    18  	COINIT_SPEED_OVER_MEMORY = 0x8
    19  )
    20  
    21  const (
    22  	DISPATCH_METHOD         = 1
    23  	DISPATCH_PROPERTYGET    = 2
    24  	DISPATCH_PROPERTYPUT    = 4
    25  	DISPATCH_PROPERTYPUTREF = 8
    26  )
    27  
    28  const (
    29  	S_OK           = 0x00000000
    30  	E_UNEXPECTED   = 0x8000FFFF
    31  	E_NOTIMPL      = 0x80004001
    32  	E_OUTOFMEMORY  = 0x8007000E
    33  	E_INVALIDARG   = 0x80070057
    34  	E_NOINTERFACE  = 0x80004002
    35  	E_POINTER      = 0x80004003
    36  	E_HANDLE       = 0x80070006
    37  	E_ABORT        = 0x80004004
    38  	E_FAIL         = 0x80004005
    39  	E_ACCESSDENIED = 0x80070005
    40  	E_PENDING      = 0x8000000A
    41  
    42  	CO_E_CLASSSTRING = 0x800401F3
    43  )
    44  
    45  const (
    46  	CC_FASTCALL = iota
    47  	CC_CDECL
    48  	CC_MSCPASCAL
    49  	CC_PASCAL = CC_MSCPASCAL
    50  	CC_MACPASCAL
    51  	CC_STDCALL
    52  	CC_FPFASTCALL
    53  	CC_SYSCALL
    54  	CC_MPWCDECL
    55  	CC_MPWPASCAL
    56  	CC_MAX = CC_MPWPASCAL
    57  )
    58  
    59  type VT uint16
    60  
    61  const (
    62  	VT_EMPTY           VT = 0x0
    63  	VT_NULL            VT = 0x1
    64  	VT_I2              VT = 0x2
    65  	VT_I4              VT = 0x3
    66  	VT_R4              VT = 0x4
    67  	VT_R8              VT = 0x5
    68  	VT_CY              VT = 0x6
    69  	VT_DATE            VT = 0x7
    70  	VT_BSTR            VT = 0x8
    71  	VT_DISPATCH        VT = 0x9
    72  	VT_ERROR           VT = 0xa
    73  	VT_BOOL            VT = 0xb
    74  	VT_VARIANT         VT = 0xc
    75  	VT_UNKNOWN         VT = 0xd
    76  	VT_DECIMAL         VT = 0xe
    77  	VT_I1              VT = 0x10
    78  	VT_UI1             VT = 0x11
    79  	VT_UI2             VT = 0x12
    80  	VT_UI4             VT = 0x13
    81  	VT_I8              VT = 0x14
    82  	VT_UI8             VT = 0x15
    83  	VT_INT             VT = 0x16
    84  	VT_UINT            VT = 0x17
    85  	VT_VOID            VT = 0x18
    86  	VT_HRESULT         VT = 0x19
    87  	VT_PTR             VT = 0x1a
    88  	VT_SAFEARRAY       VT = 0x1b
    89  	VT_CARRAY          VT = 0x1c
    90  	VT_USERDEFINED     VT = 0x1d
    91  	VT_LPSTR           VT = 0x1e
    92  	VT_LPWSTR          VT = 0x1f
    93  	VT_RECORD          VT = 0x24
    94  	VT_INT_PTR         VT = 0x25
    95  	VT_UINT_PTR        VT = 0x26
    96  	VT_FILETIME        VT = 0x40
    97  	VT_BLOB            VT = 0x41
    98  	VT_STREAM          VT = 0x42
    99  	VT_STORAGE         VT = 0x43
   100  	VT_STREAMED_OBJECT VT = 0x44
   101  	VT_STORED_OBJECT   VT = 0x45
   102  	VT_BLOB_OBJECT     VT = 0x46
   103  	VT_CF              VT = 0x47
   104  	VT_CLSID           VT = 0x48
   105  	VT_BSTR_BLOB       VT = 0xfff
   106  	VT_VECTOR          VT = 0x1000
   107  	VT_ARRAY           VT = 0x2000
   108  	VT_BYREF           VT = 0x4000
   109  	VT_RESERVED        VT = 0x8000
   110  	VT_ILLEGAL         VT = 0xffff
   111  	VT_ILLEGALMASKED   VT = 0xfff
   112  	VT_TYPEMASK        VT = 0xfff
   113  )
   114  
   115  const (
   116  	DISPID_UNKNOWN     = -1
   117  	DISPID_VALUE       = 0
   118  	DISPID_PROPERTYPUT = -3
   119  	DISPID_NEWENUM     = -4
   120  	DISPID_EVALUATE    = -5
   121  	DISPID_CONSTRUCTOR = -6
   122  	DISPID_DESTRUCTOR  = -7
   123  	DISPID_COLLECT     = -8
   124  )
   125  
   126  const (
   127  	TKIND_ENUM      = 1
   128  	TKIND_RECORD    = 2
   129  	TKIND_MODULE    = 3
   130  	TKIND_INTERFACE = 4
   131  	TKIND_DISPATCH  = 5
   132  	TKIND_COCLASS   = 6
   133  	TKIND_ALIAS     = 7
   134  	TKIND_UNION     = 8
   135  	TKIND_MAX       = 9
   136  )
   137  
   138  // Safe Array Feature Flags
   139  
   140  const (
   141  	FADF_AUTO        = 0x0001
   142  	FADF_STATIC      = 0x0002
   143  	FADF_EMBEDDED    = 0x0004
   144  	FADF_FIXEDSIZE   = 0x0010
   145  	FADF_RECORD      = 0x0020
   146  	FADF_HAVEIID     = 0x0040
   147  	FADF_HAVEVARTYPE = 0x0080
   148  	FADF_BSTR        = 0x0100
   149  	FADF_UNKNOWN     = 0x0200
   150  	FADF_DISPATCH    = 0x0400
   151  	FADF_VARIANT     = 0x0800
   152  	FADF_RESERVED    = 0xF008
   153  )