Skip to content

Commit f358f7e

Browse files
authored
Merge pull request #1003 from mikeblome/mb-issue-306
github issue 306
2 parents 79055e8 + 14c8e2b commit f358f7e

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

docs/dotnet/overview-of-marshaling-in-cpp.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Overview of Marshaling in C++ | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "11/04/2016"
4+
ms.date: "06/28/2018"
55
ms.technology: ["cpp-cli"]
66
ms.topic: "reference"
77
f1_keywords: ["marshaling", "marshalling"]
@@ -13,8 +13,22 @@ ms.author: "mblome"
1313
ms.workload: ["cplusplus", "dotnet"]
1414
---
1515
# 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:
27+
28+
```cmd
29+
C:\\Program Files (x86)\\Microsoft Visual Studio\\Preview\\Enterprise\\VC\\Tools\\MSVC\\14.15.26528\\include\\msclr
30+
```
31+
1832
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:
1933

2034
|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
4761
> [!NOTE]
4862
> 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.
4963
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:
5165

5266
`#include "msclr\marshal_cppstd.h"`
5367

@@ -57,4 +71,4 @@ In mixed mode, you sometimes must marshal your data between native and managed t
5771

5872
## See Also
5973
[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)

docs/mfc/interface-elements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.author: "mblome"
1212
ms.workload: ["cplusplus"]
1313
---
1414
# 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.
1616

1717
The following illustration shows an application that was built by using the new interface elements.
1818

0 commit comments

Comments
 (0)