Windows Defines

 from MSDEV Include basetyps.h

 in case stdafx or windows.h are not included

 

/**************************************

 macros to define byte pattern for a GUID.

      Example: DEFINE_GUID(GUID_XXX, a, b, c, ...);

 

 Each dll/exe must initialize the GUIDs once.  This is done in one of

 two ways.  If you are not using precompiled headers for the file(s)which

 initializes the GUIDs, define INITGUID before including compobj.h.  This

 is how OLE builds the initialized versions of the GUIDs which are included

 in ole2.lib.  The GUIDs in ole2.lib are all defined in the same text

 segment GUID_TEXT.

 

 The alternative (which some versions of the compiler don't handle properly;

 they wind up with the initialized GUIDs in a data, not a text segment),

 is to use a precompiled version of compobj.h and then include initguid.h

 after compobj.h followed by one or more of the guid defintion files.

**************************/

 

#ifndef INITGUID

#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \

    EXTERN_C const GUID FAR name

#else

 

#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \

        EXTERN_C const GUID name \

                = { l, w1, w2, { b1, b2,  b3,  b4,  b5,  b6,  b7,  b8 } }

#endif  INITGUID

 

#define DEFINE_OLEGUID(name, l, w1, w2) \

    DEFINE_GUID(name, l, w1, w2, 0xC0,0,0,0,0,0,0,0x46)

 

#ifndef _ERROR_STATUS_T_DEFINED

typedef unsigned long error_status_t;

#define _ERROR_STATUS_T_DEFINED

#endif

 

#ifndef _WCHAR_T_DEFINED

typedef unsigned short wchar_t;

#define _WCHAR_T_DEFINED

#endif

 

#ifndef GUID_DEFINED

#define GUID_DEFINED

typedef struct _GUID

{

    unsigned long Data1;

    unsigned short Data2;

    unsigned short Data3;

    unsigned char Data4[8];

} GUID;

#endif /* GUID_DEFINED */