Skip to content

Commit 1edcaa4

Browse files
committed
1769497, fixed typos.
1 parent 0b1aeed commit 1edcaa4

16 files changed

Lines changed: 35 additions & 35 deletions

docs/dotnet/how-to-declare-override-specifiers-in-native-compilations-cpp-cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public:
6262
};
6363
```
6464

65-
## Example showing that abstract is valid
65+
## Example showing abstract is valid
6666

6767
### Description
6868

docs/dotnet/how-to-extend-the-marshaling-library.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ namespace msclr {
9595
}
9696
```
9797

98-
## Example extending the marshaling library
98+
## Example extending marshaling library
9999

100100
The following example extends the marshaling library with a conversion that does not require a context. In this example, the code converts the employee information from a native data type to a managed data type.
101101

@@ -157,7 +157,7 @@ Managed address: 123 Main Street
157157
Managed zip code: 98111
158158
```
159159

160-
## Example converting the employee information
160+
## Example converting employee information
161161

162162
The following example converts the employee information from a managed data type to a native data type. This conversion requires a marshaling context.
163163

docs/dotnet/how-to-marshal-ansi-strings-using-cpp-interop.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This topic demonstrates how ANSI strings can be passed using C++ Interop, but th
1515

1616
The following code examples use the [managed, unmanaged](../preprocessor/managed-unmanaged.md) #pragma directives to implement managed and unmanaged functions in the same file, but these functions interoperate in the same manner if defined in separate files. Because files containing only unmanaged functions do not need to be compiled with [/clr (Common Language Runtime Compilation)](../build/reference/clr-common-language-runtime-compilation.md), they can retain their performance characteristics.
1717

18-
## Example passing an ANSI string
18+
## Example passing ANSI string
1919

2020
The example demonstrates passing an ANSI string from a managed to an unmanaged function using <xref:System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi%2A>. This method allocates memory on the unmanaged heap and returns the address after performing the conversion. This means that no pinning is necessary (because memory on the GC heap is not being passed to the unmanaged function) and that the IntPtr returned from <xref:System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi%2A> must be explicitly released or a memory leak results.
2121

@@ -49,7 +49,7 @@ int main() {
4949
}
5050
```
5151
52-
## Example of data marshaling required to access an ANSI string
52+
## Example of data marshaling required to access ANSI string
5353
5454
The following example demonstrates the data marshaling required to access an ANSI string in a managed function that is called by an unmanaged function. The managed function, on receiving the native string, can either use it directly or convert it to a managed string using the <xref:System.Runtime.InteropServices.Marshal.PtrToStringAnsi%2A> method, as shown.
5555

docs/dotnet/how-to-marshal-arrays-using-cpp-interop.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This topic demonstrates one facet of Visual C++ interoperability. For more infor
1111

1212
The following code examples use the [managed, unmanaged](../preprocessor/managed-unmanaged.md) #pragma directives to implement managed and unmanaged functions in the same file, but these functions interoperate in the same manner if defined in separate files. Files containing only unmanaged functions do not need to be compiled with [/clr (Common Language Runtime Compilation)](../build/reference/clr-common-language-runtime-compilation.md).
1313

14-
## Example passing a managed array to an unmanaged function
14+
## Example passing managed array to unmanaged function
1515

1616
The following example demonstrates how to pass a managed array to an unmanaged function. The managed function uses [pin_ptr (C++/CLI)](../extensions/pin-ptr-cpp-cli.md) to suppress garbage collection for the array before calling the unmanaged function. By providing the unmanaged function with a pinned pointer into the GC heap, the overhead of making a copy of the array can be avoided. To demonstrate that the unmanaged function is accessing GC heap memory, it modifies the contents of the array and the changes are reflected when the managed function resumes control.
1717

