wire_marshal

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

Specifies a data type that will be used for transmission instead of an application-specific data type.

  
[wire_marshal]  
  

The wire_marshal C++ attribute has the same functionality as the wire_marshal MIDL attribute.

The following code shows a use of wire_marshal:

// cpp_attr_ref_wire_marshal.cpp  
// compile with: /LD  
#include "windows.h"  
[module(name="MyLibrary")];  
  
[export, public] typedef unsigned long _FOUR_BYTE_DATA;  
  
[export] typedef struct _TWO_X_TWO_BYTE_DATA {  
   unsigned short low;  
   unsigned short high;  
} TWO_X_TWO_BYTE_DATA ;  
  
[export, wire_marshal(TWO_X_TWO_BYTE_DATA)] typedef _FOUR_BYTE_DATA FOUR_BYTE_DATA;  

Attribute Context

Applies totypedef
RepeatableNo
Required attributesNone
Invalid attributesNone

For more information about the attribute contexts, see Attribute Contexts.

IDL Attributes
Typedef, Enum, Union, and Struct Attributes
Attributes Samples

Show: