Skip to content

Commit fbfd6fb

Browse files
ErlendLandroRon Petrusha
authored andcommitted
Replace 'Visual C++ component extensions' with plain text (#88)
for dotnet/docs#4801
1 parent 3f11eb0 commit fbfd6fb

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

includes/cppwrt-md.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

xml/System.Runtime.InteropServices.WindowsRuntime/ReadOnlyArrayAttribute.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
Applying both attributes to a parameter causes an error. For more information, including the standard pattern for making changes to an array, see [Passing arrays to a Windows Runtime component](http://go.microsoft.com/fwlink/?LinkId=251026) in the Windows Dev Center.
3939
4040
> [!IMPORTANT]
41-
> Parameters that have the <xref:System.Runtime.InteropServices.WindowsRuntime.ReadOnlyArrayAttribute> attribute behave differently depending on whether the caller is written in native code or managed code. If the caller is native code (JavaScript or [!INCLUDE[cppwrt](~/includes/cppwrt-md.md)]), the array is copied when the call crosses the application binary interface (ABI) boundary. Elements are converted if necessary. Therefore, any accidental changes the method makes to an input-only array are not visible to the caller.
41+
> Parameters that have the <xref:System.Runtime.InteropServices.WindowsRuntime.ReadOnlyArrayAttribute> attribute behave differently depending on whether the caller is written in native code or managed code. If the caller is native code (JavaScript or Visual C++ component extensions), the array is copied when the call crosses the application binary interface (ABI) boundary. Elements are converted if necessary. Therefore, any accidental changes the method makes to an input-only array are not visible to the caller.
4242
>
4343
> If the caller is managed code, the array is not copied. The original array is available to the called method, as it would be in any method call in the .NET Framework. Array contents are mutable in .NET Framework code, so any changes the method makes to the array are visible to the caller. This is important to remember because it affects unit tests written for a [!INCLUDE[wrt](~/includes/wrt-md.md)] component. If the tests are written in managed code, the contents of an array will appear to be mutable during testing.
4444

xml/System.Runtime.InteropServices.WindowsRuntime/WriteOnlyArrayAttribute.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
Applying both attributes to a parameter causes an error. For more information, including the standard pattern for making changes to an array, see [Passing arrays to a Windows Runtime component](http://go.microsoft.com/fwlink/?LinkId=251026) in the Windows Dev Center.
3939
4040
> [!IMPORTANT]
41-
> Parameters that have the <xref:System.Runtime.InteropServices.WindowsRuntime.WriteOnlyArrayAttribute> attribute behave differently depending on whether the caller is written in native code or managed code. If the caller is native code (JavaScript or [!INCLUDE[cppwrt](~/includes/cppwrt-md.md)]), the called method can't make any assumptions about the contents of the original array. For example, the array the method receives might not be initialized, or might contain default values. The method is expected to set the values of all the elements in the array.
41+
> Parameters that have the <xref:System.Runtime.InteropServices.WindowsRuntime.WriteOnlyArrayAttribute> attribute behave differently depending on whether the caller is written in native code or managed code. If the caller is native code (JavaScript or Visual C++ component extensions), the called method can't make any assumptions about the contents of the original array. For example, the array the method receives might not be initialized, or might contain default values. The method is expected to set the values of all the elements in the array.
4242
>
4343
> If the caller is managed code, the caller's original array is passed to the called method, as it would be in any method call in the .NET Framework. Array contents are mutable in managed code, so the method can selectively read and change those values. This is important to remember because it affects unit tests written for a [!INCLUDE[wrt](~/includes/wrt-md.md)] component. If the tests are written in managed code, the contents of an array will appear to be mutable during testing, and the results are likely to be different if the method is called from native code later.
4444

0 commit comments

Comments
 (0)