//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// The use and distribution terms for this software are covered by the
// Microsoft Limited Public License (Ms-LPL)
// which can be found in the file MS-LPL.txt at the root of this distribution.
// By using this software in any fashion, you are agreeing to be bound by
// the terms of this license.
//
// The software is licensed “as-is.”
//
// You must not remove this notice, or any other, from this software.
//
//
//
// Demux code for Windows CE
//
//-------------------------------------------------------------------------
//======================================================================
// Demux code for Windows CE
//======================================================================
//------------------------------------------------------------------------------
// File: exposeenums2managed.h
//
// Desc: macros to allow the same enum to be exposed to native and managed
//
// USAGE:
//
// in your whatever.h file that defines the enums use ENUM or FLAGS(for enums defining bitmasks/flags)
// at the top of the file include this .h
// at the bottom of the file include unexposeenums2managed.h(resets the macro state)
//
// in a native client .idl/.h/.cpp file as normal just
// #include
// this will include the file normally
//
// in a mgd cpp file
// #include
// once normally, this will make the enums available to native
//
//------------------------------------------------------------------------------
// !!! do not pragma once or macro guard this file.
// it gets used multiple times by the same compilation units
#ifdef MANAGED_ENUMS
#ifndef _MANAGED
#error "you can only generate managed enums when compiling managed code"
#endif
#define ENUM typedef public __value enum
#define ENUM16 ENUM
#define FLAGS [System::Flags] ENUM
#define TAG(x) x
#else
#ifdef __midl
#define V1_ENUM [v1_enum]
#else
#define V1_ENUM
#endif
#define ENUM typedef V1_ENUM enum
#define ENUM16 typedef enum
#define FLAGS ENUM
#define TAG(x) tag##x
#endif
// end of file - exposeenums2managed.h