From 7eeceff03849b98a9241983ffeaa545eac65f6f7 Mon Sep 17 00:00:00 2001 From: Ron Petrusha Date: Wed, 7 Mar 2018 14:37:16 -0800 Subject: [PATCH 1/3] Fixed broken links in interop docs --- ...enerate-primary-interop-assemblies-using-tlbimp-exe.md | 2 +- .../interop/how-to-register-primary-interop-assemblies.md | 8 ++++---- .../PrimaryInteropAssemblyAttribute.xml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/framework/interop/how-to-generate-primary-interop-assemblies-using-tlbimp-exe.md b/docs/framework/interop/how-to-generate-primary-interop-assemblies-using-tlbimp-exe.md index cc9b89e188197..484d4e5b16e2b 100644 --- a/docs/framework/interop/how-to-generate-primary-interop-assemblies-using-tlbimp-exe.md +++ b/docs/framework/interop/how-to-generate-primary-interop-assemblies-using-tlbimp-exe.md @@ -52,7 +52,7 @@ There are two ways to generate a primary interop assembly: A dependent primary interop assembly with a version number that differs from that of the original type library is not discoverable when installed in the current directory. You must either register the dependent primary interop assembly in the Windows registry or use the **/reference** option to be sure that Tlbimp.exe finds the dependent DLL. - You can also wrap multiple versions of a type library. For instructions, see [How to: Wrap Multiple Versions of Type Libraries](http://msdn.microsoft.com/library/79eefe04-a770-4bc3-8ea2-e90ddb8ec31f). + You can also wrap multiple versions of a type library. For instructions, see [How to: Wrap Multiple Versions of Type Libraries](https://msdn.microsoft.com/en-us/library/79eefe04-a770-4bc3-8ea2-e90ddb8ec31f(v=vs.100)). ## Example The following example imports the COM type library `LibUtil.tlb` and signs the assembly `LibUtil.dll` with a strong name using the key file `CompanyA.snk`. By omitting a specific namespace name, this example produces the default namespace, `LibUtil`. diff --git a/docs/framework/interop/how-to-register-primary-interop-assemblies.md b/docs/framework/interop/how-to-register-primary-interop-assemblies.md index 76029420fbc28..3ea6af0fbe581 100644 --- a/docs/framework/interop/how-to-register-primary-interop-assemblies.md +++ b/docs/framework/interop/how-to-register-primary-interop-assemblies.md @@ -50,11 +50,11 @@ Classes can be marshaled only by COM interop and are always marshaled as interfa ## Example The following example registers the `CompanyA.UtilLib.dll` primary interop assembly. -``` +```console regasm CompanyA.UtilLib.dll ``` ## See Also - [Programming with Primary Interop Assemblies](http://msdn.microsoft.com/library/306fa1d6-0703-4004-9e93-d0a57f1be81e) - [Locating Primary Interop Assemblies](http://msdn.microsoft.com/library/d6768e4b-cd80-414d-a4f8-05d979eb393b) - [Redistributing Primary Interop Assemblies](http://msdn.microsoft.com/library/e76384f0-d631-474c-bdbd-13884cba0265) + [Programming with Primary Interop Assemblies](https://msdn.microsoft.com/en-us/library/306fa1d6-0703-4004-9e93-d0a57f1be81e(v=vs.100)) + [Locating Primary Interop Assemblies](https://msdn.microsoft.com/en-us/library/d6768e4b-cd80-414d-a4f8-05d979eb393b(v=vs.100)) + [Redistributing Primary Interop Assemblies](https://msdn.microsoft.com/en-us/library/e76384f0-d631-474c-bdbd-13884cba0265(v=vs.100)) diff --git a/xml/System.Runtime.InteropServices/PrimaryInteropAssemblyAttribute.xml b/xml/System.Runtime.InteropServices/PrimaryInteropAssemblyAttribute.xml index 48b65822011b7..5bf61cde8aeb6 100644 --- a/xml/System.Runtime.InteropServices/PrimaryInteropAssemblyAttribute.xml +++ b/xml/System.Runtime.InteropServices/PrimaryInteropAssemblyAttribute.xml @@ -45,7 +45,7 @@ To specify a primary interop assembly in managed source code, you must apply the and to the assembly at design time. The on the primary interop assembly identifies the LIBID of the type library and the identifies the version of the particular type library for which this assembly is the primary interop assembly. The can appear multiple times if the assembly is the primary interop assembly for multiple versions of the same type library. - When using the types defined in a type library, always reference the primary interop assembly for that type library, rather than reimporting or redefining the types themselves. For guidelines and procedures on how to produce or use primary interop assemblies, see [Primary Interop Assemblies](http://msdn.microsoft.com/library/b977a8be-59a0-40a0-a806-b11ffba5c080). For a detailed description of the type library importing process, see [Type Library to Assembly Conversion Summary](https://msdn.microsoft.com/library/bf3f90c5-4770-4ab8-895c-3ba1055cc958(v=vs.100)). + When using the types defined in a type library, always reference the primary interop assembly for that type library, rather than reimporting or redefining the types themselves. For guidelines and procedures on how to produce or use primary interop assemblies, see [Primary Interop Assemblies](https://msdn.microsoft.com/en-us/library/b977a8be-59a0-40a0-a806-b11ffba5c080(v=vs.100)). For a detailed description of the type library importing process, see [Type Library to Assembly Conversion Summary](https://msdn.microsoft.com/library/bf3f90c5-4770-4ab8-895c-3ba1055cc958(v=vs.100)). ]]> From 900d3602b0c1dfd08f048002b0e22bbb0d241eb1 Mon Sep 17 00:00:00 2001 From: Ron Petrusha Date: Wed, 7 Mar 2018 15:52:38 -0800 Subject: [PATCH 2/3] Updated additional links --- .../interop/blittable-and-non-blittable-types.md | 12 ++++++------ .../interop/compiling-an-interop-project.md | 4 ++-- .../interop/deploying-an-interop-application.md | 4 ++-- docs/framework/interop/exposing-com-components.md | 2 +- .../interop/exposing-dotnet-components-to-com.md | 4 ++-- .../importing-a-type-library-as-an-assembly.md | 12 ++++++------ .../qualifying-net-types-for-interoperation.md | 2 +- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/docs/framework/interop/blittable-and-non-blittable-types.md b/docs/framework/interop/blittable-and-non-blittable-types.md index 1b213d66610c6..e5b866fa0b3bf 100644 --- a/docs/framework/interop/blittable-and-non-blittable-types.md +++ b/docs/framework/interop/blittable-and-non-blittable-types.md @@ -55,7 +55,7 @@ Most data types have a common representation in both managed and unmanaged memor - One-dimensional arrays of blittable types, such as an array of integers. However, a type that contains a variable array of blittable types is not itself blittable. -- Formatted value types that contain only blittable types (and classes if they are marshaled as formatted types). For more information about formatted value types, see [Default Marshaling for Value Types](http://msdn.microsoft.com/library/4d9a876c-e05a-40ba-bd85-bd22877f984a). +- Formatted value types that contain only blittable types (and classes if they are marshaled as formatted types). For more information about formatted value types, see [Default Marshaling for Value Types](https://msdn.microsoft.com/en-us/library/4d9a876c-e05a-40ba-bd85-bd22877f984a(v=vs.100)). Object references are not blittable. This includes an array of references to objects that are blittable by themselves. For example, you can define a structure that is blittable, but you cannot define a blittable type that contains an array of references to those structures. @@ -63,18 +63,18 @@ Most data types have a common representation in both managed and unmanaged memor Some managed data types require a different representation in an unmanaged environment. These non-blittable data types must be converted into a form that can be marshaled. For example, managed strings are non-blittable types because they must be converted into string objects before they can be marshaled. - The following table lists non-blittable types from the namespace. [Delegates](http://msdn.microsoft.com/library/d176ee76-f982-494b-b03d-92e4118896e2), which are data structures that refer to a static method or to a class instance, are also non-blittable. + The following table lists non-blittable types from the namespace. [Delegates](https://msdn.microsoft.com/en-us/library/d176ee76-f982-494b-b03d-92e4118896e2(v=vs.100)), which are data structures that refer to a static method or to a class instance, are also non-blittable. |Non-blittable type|Description| |-------------------------|-----------------| |[System.Array](../../../docs/framework/interop/default-marshaling-for-arrays.md)|Converts to a C-style array or a `SAFEARRAY`.| -|[System.Boolean](http://msdn.microsoft.com/library/d4c00537-70f7-4ca6-8197-bfc1ec037ff9)|Converts to a 1, 2, or 4-byte value with `true` as 1 or -1.| -|[System.Char](http://msdn.microsoft.com/library/cecc87c1-075e-4cde-aa56-33d189f66feb)|Converts to a Unicode or ANSI character.| -|[System.Class](http://msdn.microsoft.com/library/fe334af5-0123-43d8-be84-26f6f023ddb6)|Converts to a class interface.| +|[System.Boolean](https://msdn.microsoft.com/en-us/library/d4c00537-70f7-4ca6-8197-bfc1ec037ff9(v=vs.100))|Converts to a 1, 2, or 4-byte value with `true` as 1 or -1.| +|[System.Char](https://msdn.microsoft.com/en-us/library/cecc87c1-075e-4cde-aa56-33d189f66feb(v=vs.100))|Converts to a Unicode or ANSI character.| +|[System.Class](https://msdn.microsoft.com/en-us/library/fe334af5-0123-43d8-be84-26f6f023ddb6(v=vs.100))|Converts to a class interface.| |[System.Object](../../../docs/framework/interop/default-marshaling-for-objects.md)|Converts to a variant or an interface.| |[System.Mdarray](../../../docs/framework/interop/default-marshaling-for-arrays.md)|Converts to a C-style array or a `SAFEARRAY`.| |[System.String](../../../docs/framework/interop/default-marshaling-for-strings.md)|Converts to a string terminating in a null reference or to a BSTR.| -|[System.Valuetype](http://msdn.microsoft.com/library/4d9a876c-e05a-40ba-bd85-bd22877f984a)|Converts to a structure with a fixed memory layout.| +|[System.Valuetype](https://msdn.microsoft.com/en-us/library/4d9a876c-e05a-40ba-bd85-bd22877f984a(v=vs.100))|Converts to a structure with a fixed memory layout.| |[System.Szarray](../../../docs/framework/interop/default-marshaling-for-arrays.md)|Converts to a C-style array or a `SAFEARRAY`.| Class and object types are supported only by COM interop. For corresponding types in [!INCLUDE[vbprvblong](../../../includes/vbprvblong-md.md)], C#, and C++, see the [Class Library Overview](../../../docs/standard/class-library-overview.md). diff --git a/docs/framework/interop/compiling-an-interop-project.md b/docs/framework/interop/compiling-an-interop-project.md index ea3eb0194fff6..fc5575ea7ead5 100644 --- a/docs/framework/interop/compiling-an-interop-project.md +++ b/docs/framework/interop/compiling-an-interop-project.md @@ -33,7 +33,7 @@ COM interop projects that reference one or more assemblies containing imported C - Deploying interop assemblies: You can create a standard reference to an interop assembly. In this case, the interop assembly must be deployed with your application. - The differences between these two techniques are discussed in greater detail in [Using COM Types in Managed Code](http://msdn.microsoft.com/library/1a95a8ca-c8b8-4464-90b0-5ee1a1135b66). + The differences between these two techniques are discussed in greater detail in [Using COM Types in Managed Code](https://msdn.microsoft.com/en-us/library/1a95a8ca-c8b8-4464-90b0-5ee1a1135b66(v=vs.100)). Embedding interop types with Visual Studio is demonstrated in [Walkthrough: Embedding Type Information from Microsoft Office Assemblies](http://msdn.microsoft.com/library/85b55e05-bc5e-4665-b6ae-e1ada9299fd3) and [Walkthrough: Embedding Types from Managed Assemblies](http://msdn.microsoft.com/library/b28ec92c-1867-4847-95c0-61adfe095e21). @@ -47,7 +47,7 @@ COM interop projects that reference one or more assemblies containing imported C ## See Also [Exposing COM Components to the .NET Framework](../../../docs/framework/interop/exposing-com-components.md) [Language Independence and Language-Independent Components](../../../docs/standard/language-independence-and-language-independent-components.md) - [Using COM Types in Managed Code](http://msdn.microsoft.com/library/1a95a8ca-c8b8-4464-90b0-5ee1a1135b66) + [Using COM Types in Managed Code](https://msdn.microsoft.com/en-us/library/1a95a8ca-c8b8-4464-90b0-5ee1a1135b66(v=vs.100)) [Walkthrough: Embedding Type Information from Microsoft Office Assemblies](http://msdn.microsoft.com/library/85b55e05-bc5e-4665-b6ae-e1ada9299fd3) [Walkthrough: Embedding Types from Managed Assemblies](http://msdn.microsoft.com/library/b28ec92c-1867-4847-95c0-61adfe095e21) [Importing a Type Library as an Assembly](../../../docs/framework/interop/importing-a-type-library-as-an-assembly.md) diff --git a/docs/framework/interop/deploying-an-interop-application.md b/docs/framework/interop/deploying-an-interop-application.md index 65e1648b568ae..570f0571d8a0b 100644 --- a/docs/framework/interop/deploying-an-interop-application.md +++ b/docs/framework/interop/deploying-an-interop-application.md @@ -34,7 +34,7 @@ An interop application typically includes a .NET client assembly, one or more in - By using embedded interop types: Beginning with the [!INCLUDE[net_v40_long](../../../includes/net-v40-long-md.md)], you can instruct the compiler to embed type information from an interop assembly into your executable. The compiler embeds only the type information that your application uses. You do not have to deploy the interop assembly with your application. This is the recommended technique. -- By deploying interop assemblies: You can create a standard reference to an interop assembly. In this case, the interop assembly must be deployed with your application. If you employ this technique, and you are not using a private COM component, always reference the primary interop assembly (PIA) published by the author of the COM component you intend to incorporate in your managed code. For more information about producing and using primary interop assemblies, see [Primary Interop Assemblies](http://msdn.microsoft.com/library/b977a8be-59a0-40a0-a806-b11ffba5c080). +- By deploying interop assemblies: You can create a standard reference to an interop assembly. In this case, the interop assembly must be deployed with your application. If you employ this technique, and you are not using a private COM component, always reference the primary interop assembly (PIA) published by the author of the COM component you intend to incorporate in your managed code. For more information about producing and using primary interop assemblies, see [Primary Interop Assemblies](https://msdn.microsoft.com/en-us/library/b977a8be-59a0-40a0-a806-b11ffba5c080(v=vs.100)). If you use embedded interop types, deployment is simple and straightforward. There is nothing special you need to do. The rest of this article describes the scenarios for deploying interop assemblies with your application. @@ -55,5 +55,5 @@ Directory structure and registry entries for a private deployment ## See Also [Exposing COM Components to the .NET Framework](../../../docs/framework/interop/exposing-com-components.md) [Importing a Type Library as an Assembly](../../../docs/framework/interop/importing-a-type-library-as-an-assembly.md) - [Using COM Types in Managed Code](http://msdn.microsoft.com/library/1a95a8ca-c8b8-4464-90b0-5ee1a1135b66) + [Using COM Types in Managed Code](https://msdn.microsoft.com/en-us/library/1a95a8ca-c8b8-4464-90b0-5ee1a1135b66(v=vs.100)) [Compiling an Interop Project](../../../docs/framework/interop/compiling-an-interop-project.md) diff --git a/docs/framework/interop/exposing-com-components.md b/docs/framework/interop/exposing-com-components.md index 2fa78b2fa2a25..c2f2959dcdadc 100644 --- a/docs/framework/interop/exposing-com-components.md +++ b/docs/framework/interop/exposing-com-components.md @@ -32,7 +32,7 @@ This section summarizes the process needed to expose an existing COM component t The common language runtime requires metadata for all types, including COM types. There are several ways to obtain an assembly containing COM types imported as metadata. -2. [Create COM types in managed Code](http://msdn.microsoft.com/library/1a95a8ca-c8b8-4464-90b0-5ee1a1135b66). +2. [Create COM types in managed Code](https://msdn.microsoft.com/en-us/library/1a95a8ca-c8b8-4464-90b0-5ee1a1135b66(v=vs.100)). You can inspect COM types, activate instances, and invoke methods on the COM object the same way you do for any managed type. diff --git a/docs/framework/interop/exposing-dotnet-components-to-com.md b/docs/framework/interop/exposing-dotnet-components-to-com.md index 4fde68d706c89..ad28051e7bd36 100644 --- a/docs/framework/interop/exposing-dotnet-components-to-com.md +++ b/docs/framework/interop/exposing-dotnet-components-to-com.md @@ -48,11 +48,11 @@ Writing a .NET type and consuming that type from unmanaged code are distinct act COM developers can reference types in an assembly using the same tools and techniques they use today. -3. [Call a .NET object](http://msdn.microsoft.com/library/40c9626c-aea6-4bad-b8f0-c1de462efd33). +3. [Call a .NET object](https://msdn.microsoft.com/en-us/library/40c9626c-aea6-4bad-b8f0-c1de462efd33(v=vs.100)). COM developers can call methods on the .NET object the same way they call methods on any unmanaged type. For example, the COM **CoCreateInstance** API activates .NET objects. -4. [Deploy an application for COM access](http://msdn.microsoft.com/library/fb63564c-c1b9-4655-a094-a235625882ce). +4. [Deploy an application for COM access](https://msdn.microsoft.com/en-us/library/fb63564c-c1b9-4655-a094-a235625882ce(v=vs.100)). A strong-named assembly can be installed in the global assembly cache and requires a signature from its publisher. Assemblies that are not strong named must be installed in the application directory of the client. diff --git a/docs/framework/interop/importing-a-type-library-as-an-assembly.md b/docs/framework/interop/importing-a-type-library-as-an-assembly.md index 3317c9e150174..adc4bc89db31e 100644 --- a/docs/framework/interop/importing-a-type-library-as-an-assembly.md +++ b/docs/framework/interop/importing-a-type-library-as-an-assembly.md @@ -37,7 +37,7 @@ COM type definitions usually reside in a type library. In contrast, CLS-complian - Using design-time-only interop assemblies: Beginning with the [!INCLUDE[net_v40_long](../../../includes/net-v40-long-md.md)], you can instruct the compiler to embed type information from the interop assembly into your executable. The compiler embeds only the type information that your application uses. You do not have to deploy the interop assembly with your application. This is the recommended technique. -- Deploying interop assemblies: You can create a standard reference to the interop assembly. In this case, the interop assembly must be deployed with your application. If you employ this technique, and you are not using a private COM component, always reference the primary interop assembly (PIA) published by the author of the COM component you intend to incorporate in your managed code. For more information about producing and using primary interop assemblies, see [Primary Interop Assemblies](http://msdn.microsoft.com/library/b977a8be-59a0-40a0-a806-b11ffba5c080). +- Deploying interop assemblies: You can create a standard reference to the interop assembly. In this case, the interop assembly must be deployed with your application. If you employ this technique, and you are not using a private COM component, always reference the primary interop assembly (PIA) published by the author of the COM component you intend to incorporate in your managed code. For more information about producing and using primary interop assemblies, see [Primary Interop Assemblies](https://msdn.microsoft.com/en-us/library/b977a8be-59a0-40a0-a806-b11ffba5c080(v=vs.100)). When you use design-time-only interop assemblies, you can embed type information from the primary interop assembly published by the author of the COM component. However, you do not have to deploy the primary interop assembly with your application. @@ -72,17 +72,17 @@ COM type definitions usually reside in a type library. In contrast, CLS-complian - Knowledge of the type library-to-assembly conversion rules. - Writing a custom wrapper is an advanced technique. For additional information about how to generate a custom wrapper, see [Customizing Standard Wrappers](http://msdn.microsoft.com/library/c40d089b-6a3c-41b5-a20d-d760c215e49d). + Writing a custom wrapper is an advanced technique. For additional information about how to generate a custom wrapper, see [Customizing Standard Wrappers](https://msdn.microsoft.com/en-us/library/c40d089b-6a3c-41b5-a20d-d760c215e49d(v=vs.100)). - For more information about the COM interop import process, see [Type Library to Assembly Conversion Summary](http://msdn.microsoft.com/library/bf3f90c5-4770-4ab8-895c-3ba1055cc958). + For more information about the COM interop import process, see [Type Library to Assembly Conversion Summary](https://msdn.microsoft.com/en-us/library/bf3f90c5-4770-4ab8-895c-3ba1055cc958(v=vs.100)). ## See Also [Exposing COM Components to the .NET Framework](../../../docs/framework/interop/exposing-com-components.md) - [Type Library to Assembly Conversion Summary](http://msdn.microsoft.com/library/bf3f90c5-4770-4ab8-895c-3ba1055cc958) + [Type Library to Assembly Conversion Summary](https://msdn.microsoft.com/en-us/library/bf3f90c5-4770-4ab8-895c-3ba1055cc958(v=vs.100)) [Tlbimp.exe (Type Library Importer)](../../../docs/framework/tools/tlbimp-exe-type-library-importer.md) - [Customizing Standard Wrappers](http://msdn.microsoft.com/library/c40d089b-6a3c-41b5-a20d-d760c215e49d) - [Using COM Types in Managed Code](http://msdn.microsoft.com/library/1a95a8ca-c8b8-4464-90b0-5ee1a1135b66) + [Customizing Standard Wrappers](https://msdn.microsoft.com/en-us/library/c40d089b-6a3c-41b5-a20d-d760c215e49d(v=vs.100)) + [Using COM Types in Managed Code](https://msdn.microsoft.com/en-us/library/1a95a8ca-c8b8-4464-90b0-5ee1a1135b66(v=vs.100)) [Compiling an Interop Project](../../../docs/framework/interop/compiling-an-interop-project.md) [Deploying an Interop Application](../../../docs/framework/interop/deploying-an-interop-application.md) [How to: Add References to Type Libraries](../../../docs/framework/interop/how-to-add-references-to-type-libraries.md) diff --git a/docs/framework/interop/qualifying-net-types-for-interoperation.md b/docs/framework/interop/qualifying-net-types-for-interoperation.md index 7d9c7f8f048b7..8b7f9cb572fef 100644 --- a/docs/framework/interop/qualifying-net-types-for-interoperation.md +++ b/docs/framework/interop/qualifying-net-types-for-interoperation.md @@ -51,6 +51,6 @@ If you intend to expose types in an assembly to COM applications, consider the r ## See Also [Exposing .NET Framework Components to COM](../../../docs/framework/interop/exposing-dotnet-components-to-com.md) - [Introducing the Class Interface](http://msdn.microsoft.com/library/733c0dd2-12e5-46e6-8de1-39d5b25df024) + [Introducing the Class Interface](https://msdn.microsoft.com/en-us/library/733c0dd2-12e5-46e6-8de1-39d5b25df024(v=vs.100)) [Applying Interop Attributes](../../../docs/framework/interop/applying-interop-attributes.md) [Packaging an Assembly for COM](../../../docs/framework/interop/packaging-an-assembly-for-com.md) From 3905acb78614d1fb4b38a450cdc042baf624a1f5 Mon Sep 17 00:00:00 2001 From: Ron Petrusha Date: Thu, 8 Mar 2018 08:04:03 -0800 Subject: [PATCH 3/3] Removed 'en-us' from URLs --- .../interop/blittable-and-non-blittable-types.md | 12 ++++++------ .../interop/compiling-an-interop-project.md | 4 ++-- .../interop/deploying-an-interop-application.md | 4 ++-- docs/framework/interop/exposing-com-components.md | 2 +- .../interop/exposing-dotnet-components-to-com.md | 4 ++-- ...te-primary-interop-assemblies-using-tlbimp-exe.md | 2 +- .../how-to-register-primary-interop-assemblies.md | 6 +++--- .../importing-a-type-library-as-an-assembly.md | 12 ++++++------ .../qualifying-net-types-for-interoperation.md | 2 +- 9 files changed, 24 insertions(+), 24 deletions(-) diff --git a/docs/framework/interop/blittable-and-non-blittable-types.md b/docs/framework/interop/blittable-and-non-blittable-types.md index e5b866fa0b3bf..bee6c6f3b862f 100644 --- a/docs/framework/interop/blittable-and-non-blittable-types.md +++ b/docs/framework/interop/blittable-and-non-blittable-types.md @@ -55,7 +55,7 @@ Most data types have a common representation in both managed and unmanaged memor - One-dimensional arrays of blittable types, such as an array of integers. However, a type that contains a variable array of blittable types is not itself blittable. -- Formatted value types that contain only blittable types (and classes if they are marshaled as formatted types). For more information about formatted value types, see [Default Marshaling for Value Types](https://msdn.microsoft.com/en-us/library/4d9a876c-e05a-40ba-bd85-bd22877f984a(v=vs.100)). +- Formatted value types that contain only blittable types (and classes if they are marshaled as formatted types). For more information about formatted value types, see [Default Marshaling for Value Types](https://msdn.microsoft.com/library/4d9a876c-e05a-40ba-bd85-bd22877f984a(v=vs.100)). Object references are not blittable. This includes an array of references to objects that are blittable by themselves. For example, you can define a structure that is blittable, but you cannot define a blittable type that contains an array of references to those structures. @@ -63,18 +63,18 @@ Most data types have a common representation in both managed and unmanaged memor Some managed data types require a different representation in an unmanaged environment. These non-blittable data types must be converted into a form that can be marshaled. For example, managed strings are non-blittable types because they must be converted into string objects before they can be marshaled. - The following table lists non-blittable types from the namespace. [Delegates](https://msdn.microsoft.com/en-us/library/d176ee76-f982-494b-b03d-92e4118896e2(v=vs.100)), which are data structures that refer to a static method or to a class instance, are also non-blittable. + The following table lists non-blittable types from the namespace. [Delegates](https://msdn.microsoft.com/library/d176ee76-f982-494b-b03d-92e4118896e2(v=vs.100)), which are data structures that refer to a static method or to a class instance, are also non-blittable. |Non-blittable type|Description| |-------------------------|-----------------| |[System.Array](../../../docs/framework/interop/default-marshaling-for-arrays.md)|Converts to a C-style array or a `SAFEARRAY`.| -|[System.Boolean](https://msdn.microsoft.com/en-us/library/d4c00537-70f7-4ca6-8197-bfc1ec037ff9(v=vs.100))|Converts to a 1, 2, or 4-byte value with `true` as 1 or -1.| -|[System.Char](https://msdn.microsoft.com/en-us/library/cecc87c1-075e-4cde-aa56-33d189f66feb(v=vs.100))|Converts to a Unicode or ANSI character.| -|[System.Class](https://msdn.microsoft.com/en-us/library/fe334af5-0123-43d8-be84-26f6f023ddb6(v=vs.100))|Converts to a class interface.| +|[System.Boolean](https://msdn.microsoft.com/library/d4c00537-70f7-4ca6-8197-bfc1ec037ff9(v=vs.100))|Converts to a 1, 2, or 4-byte value with `true` as 1 or -1.| +|[System.Char](https://msdn.microsoft.com/library/cecc87c1-075e-4cde-aa56-33d189f66feb(v=vs.100))|Converts to a Unicode or ANSI character.| +|[System.Class](https://msdn.microsoft.com/library/fe334af5-0123-43d8-be84-26f6f023ddb6(v=vs.100))|Converts to a class interface.| |[System.Object](../../../docs/framework/interop/default-marshaling-for-objects.md)|Converts to a variant or an interface.| |[System.Mdarray](../../../docs/framework/interop/default-marshaling-for-arrays.md)|Converts to a C-style array or a `SAFEARRAY`.| |[System.String](../../../docs/framework/interop/default-marshaling-for-strings.md)|Converts to a string terminating in a null reference or to a BSTR.| -|[System.Valuetype](https://msdn.microsoft.com/en-us/library/4d9a876c-e05a-40ba-bd85-bd22877f984a(v=vs.100))|Converts to a structure with a fixed memory layout.| +|[System.Valuetype](https://msdn.microsoft.com/library/4d9a876c-e05a-40ba-bd85-bd22877f984a(v=vs.100))|Converts to a structure with a fixed memory layout.| |[System.Szarray](../../../docs/framework/interop/default-marshaling-for-arrays.md)|Converts to a C-style array or a `SAFEARRAY`.| Class and object types are supported only by COM interop. For corresponding types in [!INCLUDE[vbprvblong](../../../includes/vbprvblong-md.md)], C#, and C++, see the [Class Library Overview](../../../docs/standard/class-library-overview.md). diff --git a/docs/framework/interop/compiling-an-interop-project.md b/docs/framework/interop/compiling-an-interop-project.md index fc5575ea7ead5..680942d6929c1 100644 --- a/docs/framework/interop/compiling-an-interop-project.md +++ b/docs/framework/interop/compiling-an-interop-project.md @@ -33,7 +33,7 @@ COM interop projects that reference one or more assemblies containing imported C - Deploying interop assemblies: You can create a standard reference to an interop assembly. In this case, the interop assembly must be deployed with your application. - The differences between these two techniques are discussed in greater detail in [Using COM Types in Managed Code](https://msdn.microsoft.com/en-us/library/1a95a8ca-c8b8-4464-90b0-5ee1a1135b66(v=vs.100)). + The differences between these two techniques are discussed in greater detail in [Using COM Types in Managed Code](https://msdn.microsoft.com/library/1a95a8ca-c8b8-4464-90b0-5ee1a1135b66(v=vs.100)). Embedding interop types with Visual Studio is demonstrated in [Walkthrough: Embedding Type Information from Microsoft Office Assemblies](http://msdn.microsoft.com/library/85b55e05-bc5e-4665-b6ae-e1ada9299fd3) and [Walkthrough: Embedding Types from Managed Assemblies](http://msdn.microsoft.com/library/b28ec92c-1867-4847-95c0-61adfe095e21). @@ -47,7 +47,7 @@ COM interop projects that reference one or more assemblies containing imported C ## See Also [Exposing COM Components to the .NET Framework](../../../docs/framework/interop/exposing-com-components.md) [Language Independence and Language-Independent Components](../../../docs/standard/language-independence-and-language-independent-components.md) - [Using COM Types in Managed Code](https://msdn.microsoft.com/en-us/library/1a95a8ca-c8b8-4464-90b0-5ee1a1135b66(v=vs.100)) + [Using COM Types in Managed Code](https://msdn.microsoft.com/library/1a95a8ca-c8b8-4464-90b0-5ee1a1135b66(v=vs.100)) [Walkthrough: Embedding Type Information from Microsoft Office Assemblies](http://msdn.microsoft.com/library/85b55e05-bc5e-4665-b6ae-e1ada9299fd3) [Walkthrough: Embedding Types from Managed Assemblies](http://msdn.microsoft.com/library/b28ec92c-1867-4847-95c0-61adfe095e21) [Importing a Type Library as an Assembly](../../../docs/framework/interop/importing-a-type-library-as-an-assembly.md) diff --git a/docs/framework/interop/deploying-an-interop-application.md b/docs/framework/interop/deploying-an-interop-application.md index 570f0571d8a0b..425c3352ccef7 100644 --- a/docs/framework/interop/deploying-an-interop-application.md +++ b/docs/framework/interop/deploying-an-interop-application.md @@ -34,7 +34,7 @@ An interop application typically includes a .NET client assembly, one or more in - By using embedded interop types: Beginning with the [!INCLUDE[net_v40_long](../../../includes/net-v40-long-md.md)], you can instruct the compiler to embed type information from an interop assembly into your executable. The compiler embeds only the type information that your application uses. You do not have to deploy the interop assembly with your application. This is the recommended technique. -- By deploying interop assemblies: You can create a standard reference to an interop assembly. In this case, the interop assembly must be deployed with your application. If you employ this technique, and you are not using a private COM component, always reference the primary interop assembly (PIA) published by the author of the COM component you intend to incorporate in your managed code. For more information about producing and using primary interop assemblies, see [Primary Interop Assemblies](https://msdn.microsoft.com/en-us/library/b977a8be-59a0-40a0-a806-b11ffba5c080(v=vs.100)). +- By deploying interop assemblies: You can create a standard reference to an interop assembly. In this case, the interop assembly must be deployed with your application. If you employ this technique, and you are not using a private COM component, always reference the primary interop assembly (PIA) published by the author of the COM component you intend to incorporate in your managed code. For more information about producing and using primary interop assemblies, see [Primary Interop Assemblies](https://msdn.microsoft.com/library/b977a8be-59a0-40a0-a806-b11ffba5c080(v=vs.100)). If you use embedded interop types, deployment is simple and straightforward. There is nothing special you need to do. The rest of this article describes the scenarios for deploying interop assemblies with your application. @@ -55,5 +55,5 @@ Directory structure and registry entries for a private deployment ## See Also [Exposing COM Components to the .NET Framework](../../../docs/framework/interop/exposing-com-components.md) [Importing a Type Library as an Assembly](../../../docs/framework/interop/importing-a-type-library-as-an-assembly.md) - [Using COM Types in Managed Code](https://msdn.microsoft.com/en-us/library/1a95a8ca-c8b8-4464-90b0-5ee1a1135b66(v=vs.100)) + [Using COM Types in Managed Code](https://msdn.microsoft.com/library/1a95a8ca-c8b8-4464-90b0-5ee1a1135b66(v=vs.100)) [Compiling an Interop Project](../../../docs/framework/interop/compiling-an-interop-project.md) diff --git a/docs/framework/interop/exposing-com-components.md b/docs/framework/interop/exposing-com-components.md index c2f2959dcdadc..60d825dc6c060 100644 --- a/docs/framework/interop/exposing-com-components.md +++ b/docs/framework/interop/exposing-com-components.md @@ -32,7 +32,7 @@ This section summarizes the process needed to expose an existing COM component t The common language runtime requires metadata for all types, including COM types. There are several ways to obtain an assembly containing COM types imported as metadata. -2. [Create COM types in managed Code](https://msdn.microsoft.com/en-us/library/1a95a8ca-c8b8-4464-90b0-5ee1a1135b66(v=vs.100)). +2. [Create COM types in managed Code](https://msdn.microsoft.com/library/1a95a8ca-c8b8-4464-90b0-5ee1a1135b66(v=vs.100)). You can inspect COM types, activate instances, and invoke methods on the COM object the same way you do for any managed type. diff --git a/docs/framework/interop/exposing-dotnet-components-to-com.md b/docs/framework/interop/exposing-dotnet-components-to-com.md index ad28051e7bd36..56ffdde230dac 100644 --- a/docs/framework/interop/exposing-dotnet-components-to-com.md +++ b/docs/framework/interop/exposing-dotnet-components-to-com.md @@ -48,11 +48,11 @@ Writing a .NET type and consuming that type from unmanaged code are distinct act COM developers can reference types in an assembly using the same tools and techniques they use today. -3. [Call a .NET object](https://msdn.microsoft.com/en-us/library/40c9626c-aea6-4bad-b8f0-c1de462efd33(v=vs.100)). +3. [Call a .NET object](https://msdn.microsoft.com/library/40c9626c-aea6-4bad-b8f0-c1de462efd33(v=vs.100)). COM developers can call methods on the .NET object the same way they call methods on any unmanaged type. For example, the COM **CoCreateInstance** API activates .NET objects. -4. [Deploy an application for COM access](https://msdn.microsoft.com/en-us/library/fb63564c-c1b9-4655-a094-a235625882ce(v=vs.100)). +4. [Deploy an application for COM access](https://msdn.microsoft.com/library/fb63564c-c1b9-4655-a094-a235625882ce(v=vs.100)). A strong-named assembly can be installed in the global assembly cache and requires a signature from its publisher. Assemblies that are not strong named must be installed in the application directory of the client. diff --git a/docs/framework/interop/how-to-generate-primary-interop-assemblies-using-tlbimp-exe.md b/docs/framework/interop/how-to-generate-primary-interop-assemblies-using-tlbimp-exe.md index 484d4e5b16e2b..b84195e0e628d 100644 --- a/docs/framework/interop/how-to-generate-primary-interop-assemblies-using-tlbimp-exe.md +++ b/docs/framework/interop/how-to-generate-primary-interop-assemblies-using-tlbimp-exe.md @@ -52,7 +52,7 @@ There are two ways to generate a primary interop assembly: A dependent primary interop assembly with a version number that differs from that of the original type library is not discoverable when installed in the current directory. You must either register the dependent primary interop assembly in the Windows registry or use the **/reference** option to be sure that Tlbimp.exe finds the dependent DLL. - You can also wrap multiple versions of a type library. For instructions, see [How to: Wrap Multiple Versions of Type Libraries](https://msdn.microsoft.com/en-us/library/79eefe04-a770-4bc3-8ea2-e90ddb8ec31f(v=vs.100)). + You can also wrap multiple versions of a type library. For instructions, see [How to: Wrap Multiple Versions of Type Libraries](https://msdn.microsoft.com/library/79eefe04-a770-4bc3-8ea2-e90ddb8ec31f(v=vs.100)). ## Example The following example imports the COM type library `LibUtil.tlb` and signs the assembly `LibUtil.dll` with a strong name using the key file `CompanyA.snk`. By omitting a specific namespace name, this example produces the default namespace, `LibUtil`. diff --git a/docs/framework/interop/how-to-register-primary-interop-assemblies.md b/docs/framework/interop/how-to-register-primary-interop-assemblies.md index 3ea6af0fbe581..edc5d3da24117 100644 --- a/docs/framework/interop/how-to-register-primary-interop-assemblies.md +++ b/docs/framework/interop/how-to-register-primary-interop-assemblies.md @@ -55,6 +55,6 @@ regasm CompanyA.UtilLib.dll ``` ## See Also - [Programming with Primary Interop Assemblies](https://msdn.microsoft.com/en-us/library/306fa1d6-0703-4004-9e93-d0a57f1be81e(v=vs.100)) - [Locating Primary Interop Assemblies](https://msdn.microsoft.com/en-us/library/d6768e4b-cd80-414d-a4f8-05d979eb393b(v=vs.100)) - [Redistributing Primary Interop Assemblies](https://msdn.microsoft.com/en-us/library/e76384f0-d631-474c-bdbd-13884cba0265(v=vs.100)) + [Programming with Primary Interop Assemblies](https://msdn.microsoft.com/library/306fa1d6-0703-4004-9e93-d0a57f1be81e(v=vs.100)) + [Locating Primary Interop Assemblies](https://msdn.microsoft.com/library/d6768e4b-cd80-414d-a4f8-05d979eb393b(v=vs.100)) + [Redistributing Primary Interop Assemblies](https://msdn.microsoft.com/library/e76384f0-d631-474c-bdbd-13884cba0265(v=vs.100)) diff --git a/docs/framework/interop/importing-a-type-library-as-an-assembly.md b/docs/framework/interop/importing-a-type-library-as-an-assembly.md index adc4bc89db31e..de34b7a14b550 100644 --- a/docs/framework/interop/importing-a-type-library-as-an-assembly.md +++ b/docs/framework/interop/importing-a-type-library-as-an-assembly.md @@ -37,7 +37,7 @@ COM type definitions usually reside in a type library. In contrast, CLS-complian - Using design-time-only interop assemblies: Beginning with the [!INCLUDE[net_v40_long](../../../includes/net-v40-long-md.md)], you can instruct the compiler to embed type information from the interop assembly into your executable. The compiler embeds only the type information that your application uses. You do not have to deploy the interop assembly with your application. This is the recommended technique. -- Deploying interop assemblies: You can create a standard reference to the interop assembly. In this case, the interop assembly must be deployed with your application. If you employ this technique, and you are not using a private COM component, always reference the primary interop assembly (PIA) published by the author of the COM component you intend to incorporate in your managed code. For more information about producing and using primary interop assemblies, see [Primary Interop Assemblies](https://msdn.microsoft.com/en-us/library/b977a8be-59a0-40a0-a806-b11ffba5c080(v=vs.100)). +- Deploying interop assemblies: You can create a standard reference to the interop assembly. In this case, the interop assembly must be deployed with your application. If you employ this technique, and you are not using a private COM component, always reference the primary interop assembly (PIA) published by the author of the COM component you intend to incorporate in your managed code. For more information about producing and using primary interop assemblies, see [Primary Interop Assemblies](https://msdn.microsoft.com/library/b977a8be-59a0-40a0-a806-b11ffba5c080(v=vs.100)). When you use design-time-only interop assemblies, you can embed type information from the primary interop assembly published by the author of the COM component. However, you do not have to deploy the primary interop assembly with your application. @@ -72,17 +72,17 @@ COM type definitions usually reside in a type library. In contrast, CLS-complian - Knowledge of the type library-to-assembly conversion rules. - Writing a custom wrapper is an advanced technique. For additional information about how to generate a custom wrapper, see [Customizing Standard Wrappers](https://msdn.microsoft.com/en-us/library/c40d089b-6a3c-41b5-a20d-d760c215e49d(v=vs.100)). + Writing a custom wrapper is an advanced technique. For additional information about how to generate a custom wrapper, see [Customizing Standard Wrappers](https://msdn.microsoft.com/library/c40d089b-6a3c-41b5-a20d-d760c215e49d(v=vs.100)). - For more information about the COM interop import process, see [Type Library to Assembly Conversion Summary](https://msdn.microsoft.com/en-us/library/bf3f90c5-4770-4ab8-895c-3ba1055cc958(v=vs.100)). + For more information about the COM interop import process, see [Type Library to Assembly Conversion Summary](https://msdn.microsoft.com/library/bf3f90c5-4770-4ab8-895c-3ba1055cc958(v=vs.100)). ## See Also [Exposing COM Components to the .NET Framework](../../../docs/framework/interop/exposing-com-components.md) - [Type Library to Assembly Conversion Summary](https://msdn.microsoft.com/en-us/library/bf3f90c5-4770-4ab8-895c-3ba1055cc958(v=vs.100)) + [Type Library to Assembly Conversion Summary](https://msdn.microsoft.com/library/bf3f90c5-4770-4ab8-895c-3ba1055cc958(v=vs.100)) [Tlbimp.exe (Type Library Importer)](../../../docs/framework/tools/tlbimp-exe-type-library-importer.md) - [Customizing Standard Wrappers](https://msdn.microsoft.com/en-us/library/c40d089b-6a3c-41b5-a20d-d760c215e49d(v=vs.100)) - [Using COM Types in Managed Code](https://msdn.microsoft.com/en-us/library/1a95a8ca-c8b8-4464-90b0-5ee1a1135b66(v=vs.100)) + [Customizing Standard Wrappers](https://msdn.microsoft.com/library/c40d089b-6a3c-41b5-a20d-d760c215e49d(v=vs.100)) + [Using COM Types in Managed Code](https://msdn.microsoft.com/library/1a95a8ca-c8b8-4464-90b0-5ee1a1135b66(v=vs.100)) [Compiling an Interop Project](../../../docs/framework/interop/compiling-an-interop-project.md) [Deploying an Interop Application](../../../docs/framework/interop/deploying-an-interop-application.md) [How to: Add References to Type Libraries](../../../docs/framework/interop/how-to-add-references-to-type-libraries.md) diff --git a/docs/framework/interop/qualifying-net-types-for-interoperation.md b/docs/framework/interop/qualifying-net-types-for-interoperation.md index 8b7f9cb572fef..99190ddeb4816 100644 --- a/docs/framework/interop/qualifying-net-types-for-interoperation.md +++ b/docs/framework/interop/qualifying-net-types-for-interoperation.md @@ -51,6 +51,6 @@ If you intend to expose types in an assembly to COM applications, consider the r ## See Also [Exposing .NET Framework Components to COM](../../../docs/framework/interop/exposing-dotnet-components-to-com.md) - [Introducing the Class Interface](https://msdn.microsoft.com/en-us/library/733c0dd2-12e5-46e6-8de1-39d5b25df024(v=vs.100)) + [Introducing the Class Interface](https://msdn.microsoft.com/library/733c0dd2-12e5-46e6-8de1-39d5b25df024(v=vs.100)) [Applying Interop Attributes](../../../docs/framework/interop/applying-interop-attributes.md) [Packaging an Assembly for COM](../../../docs/framework/interop/packaging-an-assembly-for-com.md)