/
RuntimeEnvironment.xml
480 lines (459 loc) · 33.4 KB
/
RuntimeEnvironment.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
<Type Name="RuntimeEnvironment" FullName="System.Runtime.InteropServices.RuntimeEnvironment">
<TypeSignature Language="C#" Value="public static class RuntimeEnvironment" FrameworkAlternate="net-5.0;net-6.0;net-7.0;net-8.0;net-9.0;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;netstandard-2.0;netstandard-2.1" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit RuntimeEnvironment extends System.Object" FrameworkAlternate="net-5.0;net-6.0;net-7.0;net-8.0;net-9.0;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;netstandard-2.0;netstandard-2.1" />
<TypeSignature Language="DocId" Value="T:System.Runtime.InteropServices.RuntimeEnvironment" />
<TypeSignature Language="VB.NET" Value="Public Class RuntimeEnvironment" />
<TypeSignature Language="F#" Value="type RuntimeEnvironment = class" />
<TypeSignature Language="C++ CLI" Value="public ref class RuntimeEnvironment abstract sealed" FrameworkAlternate="net-5.0;net-6.0;net-7.0;net-8.0;net-9.0;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;netstandard-2.0;netstandard-2.1" />
<TypeSignature Language="C#" Value="public class RuntimeEnvironment" FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit RuntimeEnvironment extends System.Object" FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1" />
<TypeSignature Language="C++ CLI" Value="public ref class RuntimeEnvironment" FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1" />
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime.InteropServices</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<TypeForwardingChain>
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime.InteropServices" ToVersion="5.0.0.0" FrameworkAlternate="net-5.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime.InteropServices" ToVersion="6.0.0.0" FrameworkAlternate="net-6.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime.InteropServices" ToVersion="7.0.0.0" FrameworkAlternate="net-7.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime.InteropServices" ToVersion="8.0.0.0" FrameworkAlternate="net-8.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime.InteropServices" ToVersion="9.0.0.0" FrameworkAlternate="net-9.0" />
</TypeForwardingChain>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="net-8.0;net-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(0)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(0)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="net-8.0;net-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.NullableContext(1)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.NullableContext(1)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Runtime.InteropServices.ComVisible(true)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.InteropServices.ComVisible(true)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Provides a collection of <see langword="static" /> methods that return information about the common language runtime environment.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
This example shows how to call many of the methods defined by the <xref:System.Runtime.InteropServices.RuntimeEnvironment> class.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/RuntimeEnvironment/cpp/RuntimeEnvironment.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/RuntimeEnvironment/Overview/RuntimeEnvironment.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/RuntimeEnvironment/VB/RuntimeEnvironment.vb" id="Snippet1":::
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public RuntimeEnvironment ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.InteropServices.RuntimeEnvironment.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 RuntimeEnvironment();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime.InteropServices</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Obsolete("Do not create instances of the RuntimeEnvironment class. Call the static methods directly on this type instead", true)]</AttributeName>
<AttributeName Language="F#">[<System.Obsolete("Do not create instances of the RuntimeEnvironment class. Call the static methods directly on this type instead", true)>]</AttributeName>
</Attribute>
</Attributes>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Runtime.InteropServices.RuntimeEnvironment" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="FromGlobalAccessCache">
<MemberSignature Language="C#" Value="public static bool FromGlobalAccessCache (System.Reflection.Assembly a);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig bool FromGlobalAccessCache(class System.Reflection.Assembly a) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.InteropServices.RuntimeEnvironment.FromGlobalAccessCache(System.Reflection.Assembly)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function FromGlobalAccessCache (a As Assembly) As Boolean" />
<MemberSignature Language="F#" Value="static member FromGlobalAccessCache : System.Reflection.Assembly -> bool" Usage="System.Runtime.InteropServices.RuntimeEnvironment.FromGlobalAccessCache a" />
<MemberSignature Language="C++ CLI" Value="public:
 static bool FromGlobalAccessCache(System::Reflection::Assembly ^ a);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime.InteropServices</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="a" Type="System.Reflection.Assembly" />
</Parameters>
<Docs>
<param name="a">The assembly to test.</param>
<summary>Tests whether the specified assembly is loaded in the global assembly cache.</summary>
<returns>
<see langword="true" /> if the assembly is loaded in the global assembly cache; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example demonstrates calling the <xref:System.Runtime.InteropServices.RuntimeEnvironment.FromGlobalAccessCache%2A> method. This code example is part of a larger example provided for the <xref:System.Runtime.InteropServices.RuntimeEnvironment> class.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/RuntimeEnvironment/cpp/RuntimeEnvironment.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/RuntimeEnvironment/Overview/RuntimeEnvironment.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/RuntimeEnvironment/VB/RuntimeEnvironment.vb" id="Snippet2":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="GetRuntimeDirectory">
<MemberSignature Language="C#" Value="public static string GetRuntimeDirectory ();" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string GetRuntimeDirectory() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory" />
<MemberSignature Language="VB.NET" Value="Public Shared Function GetRuntimeDirectory () As String" />
<MemberSignature Language="F#" Value="static member GetRuntimeDirectory : unit -> string" Usage="System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory " />
<MemberSignature Language="C++ CLI" Value="public:
 static System::String ^ GetRuntimeDirectory();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime.InteropServices</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Security.SecuritySafeCritical]</AttributeName>