@@ -70,7 +70,7 @@ int main() {
7070
}
7171
```
7272
73-
## Example passing an unmanaged array to a managed function
73+
## Example passing unmanaged array to managed function
7474
7575
The following example demonstrates passing an unmanaged array to a managed function. The managed function accesses the array memory directly (as opposed to creating a managed array and copying the array content), which allows changes made by the managed function to be reflected in the unmanaged function when it regains control.
7676

docs/dotnet/how-to-marshal-callbacks-and-delegates-by-using-cpp-interop.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This topic demonstrates the marshalling of callbacks and delegates (the managed
1111

1212
The following code examples use the [managed, unmanaged](../preprocessor/managed-unmanaged.md) #pragma directives to implement managed and unmanaged functions in the same file, but the functions could also be defined in separate files. Files containing only unmanaged functions do not need to be compiled with the [/clr (Common Language Runtime Compilation)](../build/reference/clr-common-language-runtime-compilation.md).
1313

14-
## Example configuring an unmanaged API to trigger a managed delegate
14+
## Example configuring unmanaged API to trigger managed delegate
1515

1616
The following example demonstrates how to configure an unmanaged API to trigger a managed delegate. A managed delegate is created and one of the interop methods, <xref:System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate%2A>, is used to retrieve the underlying entry point for the delegate. This address is then passed to the unmanaged function, which calls it with no knowledge of the fact that it is implemented as a managed function.
1717

@@ -65,7 +65,7 @@ int main() {
6565
}
6666
```
6767
68-
## Example with the function pointer stored by the unmanaged API
68+
## Example with function pointer stored by unmanaged API
6969
7070
The following example is similar to the previous example, but in this case the provided function pointer is stored by the unmanaged API, so it can be invoked at any time, requiring that garbage collection be suppressed for an arbitrary length of time. As a result, the following example uses a global instance of <xref:System.Runtime.InteropServices.GCHandle> to prevent the delegate from being relocated, independent of function scope. As discussed in the first example, using pin_ptr is unnecessary for these examples, but in this case wouldn't work anyway, as the scope of a pin_ptr is limited to a single function.
7171

