The Labs \ Source Viewer \ SSCLI \ System.Runtime.CompilerServices \ CompilerMarshalOverride

  1. // ==++==
  2. //
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. //
  14. // ==--==
  15. namespace System.Runtime.CompilerServices
  16. {
  17.     // The CLR data marshaler has some behaviors that are incompatible with
  18.     // C++. Specifically, C++ treats boolean variables as byte size, whereas
  19.     // the marshaller treats them as 4-byte size. Similarly, C++ treats
  20.     // wchar_t variables as 4-byte size, whereas the marshaller treats them
  21.     // as single byte size under certain conditions. In order to work around
  22.     // such issues, the C++ compiler will emit a type that the marshaller will
  23.     // marshal using the correct sizes. In addition, the compiler will place
  24.     // this modopt onto the variables to indicate that the specified type is
  25.     // not the true type. Any compiler that needed to deal with similar
  26.     // marshalling incompatibilities could use this attribute as well.
  27.     //
  28.     // Indicates that the modified instance differs from its true type for
  29.     // correct marshalling.
  30.     public static class CompilerMarshalOverride
  31.     {
  32.     }
  33. }

Developer Fusion