<AttributeName Language="F#">[<System.Security.SecuritySafeCritical>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns the directory where the common language runtime is installed.</summary>
<returns>A string that contains the path to the directory where the common language runtime is installed.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example demonstrates calling the <xref:System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory%2A> method. This code example is part of a larger example provided for the <xref:System.Runtime.InteropServices.RuntimeEnvironment> class.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/RuntimeEnvironment/cpp/RuntimeEnvironment.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/RuntimeEnvironment/Overview/RuntimeEnvironment.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/RuntimeEnvironment/VB/RuntimeEnvironment.vb" id="Snippet3":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="GetRuntimeInterfaceAsIntPtr">
<MemberSignature Language="C#" Value="public static IntPtr GetRuntimeInterfaceAsIntPtr (Guid clsid, Guid riid);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig native int GetRuntimeInterfaceAsIntPtr(valuetype System.Guid clsid, valuetype System.Guid riid) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeInterfaceAsIntPtr(System.Guid,System.Guid)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function GetRuntimeInterfaceAsIntPtr (clsid As Guid, riid As Guid) As IntPtr" />
<MemberSignature Language="F#" Value="static member GetRuntimeInterfaceAsIntPtr : Guid * Guid -> nativeint" Usage="System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeInterfaceAsIntPtr (clsid, riid)" />
<MemberSignature Language="C++ CLI" Value="public:
 static IntPtr GetRuntimeInterfaceAsIntPtr(Guid clsid, Guid riid);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime.InteropServices</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="net-6.0;net-7.0;net-8.0;net-9.0">
<AttributeName Language="C#">[System.Obsolete("RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are not supported and throw PlatformNotSupportedException.", DiagnosticId="SYSLIB0019", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]</AttributeName>
<AttributeName Language="F#">[<System.Obsolete("RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are not supported and throw PlatformNotSupportedException.", DiagnosticId="SYSLIB0019", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Runtime.InteropServices.ComVisible(false)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.InteropServices.ComVisible(false)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Security.SecurityCritical]</AttributeName>
<AttributeName Language="F#">[<System.Security.SecurityCritical>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.IntPtr</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="clsid" Type="System.Guid" Index="0" FrameworkAlternate="net-5.0;net-6.0;net-7.0;net-8.0;net-9.0;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;netstandard-2.0;netstandard-2.1" />
<Parameter Name="riid" Type="System.Guid" Index="1" FrameworkAlternate="net-5.0;net-6.0;net-7.0;net-8.0;net-9.0;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;netstandard-2.0;netstandard-2.1" />
</Parameters>
<Docs>
<param name="clsid">The identifier for the desired class.</param>
<param name="riid">The identifier for the desired interface.</param>
<summary>Returns the specified interface on the specified class.</summary>
<returns>An unmanaged pointer to the requested interface.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The following table shows the supported combinations for `clsid` and `riid`.
|`clsid`|`riid`|
|-------------|------------|
|CLSID_CorMetaDataDispenser|IID_IMetaDataDispenser, IID_IMetaDataDispenserEx|
|CLSID_CorMetaDataDispenserRuntime|IID_IMetaDataDispenser, IID_IMetaDataDispenserEx|
|CLSID_CorRuntimeHost|IID_CorRuntimeHost|
|CLSID_CLRRuntimeHost|IID_CLRRuntimeHost (not valid for the common language runtime that is provided by the .NET Framework 4), IID_CLRRuntimeHost3|
|CLSID_TypeNameFactory|IID_TypeNameFactory|
|CLSID_CLRStrongName|IID_CLRStrongName|
<xref:System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeInterfaceAsIntPtr%2A> is similar to the <xref:System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeInterfaceAsObject%2A> method.
]]></format>
</remarks>
<exception cref="T:System.Runtime.InteropServices.COMException">[IUnknown::QueryInterface](https://go.microsoft.com/fwlink/?LinkId=144867) failure.</exception>
<exception cref="T:System.PlatformNotSupportedException">.NET Core and .NET 5+ only: In all cases.</exception>
</Docs>
</Member>
<Member MemberName="GetRuntimeInterfaceAsObject">
<MemberSignature Language="C#" Value="public static object GetRuntimeInterfaceAsObject (Guid clsid, Guid riid);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig object GetRuntimeInterfaceAsObject(valuetype System.Guid clsid, valuetype System.Guid riid) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeInterfaceAsObject(System.Guid,System.Guid)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function GetRuntimeInterfaceAsObject (clsid As Guid, riid As Guid) As Object" />
<MemberSignature Language="F#" Value="static member GetRuntimeInterfaceAsObject : Guid * Guid -> obj" Usage="System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeInterfaceAsObject (clsid, riid)" />
<MemberSignature Language="C++ CLI" Value="public:
 static System::Object ^ GetRuntimeInterfaceAsObject(Guid clsid, Guid riid);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime.InteropServices</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="net-6.0;net-7.0;net-8.0;net-9.0">
<AttributeName Language="C#">[System.Obsolete("RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are not supported and throw PlatformNotSupportedException.", DiagnosticId="SYSLIB0019", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]</AttributeName>
<AttributeName Language="F#">[<System.Obsolete("RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are not supported and throw PlatformNotSupportedException.", DiagnosticId="SYSLIB0019", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Runtime.InteropServices.ComVisible(false)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.InteropServices.ComVisible(false)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Security.SecurityCritical]</AttributeName>
<AttributeName Language="F#">[<System.Security.SecurityCritical>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="clsid" Type="System.Guid" Index="0" FrameworkAlternate="net-5.0;net-6.0;net-7.0;net-8.0;net-9.0;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;netstandard-2.0;netstandard-2.1" />
<Parameter Name="riid" Type="System.Guid" Index="1" FrameworkAlternate="net-5.0;net-6.0;net-7.0;net-8.0;net-9.0;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;netstandard-2.0;netstandard-2.1" />
</Parameters>
<Docs>
<param name="clsid">The identifier for the desired class.</param>
<param name="riid">The identifier for the desired interface.</param>
<summary>Returns an instance of a type that represents a COM object by a pointer to its <see langword="IUnknown" /> interface.</summary>
<returns>An object that represents the specified unmanaged COM object.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeInterfaceAsObject%2A> is similar to the <xref:System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeInterfaceAsIntPtr%2A> method.
]]></format>
</remarks>
<exception cref="T:System.Runtime.InteropServices.COMException">[IUnknown::QueryInterface](https://go.microsoft.com/fwlink/?LinkId=144867) failure.</exception>
<exception cref="T:System.PlatformNotSupportedException">.NET Core and .NET 5+ only: In all cases.</exception>
</Docs>
</Member>
<Member MemberName="GetSystemVersion">
<MemberSignature Language="C#" Value="public static string GetSystemVersion ();" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string GetSystemVersion() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Runtime.InteropServices.RuntimeEnvironment.GetSystemVersion" />
<MemberSignature Language="VB.NET" Value="Public Shared Function GetSystemVersion () As String" />
<MemberSignature Language="F#" Value="static member GetSystemVersion : unit -> string" Usage="System.Runtime.InteropServices.RuntimeEnvironment.GetSystemVersion " />
<MemberSignature Language="C++ CLI" Value="public:
 static System::String ^ GetSystemVersion();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime.InteropServices</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Security.SecuritySafeCritical]</AttributeName>
<AttributeName Language="F#">[<System.Security.SecuritySafeCritical>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Gets the version number of the common language runtime that's running the current process.</summary>
<returns>A string containing the version number of the common language runtime.</returns>
<remarks>On .NET 8 and later versions, this method returns <c>v</c> concatenated with <see cref="P:System.Environment.Version" />, which is the version of the CLR. For example: <c>v8.0.0</c>.
On .NET 7 and earlier versions, this method returns <see cref="P:System.Reflection.Assembly.ImageRuntimeVersion" />, for example, <c>v4.0.30319</c>.
</remarks>
</Docs>
</Member>
<Member MemberName="SystemConfigurationFile">
<MemberSignature Language="C#" Value="public static string SystemConfigurationFile { get; }" />
<MemberSignature Language="ILAsm" Value=".property string SystemConfigurationFile" />
<MemberSignature Language="DocId" Value="P:System.Runtime.InteropServices.RuntimeEnvironment.SystemConfigurationFile" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly Property SystemConfigurationFile As String" />
<MemberSignature Language="F#" Value="static member SystemConfigurationFile : string" Usage="System.Runtime.InteropServices.RuntimeEnvironment.SystemConfigurationFile" />
<MemberSignature Language="C++ CLI" Value="public:
 static property System::String ^ SystemConfigurationFile { System::String ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime.InteropServices</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="net-6.0;net-7.0;net-8.0;net-9.0">
<AttributeName Language="C#">[System.Obsolete("RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are not supported and throw PlatformNotSupportedException.", DiagnosticId="SYSLIB0019", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]</AttributeName>
<AttributeName Language="F#">[<System.Obsolete("RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are not supported and throw PlatformNotSupportedException.", DiagnosticId="SYSLIB0019", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[get: System.Security.SecuritySafeCritical]</AttributeName>
<AttributeName Language="F#">[<get: System.Security.SecuritySafeCritical>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the path to the system configuration file.</summary>
<value>The path to the system configuration file.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates the <xref:System.Runtime.InteropServices.RuntimeEnvironment.SystemConfigurationFile%2A> property. This code example is part of a larger example provided for the <xref:System.Runtime.InteropServices.RuntimeEnvironment> class.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/RuntimeEnvironment/cpp/RuntimeEnvironment.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/RuntimeEnvironment/Overview/RuntimeEnvironment.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/RuntimeEnvironment/VB/RuntimeEnvironment.vb" id="Snippet5":::
]]></format>
</remarks>
<exception cref="T:System.PlatformNotSupportedException">.NET Core and .NET 5+ only: In all cases.</exception>
</Docs>
</Member>
</Members>
</Type>