"Fossies" - the Fresh Open Source Software Archive

Member "dmd2/src/druntime/import/core/sys/windows/wtypes.d" (20 Nov 2020, 4418 Bytes) of package /linux/misc/dmd.2.094.2.linux.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) D source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /**
    2  * Windows API header module
    3  *
    4  * Translated from MinGW Windows headers
    5  *
    6  * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
    7  * Source: $(DRUNTIMESRC src/core/sys/windows/_wtypes.d)
    8  */
    9 module core.sys.windows.wtypes;
   10 version (Windows):
   11 @system:
   12 
   13 import core.sys.windows.rpc, core.sys.windows.rpcndr;
   14 private import core.sys.windows.windef;
   15 private import core.sys.windows.uuid; // for GUID_NULL
   16 
   17 alias GUID_NULL IID_NULL, CLSID_NULL;
   18 
   19 enum ROTFLAGS_REGISTRATIONKEEPSALIVE = 0x01;
   20 enum ROTFLAGS_ALLOWANYCLIENT         = 0x02;
   21 
   22 // also in winsock2.h
   23 struct BLOB {
   24     ULONG cbSize;
   25     BYTE* pBlobData;
   26 }
   27 alias BLOB* PBLOB, LPBLOB;
   28 
   29 enum DVASPECT {
   30     DVASPECT_CONTENT   = 1,
   31     DVASPECT_THUMBNAIL = 2,
   32     DVASPECT_ICON      = 4,
   33     DVASPECT_DOCPRINT  = 8
   34 }
   35 
   36 enum DVASPECT2 {
   37     DVASPECT_OPAQUE      = 16,
   38     DVASPECT_TRANSPARENT = 32
   39 }
   40 
   41 enum STATFLAG {
   42     STATFLAG_DEFAULT = 0,
   43     STATFLAG_NONAME  = 1
   44 }
   45 
   46 enum MEMCTX {
   47     MEMCTX_LOCAL = 0,
   48     MEMCTX_TASK,
   49     MEMCTX_SHARED,
   50     MEMCTX_MACSYSTEM,
   51     MEMCTX_UNKNOWN = -1,
   52     MEMCTX_SAME = -2
   53 }
   54 
   55 enum MSHCTX {
   56     MSHCTX_LOCAL = 0,
   57     MSHCTX_NOSHAREDMEM,
   58     MSHCTX_DIFFERENTMACHINE,
   59     MSHCTX_INPROC,
   60     MSHCTX_CROSSCTX
   61 }
   62 
   63 enum CLSCTX {
   64     CLSCTX_INPROC_SERVER    = 0x1,
   65     CLSCTX_INPROC_HANDLER   = 0x2,
   66     CLSCTX_LOCAL_SERVER     = 0x4,
   67     CLSCTX_INPROC_SERVER16  = 0x8,
   68     CLSCTX_REMOTE_SERVER    = 0x10,
   69     CLSCTX_INPROC_HANDLER16 = 0x20,
   70     CLSCTX_INPROC_SERVERX86 = 0x40,
   71     CLSCTX_INPROC_HANDLERX86 = 0x80,
   72 }
   73 
   74 enum MSHLFLAGS {
   75     MSHLFLAGS_NORMAL,
   76     MSHLFLAGS_TABLESTRONG,
   77     MSHLFLAGS_TABLEWEAK
   78 }
   79 
   80 struct FLAGGED_WORD_BLOB {
   81     uint fFlags;
   82     uint clSize;
   83     ushort[1] asData;
   84 }
   85 
   86 alias WCHAR OLECHAR;
   87 alias LPWSTR LPOLESTR;
   88 alias LPCWSTR LPCOLESTR;
   89 
   90 alias ushort VARTYPE;
   91 alias short VARIANT_BOOL;
   92 alias VARIANT_BOOL _VARIANT_BOOL;
   93 enum VARIANT_BOOL VARIANT_TRUE = -1; // 0xffff;
   94 enum VARIANT_BOOL VARIANT_FALSE = 0;
   95 
   96 alias OLECHAR* BSTR;
   97 alias FLAGGED_WORD_BLOB* wireBSTR;
   98 alias BSTR* LPBSTR;
   99 //alias LONG SCODE; // also in winerror
  100 mixin DECLARE_HANDLE!("HCONTEXT");
  101 mixin DECLARE_HANDLE!("HMETAFILEPICT");
  102 
  103 union CY {
  104     struct {
  105         uint Lo;
  106         int Hi;
  107     }
  108     LONGLONG int64;
  109 }
  110 
  111 alias double DATE;
  112 struct  BSTRBLOB {
  113     ULONG cbSize;
  114     PBYTE pData;
  115 }
  116 alias BSTRBLOB* LPBSTRBLOB;
  117 
  118 // Used only in the PROPVARIANT structure
  119 // According to the 2003 SDK, this should be in propidl.h, not here.
  120 struct CLIPDATA {
  121     ULONG cbSize;
  122     int ulClipFmt;
  123     PBYTE pClipData;
  124 }
  125 
  126 enum STGC {
  127     STGC_DEFAULT,
  128     STGC_OVERWRITE,
  129     STGC_ONLYIFCURRENT,
  130     STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE
  131 }
  132 
  133 enum STGMOVE {
  134     STGMOVE_MOVE,
  135     STGMOVE_COPY,
  136     STGMOVE_SHALLOWCOPY
  137 }
  138 
  139 enum VARENUM {
  140     VT_EMPTY,
  141     VT_NULL,
  142     VT_I2,
  143     VT_I4,
  144     VT_R4,
  145     VT_R8,
  146     VT_CY,
  147     VT_DATE,
  148     VT_BSTR,
  149     VT_DISPATCH,
  150     VT_ERROR,
  151     VT_BOOL,
  152     VT_VARIANT,
  153     VT_UNKNOWN,
  154     VT_DECIMAL,
  155     VT_I1 = 16,
  156     VT_UI1,
  157     VT_UI2,
  158     VT_UI4,
  159     VT_I8,
  160     VT_UI8,
  161     VT_INT,
  162     VT_UINT,
  163     VT_VOID,
  164     VT_HRESULT,
  165     VT_PTR,
  166     VT_SAFEARRAY,
  167     VT_CARRAY,
  168     VT_USERDEFINED,
  169     VT_LPSTR,
  170     VT_LPWSTR,
  171     VT_RECORD   = 36,
  172     VT_INT_PTR  = 37,
  173     VT_UINT_PTR = 38,
  174     VT_FILETIME = 64,
  175     VT_BLOB,
  176     VT_STREAM,
  177     VT_STORAGE,
  178     VT_STREAMED_OBJECT,
  179     VT_STORED_OBJECT,
  180     VT_BLOB_OBJECT,
  181     VT_CF,
  182     VT_CLSID,
  183     VT_BSTR_BLOB     = 0xfff,
  184     VT_VECTOR        = 0x1000,
  185     VT_ARRAY         = 0x2000,
  186     VT_BYREF         = 0x4000,
  187     VT_RESERVED      = 0x8000,
  188     VT_ILLEGAL       = 0xffff,
  189     VT_ILLEGALMASKED = 0xfff,
  190     VT_TYPEMASK      = 0xfff
  191 }
  192 
  193 struct BYTE_SIZEDARR {
  194     uint clSize;
  195     byte* pData;
  196 }
  197 
  198 struct WORD_SIZEDARR {
  199     uint clSize;
  200     ushort* pData;
  201 }
  202 
  203 struct DWORD_SIZEDARR {
  204 uint clSize;
  205 uint* pData;
  206 }
  207 
  208 struct HYPER_SIZEDARR {
  209     uint clSize;
  210     hyper* pData;
  211 }
  212 
  213 alias double DOUBLE;
  214 
  215 
  216 struct DECIMAL {
  217     USHORT wReserved;
  218     union {
  219         struct {
  220             ubyte scale; // valid values are 0 to 28
  221             ubyte sign; // 0 for positive, DECIMAL_NEG for negatives.
  222             enum ubyte DECIMAL_NEG = 0x80;
  223         }
  224         USHORT signscale;
  225     }
  226     ULONG Hi32;
  227     union {
  228         struct {
  229             ULONG Lo32;
  230             ULONG Mid32;
  231         }
  232         ULONGLONG Lo64;
  233     }
  234     // #define DECIMAL_SETZERO(d) {(d).Lo64=(d).Hi32=(d).signscale=0;}
  235     void setZero() { Lo64 = 0; Hi32 = 0; signscale = 0; }
  236 }