docs/dotnet/how-to-marshal-com-strings-using-cpp-interop.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This topic demonstrates how a BSTR (the basic string format favored in COM progr
1515

1616
The following code examples use the [managed, unmanaged](../preprocessor/managed-unmanaged.md) #pragma directives to implement managed and unmanaged functions in the same file, but these functions interoperate in the same manner if defined in separate files. Files containing only unmanaged functions do not need to be compiled with [/clr (Common Language Runtime Compilation)](../build/reference/clr-common-language-runtime-compilation.md).
1717

18-
## Example passing a BSTR from a managed to an unmanaged function
18+
## Example passing BSTR from managed to unmanaged function
1919

2020
The following example demonstrates how a BSTR (a string format used in COM programming) can be passed from a managed to an unmanaged function. The calling managed function uses <xref:System.Runtime.InteropServices.Marshal.StringToBSTR%2A> to obtain the address of a BSTR representation of the contents of a .NET System.String. This pointer is pinned using [pin_ptr (C++/CLI)](../extensions/pin-ptr-cpp-cli.md) to ensure that its physical address is not changed during a garbage collection cycle while the unmanaged function executes. The garbage collector is prohibited from moving the memory until the [pin_ptr (C++/CLI)](../extensions/pin-ptr-cpp-cli.md) goes out of scope.
2121

@@ -52,7 +52,7 @@ int main() {
5252
}
5353
```
5454
55-
## Example passing a BSTR from a an unmanaged to a managed function
55+
## Example passing BSTR from unmanaged to managed function
5656
5757
The following example demonstrates how a BSTR can be passed from an unmanaged to an unmanaged function. The receiving managed function can either use the string in as a BSTR or use <xref:System.Runtime.InteropServices.Marshal.PtrToStringBSTR%2A> to convert it to a <xref:System.String> for use with other managed functions. Because the memory representing the BSTR is allocated on the unmanaged heap, no pinning is necessary, because there is no garbage collection on the unmanaged heap.
5858

docs/dotnet/how-to-marshal-structures-using-cpp-interop.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This topic demonstrates one facet of Visual C++ interoperability. For more infor
1111

1212
The following code examples use the [managed, unmanaged](../preprocessor/managed-unmanaged.md) #pragma directives to implement managed and unmanaged functions in the same file, but these functions interoperate in the same manner if defined in separate files. Files containing only unmanaged functions do not need to be compiled with [/clr (Common Language Runtime Compilation)](../build/reference/clr-common-language-runtime-compilation.md).
1313

14-
## Example passing a structure from a managed to an unmanaged function
14+
## Example passing structure from managed to unmanaged function
1515

1616
The following example demonstrates passing a structure from a managed to an unmanaged function, both by value and by reference. Because the structure in this example contains only simple, intrinsic data types (see [Blittable and Non-Blittable Types](/dotnet/framework/interop/blittable-and-non-blittable-types)), no special marshaling is required. To marshal non-blittable structures, such as those that contain pointers, see [How to: Marshal Embedded Pointers Using C++ Interop](../dotnet/how-to-marshal-embedded-pointers-using-cpp-interop.md).
1717

@@ -69,7 +69,7 @@ int main() {
6969
}
7070
```
7171
72-
## Example passing a structure from an unmanaged to a managed function
72+
## Example passing structure from unmanaged to managed function
7373
7474
The following example demonstrates passing a structure from an unmanaged to a managed function, both by value and by reference. Because the structure in this example contains only simple, intrinsic data types (see [Blittable and Non-Blittable Types](/dotnet/framework/interop/blittable-and-non-blittable-types)), no special marshalling is required. To marshal non-blittable structures, such as those that contain pointers, see [How to: Marshal Embedded Pointers Using C++ Interop](../dotnet/how-to-marshal-embedded-pointers-using-cpp-interop.md).
7575

docs/dotnet/how-to-marshal-unicode-strings-using-cpp-interop.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This topic demonstrates how Unicode strings can be passed from a managed to an u
1717

1818
- [How to: Marshal COM Strings Using C++ Interop](../dotnet/how-to-marshal-com-strings-using-cpp-interop.md)
1919

20-
## Example passing a Unicode string from a managed to an unmanaged function
20+
## Example passing Unicode string from managed to unmanaged function
2121

2222
To pass a Unicode string from a managed to an unmanaged function, the PtrToStringChars function (declared in Vcclr.h) can be used to access in the memory where the managed string is stored. Because this address will be passed to a native function, it is important that the memory be pinned with [pin_ptr (C++/CLI)](../extensions/pin-ptr-cpp-cli.md) to prevent the string data from being relocated, should a garbage collection cycle take place while the unmanaged function executes.
2323

@@ -50,7 +50,7 @@ int main() {
5050
}
5151
```
5252
53-
## Example with data marshaling required to access a Unicode string
53+
## Example with data marshaling required to access Unicode string
5454
5555
The following example demonstrates the data marshaling required to access a Unicode string in a managed function called by an unmanaged function. The managed function, on receiving the native Unicode string, converts it to a managed string using the <xref:System.Runtime.InteropServices.Marshal.PtrToStringUni%2A> method.
5656

docs/extensions/consuming-generics-cpp-cli.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.assetid: e6330ef5-e907-432e-b527-7a22f5899639
99

1010
Generics authored in one .NET (or UWP) language may be used in other languages. Unlike templates, a generic in a compiled assembly still remains generic. Thus, one may instantiate the generic type in a different assembly and even in a different language than the assembly in which the generic type was defined.
1111

12-
## Example of a generic class defined in C#
12+
## Example of generic class defined in C#
1313

1414
### Description
1515

@@ -73,7 +73,7 @@ public class CircularList<ItemType> {
7373
}
7474
```
7575

76-
## Example consumes the assembly authored in C#
76+
## Example consumes assembly authored in C#
7777

7878
### Description
7979

docs/extensions/generic-classes-cpp-cli.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ The signature of a non-generic method can include one or more type parameters of
272272

273273
The body of such methods can also use these type parameters.
274274

275-
## Example declaring a non-generic method
275+
## Example declaring non-generic method
276276

277277
The following example declares a non-generic method, `ProtectData`, inside a generic class, `MyClass<ItemType>`. The method uses the class type parameter `ItemType` in its signature in an open constructed type.
278278

@@ -443,7 +443,7 @@ Since there is no way to refer to the outer type parameter, the compiler will pr
443443

444444
When constructed nested generic types are named, the type parameter for the outer type is not included in the type parameter list for the inner type, even though the inner type is implicitly parameterized by the outer type's type parameter. In the above case, a name of a constructed type would be `Outer<int>::Inner<string>`.
445445

446-
## Example building and reading a linked list
446+
## Example building and reading linked list
447447

448448
The following example demonstrates building and reading a linked list using nested types in generic classes.
449449

@@ -546,7 +546,7 @@ Reading nodes:
546546

547547
- Properties, events, indexers and operators cannot themselves be parameterized.
548548

549-
## Example declaring an instance property
549+
## Example declaring instance property
550550

551551
This example shows declarations of an instance property within a generic class.
552552

@@ -586,7 +586,7 @@ int main() {
586586
John, 234
587587
```
588588

589-
## Example of a generic class with an event
589+
## Example of generic class with event
590590

591591
The next example shows a generic class with an event.
592592

@@ -653,7 +653,7 @@ int main() {
653653
654654
The rules for declaring and using generic structs are the same as those for generic classes, except for the differences noted in the Visual C++ language reference.
655655
656-
## Example declaring a generic struct
656+
## Example declaring generic struct
657657
658658
The following example declares a generic struct, `MyGenStruct`, with one field, `myField`, and assigns values of different types (**`int`**, **`double`**, `String^`) to this field.
659659

0 commit comments

Comments
 (0)