Skip to content

Latest commit

 

History

History
85 lines (70 loc) · 1.96 KB

File metadata and controls

85 lines (70 loc) · 1.96 KB
title wire_marshal | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-windows
ms.tgt_pltfrm
ms.topic language-reference
f1_keywords
vc-attr.wire_marshal
dev_langs
C++
helpviewer_keywords
wire_marshal attribute
ms.assetid 244f9d72-776d-4ebd-b60a-cee600a126b5
caps.latest.revision 10
author mikeblome
ms.author mblome
manager ghogen
translation.priority.ht
cs-cz
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
pl-pl
pt-br
ru-ru
tr-tr
zh-cn
zh-tw

wire_marshal

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

Syntax

  
[wire_marshal]  
  

Remarks

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

Example

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;  

Requirements

Attribute Context

Applies to typedef
Repeatable No
Required attributes None
Invalid attributes None

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

See Also

IDL Attributes
Typedef, Enum, Union, and Struct Attributes