You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/dotnet/overview-of-marshaling-in-cpp.md
+19-5Lines changed: 19 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: "Overview of Marshaling in C++ | Microsoft Docs"
3
3
ms.custom: ""
4
-
ms.date: "11/04/2016"
4
+
ms.date: "06/28/2018"
5
5
ms.technology: ["cpp-cli"]
6
6
ms.topic: "reference"
7
7
f1_keywords: ["marshaling", "marshalling"]
@@ -13,8 +13,22 @@ ms.author: "mblome"
13
13
ms.workload: ["cplusplus", "dotnet"]
14
14
---
15
15
# Overview of Marshaling in C++
16
-
In mixed mode, you sometimes must marshal your data between native and managed types. [!INCLUDE[vs_orcas_long](../atl/reference/includes/vs_orcas_long_md.md)] introduced the marshaling library to help you marshal and convert data in a simple way.
17
-
16
+
In mixed mode, you sometimes must marshal your data between native and managed types. Visual Studio 2008 introduced the *marshaling library* to help you marshal and convert data in a simple way. The marshaling library consists of a set of functions and a `marshal_context` class that perform marshaling for common types. The library is defined in these headers in the **include/msclr** directory for your Visual Studio edition:
17
+
18
+
|Header|Description|
19
+
|---------------|-----------------|
20
+
|marshal.h|`marshal_context` class and context-free marshaling functions|
21
+
|marshal_atl.h| Functions for marshaling ATL types|
22
+
|marshal_cppstd.h|Functions for marshaling standard C++ types|
23
+
|marshal_windows.h|Functions for marshaling Windows types|
24
+
25
+
26
+
The default path for **msclr** folder is something like this depending on which edition you have and the build number:
You can use the marshaling library with or without a [marshal_context Class](../dotnet/marshal-context-class.md). Some conversions require a context. Other conversions can be implemented using the [marshal_as](../dotnet/marshal-as.md) function. The following table lists the current conversions supported, whether they require a context, and what marshal file you have to include:
19
33
20
34
|From type|To type|Marshal method|Include file|
@@ -47,7 +61,7 @@ In mixed mode, you sometimes must marshal your data between native and managed t
47
61
> [!NOTE]
48
62
> If you have embedded `NULL`s in your string, the result of marshaling the string is not guaranteed. The embedded `NULL`s can cause the string to be truncated or they might be preserved.
49
63
50
-
The marshaling library headers are located in the include directory in the msclr subdirectory. This example shows how to include the msclr directory in an include header declaration:
64
+
This example shows how to include the msclr directory in an include header declaration:
51
65
52
66
`#include "msclr\marshal_cppstd.h"`
53
67
@@ -57,4 +71,4 @@ In mixed mode, you sometimes must marshal your data between native and managed t
57
71
58
72
## See Also
59
73
[C++ Support Library](../dotnet/cpp-support-library.md)
60
-
[How to: Extend the Marshaling Library](../dotnet/how-to-extend-the-marshaling-library.md)
74
+
[How to: Extend the Marshaling Library](../dotnet/how-to-extend-the-marshaling-library.md)
Copy file name to clipboardExpand all lines: docs/mfc/interface-elements.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ ms.author: "mblome"
12
12
ms.workload: ["cplusplus"]
13
13
---
14
14
# Interface Elements
15
-
This document describes interface elements that were introduced in [!INCLUDE[vs_orcas_long](../atl/reference/includes/vs_orcas_long_md.md)] SP1, and also describes differences with the earlier version of the library.
15
+
This document describes interface elements that were introduced in Visual Studio 2008 SP1, and also describes differences with the earlier version of the library.
16
16
17
17
The following illustration shows an application that was built by using the new interface elements.
0 commit comments