Skip to content

Commit b9f0e6f

Browse files
committed
resets for hosting
1 parent 6bc9ea2 commit b9f0e6f

File tree

10 files changed

+650
-650
lines changed

10 files changed

+650
-650
lines changed

docs/core/unmanaged-api/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ This section includes information on unmanaged APIs that can be used by managed-
99

1010
These articles describe APIs that were introduced in .NET Core 2.0 and later versions, or APIs that can be used with both .NET Framework and .NET. For .NET Framework-specific unmanaged APIs, see [.NET Framework unmanaged API reference](../../framework/unmanaged-api/index.md).
1111

12-
## In This Section
12+
## In this section
1313

14-
[Debugging](./debugging/index.md)
14+
[Debugging](./debugging/index.md)\
1515
Describes the debugging API, which enables a debugger to debug code that runs in the common language runtime (CLR) environment.
1616

17-
[Hosting](./hosting/index.md)
17+
[Hosting](./hosting/index.md)\
1818
Describes the hosting API, which enables unmanaged hosts to integrate the CLR into their applications.
1919

20-
[Metadata](./metadata/index.md)
20+
[Metadata](./metadata/index.md)\
2121
Describes the metadata API, which enables a client such as a compiler to generate or access a component's metadata without the types being loaded by the CLR.
2222

23-
[Profiling](./profiling/index.md)
23+
[Profiling](./profiling/index.md)\
2424
Describes the profiling API, which enables a profiler to monitor a program's execution by the CLR.

docs/framework/unmanaged-api/index.md

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,46 +15,43 @@ This section includes information on unmanaged APIs that can be used by managed-
1515

1616
For unmanaged APIs that can be used with both .NET Framework and .NET, see [.NET unmanaged API reference](../../core/unmanaged-api/index.md).
1717

18-
## In This Section
18+
## In this section
1919

20-
[Common Data Types](common-data-types-unmanaged-api-reference.md)
20+
[Common Data Types](common-data-types-unmanaged-api-reference.md)\
2121
Lists the common data types that are used, particularly in the unmanaged profiling and debugging APIs.
2222

23-
[ALink](./alink/index.md)
23+
[ALink](./alink/index.md)\
2424
Describes the ALink API, which supports the creation of .NET Framework assemblies and unbound modules.
2525

26-
[Authenticode](./authenticode/index.md)
26+
[Authenticode](./authenticode/index.md)\
2727
Supports the Authenticode XrML license creation and verification module.
2828

29-
[Constants](constants-unmanaged-api-reference.md)
29+
[Constants](constants-unmanaged-api-reference.md)\
3030
Describes the constants that are defined in CorSym.idl.
3131

32-
[Custom Interface Attributes](/previous-versions/dotnet/netframework-4.0/ms231946(v=vs.100))
32+
[Custom Interface Attributes](/previous-versions/dotnet/netframework-4.0/ms231946(v=vs.100))\
3333
Describes component object model (COM) custom interface attributes.
3434

35-
[Debugging](./debugging/index.md)
35+
[Debugging](./debugging/index.md)\
3636
Describes the debugging API, which enables a debugger to debug code that runs in the common language runtime (CLR) environment.
3737

38-
[Diagnostics Symbol Store](./diagnostics/index.md)
38+
[Diagnostics Symbol Store](./diagnostics/index.md)\
3939
Describes the diagnostics symbol store API, which enables a compiler to generate symbol information for use by a debugger.
4040

41-
[Fusion](./fusion/index.md)
41+
[Fusion](./fusion/index.md)\
4242
Describes the fusion API, which enables a runtime host to access the properties of an application's resources in order to locate the correct versions of those resources for the application.
4343

44-
[Hosting](../../core/unmanaged-api/hosting/index.md)
45-
For hosting APIs that can be used with both .NET Framework and .NET, see the .NET unmanaged API reference.
44+
[Hosting](./hosting/index.md)\
45+
Describes the hosting API, which enables unmanaged hosts to integrate the CLR into their applications.
4646

47-
[Metadata](../../core/unmanaged-api/metadata/index.md)
48-
For metadata APIs that can be used with both .NET Framework and .NET, see the .NET unmanaged API reference.
49-
50-
[Profiling](./profiling/index.md)
47+
[Profiling](./profiling/index.md)\
5148
Describes the profiling API, which enables a profiler to monitor a program's execution by the CLR.
5249

53-
[Strong Naming](./strong-naming/index.md)
50+
[Strong Naming](./strong-naming/index.md)\
5451
Describes the strong naming API, which enables a client to administer strong name signing for assemblies.
5552

56-
[WMI and Performance Counters](wmi/index.md)
53+
[WMI and Performance Counters](wmi/index.md)\
5754
Describes the APIs that wrap calls to Windows Management Instrumentation (WMI) libraries.
5855

59-
[Tlbexp Helper Functions](./tlbexp/index.md)
56+
[Tlbexp Helper Functions](./tlbexp/index.md)\
6057
Describes the two helper functions and interface used by the Type Library Exporter (Tlbexp.exe) during the assembly-to-type-library conversion process.

docs/framework/unmanaged-api/toc.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
items:
2-
32
- name: .NET Framework unmanaged API reference
43
href: index.md
54
- name: Common data types
@@ -37,6 +36,8 @@ items:
3736
href: diagnostics/
3837
- name: Fusion
3938
href: fusion/
39+
- name: Hosting
40+
href: hosting/
4041
- name: Profiling
4142
href: profiling/
4243
- name: Strong naming

docs/framework/wcf/migrating-from-net-remoting-to-wcf.md

Lines changed: 614 additions & 614 deletions
Large diffs are not rendered by default.

docs/fundamentals/runtime-libraries/system-threading-thread.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ You can retrieve a number of property values that provide information about a th
124124
- A thread ID. The value of the read-only <xref:System.Threading.Thread.ManagedThreadId> property is assigned by the runtime and uniquely identifies a thread within its process.
125125

126126
> [!NOTE]
127-
> An operating-system [ThreadId](/windows/win32/api/processthreadsapi/nf-processthreadsapi-getthreadid) has no fixed relationship to a managed thread, because an unmanaged host can control the relationship between managed and unmanaged threads. Specifically, a sophisticated host can use the [CLR Hosting API](../../core/unmanaged-api/hosting/index.md) to schedule many managed threads against the same operating system thread, or to move a managed thread between different operating system threads.
127+
> An operating-system [ThreadId](/windows/win32/api/processthreadsapi/nf-processthreadsapi-getthreadid) has no fixed relationship to a managed thread, because an unmanaged host can control the relationship between managed and unmanaged threads. Specifically, a sophisticated host can use the [CLR Hosting API](../../framework/unmanaged-api/hosting/index.md) to schedule many managed threads against the same operating system thread, or to move a managed thread between different operating system threads.
128128

129129
- The thread's current state. For the duration of its existence, a thread is always in one or more of the states defined by the <xref:System.Threading.ThreadState> property.
130130

docs/navigate/tools-diagnostics/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,8 @@ items:
571571
href: ../../core/diagnostics/debug-stackoverflow.md
572572
- name: Unmanaged API reference
573573
items:
574+
- name: Overview
575+
href: ../../core/unmanaged-api/index.md
574576
- name: Debugging
575577
items:
576578
- name: Overview

docs/standard/garbage-collection/app-domain-resource-monitoring.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ As soon as ARM is enabled, it begins collecting data on all application domains
2525

2626
- You can enable ARM at CLR startup by adding the [\<appDomainResourceMonitoring>](../../framework/configure-apps/file-schema/runtime/appdomainresourcemonitoring-element.md) element to the configuration file, and setting the `enabled` attribute to `true`. A value of `false` (the default) means only that ARM is not enabled at startup; you can activate it later by using one of the other activation mechanisms.
2727

28-
- The host can enable ARM by requesting the [ICLRAppDomainResourceMonitor](../../core/unmanaged-api/hosting/iclrappdomainresourcemonitor-interface.md) hosting interface. Once this interface is successfully obtained, ARM is enabled.
28+
- The host can enable ARM by requesting the [ICLRAppDomainResourceMonitor](../../framework/unmanaged-api/hosting/iclrappdomainresourcemonitor-interface.md) hosting interface. Once this interface is successfully obtained, ARM is enabled.
2929

3030
- Managed code can enable ARM by setting the static (`Shared` in Visual Basic) <xref:System.AppDomain.MonitoringIsEnabled%2A?displayProperty=nameWithType> property to `true`. As soon as the property is set, ARM is enabled.
3131

@@ -39,31 +39,31 @@ ARM provides the total processor time that is used by an application domain and
3939

4040
- Managed API: <xref:System.AppDomain.MonitoringTotalProcessorTime%2A?displayProperty=nameWithType> property.
4141

42-
- Hosting API: [ICLRAppDomainResourceMonitor::GetCurrentCpuTime](../../core/unmanaged-api/hosting/iclrappdomainresourcemonitor-getcurrentcputime-method.md) method.
42+
- Hosting API: [ICLRAppDomainResourceMonitor::GetCurrentCpuTime](../../framework/unmanaged-api/hosting/iclrappdomainresourcemonitor-getcurrentcputime-method.md) method.
4343

4444
- ETW events: `ThreadCreated`, `ThreadAppDomainEnter`, and `ThreadTerminated` events. For information about providers and keywords, see "AppDomain Resource Monitoring Events" in [CLR ETW Events](../../framework/performance/clr-etw-events.md).
4545

4646
- **Total managed allocations made by an application domain during its lifetime, in bytes**: Total allocations do not always reflect memory use by an application domain, because the allocated objects might be short-lived. However, if an application allocates and frees huge numbers of objects, the cost of the allocations could be significant.
4747

4848
- Managed API: <xref:System.AppDomain.MonitoringTotalAllocatedMemorySize%2A?displayProperty=nameWithType> property.
4949

50-
- Hosting API: [ICLRAppDomainResourceMonitor::GetCurrentAllocated](../../core/unmanaged-api/hosting/iclrappdomainresourcemonitor-getcurrentallocated-method.md) method.
50+
- Hosting API: [ICLRAppDomainResourceMonitor::GetCurrentAllocated](../../framework/unmanaged-api/hosting/iclrappdomainresourcemonitor-getcurrentallocated-method.md) method.
5151

5252
- ETW events: `AppDomainMemAllocated` event, `Allocated` field.
5353

5454
- **Managed memory, in bytes, that is referenced by an application domain and that survived the most recent full, blocking collection**: This number is accurate only after a full, blocking collection. (This is in contrast to concurrent collections, which occur in the background and do not block the application.) For example, the <xref:System.GC.Collect?displayProperty=nameWithType> method overload causes a full, blocking collection.
5555

5656
- Managed API: <xref:System.AppDomain.MonitoringSurvivedMemorySize%2A?displayProperty=nameWithType> property.
5757

58-
- Hosting API: [ICLRAppDomainResourceMonitor::GetCurrentSurvived](../../core/unmanaged-api/hosting/iclrappdomainresourcemonitor-getcurrentsurvived-method.md) method, `pAppDomainBytesSurvived` parameter.
58+
- Hosting API: [ICLRAppDomainResourceMonitor::GetCurrentSurvived](../../framework/unmanaged-api/hosting/iclrappdomainresourcemonitor-getcurrentsurvived-method.md) method, `pAppDomainBytesSurvived` parameter.
5959

6060
- ETW events: `AppDomainMemSurvived` event, `Survived` field.
6161

6262
- **Total managed memory, in bytes, that is referenced by the process and that survived the most recent full, blocking collection**: The survived memory for individual application domains can be compared to this number.
6363

6464
- Managed API: <xref:System.AppDomain.MonitoringSurvivedProcessMemorySize%2A?displayProperty=nameWithType> property.
6565

66-
- Hosting API: [ICLRAppDomainResourceMonitor::GetCurrentSurvived](../../core/unmanaged-api/hosting/iclrappdomainresourcemonitor-getcurrentsurvived-method.md) method, `pTotalBytesSurvived` parameter.
66+
- Hosting API: [ICLRAppDomainResourceMonitor::GetCurrentSurvived](../../framework/unmanaged-api/hosting/iclrappdomainresourcemonitor-getcurrentsurvived-method.md) method, `pTotalBytesSurvived` parameter.
6767

6868
- ETW events: `AppDomainMemSurvived` event, `ProcessSurvived` field.
6969

@@ -79,11 +79,11 @@ Alternatively, you can call the <xref:System.GC.CollectionCount%2A?displayProper
7979

8080
#### Hosting API
8181

82-
If you use the unmanaged hosting API, your host must pass the CLR an implementation of the [IHostGCManager](../../core/unmanaged-api/hosting/ihostgcmanager-interface.md) interface. The CLR calls the [IHostGCManager::SuspensionEnding](../../core/unmanaged-api/hosting/ihostgcmanager-suspensionending-method.md) method when it resumes execution of threads that have been suspended while a collection occurs. The CLR passes the generation of the completed collection as a parameter of the method, so the host can determine whether the collection was full or partial. Your implementation of the [IHostGCManager::SuspensionEnding](../../core/unmanaged-api/hosting/ihostgcmanager-suspensionending-method.md) method can query for survived memory, to ensure that the counts are retrieved as soon as they are updated.
82+
If you use the unmanaged hosting API, your host must pass the CLR an implementation of the [IHostGCManager](../../framework/unmanaged-api/hosting/ihostgcmanager-interface.md) interface. The CLR calls the [IHostGCManager::SuspensionEnding](../../framework/unmanaged-api/hosting/ihostgcmanager-suspensionending-method.md) method when it resumes execution of threads that have been suspended while a collection occurs. The CLR passes the generation of the completed collection as a parameter of the method, so the host can determine whether the collection was full or partial. Your implementation of the [IHostGCManager::SuspensionEnding](../../framework/unmanaged-api/hosting/ihostgcmanager-suspensionending-method.md) method can query for survived memory, to ensure that the counts are retrieved as soon as they are updated.
8383

8484
## See also
8585

8686
- <xref:System.AppDomain.MonitoringIsEnabled%2A?displayProperty=nameWithType>
87-
- [ICLRAppDomainResourceMonitor Interface](../../core/unmanaged-api/hosting/iclrappdomainresourcemonitor-interface.md)
87+
- [ICLRAppDomainResourceMonitor Interface](../../framework/unmanaged-api/hosting/iclrappdomainresourcemonitor-interface.md)
8888
- [\<appDomainResourceMonitoring>](../../framework/configure-apps/file-schema/runtime/appdomainresourcemonitoring-element.md)
8989
- [CLR ETW Events](../../framework/performance/clr-etw-events.md)

docs/standard/garbage-collection/performance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ If fragmentation of virtual memory is preventing the garbage collector from addi
117117
- Holding too many references to COM objects when interoperating with unmanaged code.
118118
- Creation of large transient objects, which causes the large object heap to allocate and free heap segments frequently.
119119

120-
When hosting the CLR, an application can request that the garbage collector retain its segments. This reduces the frequency of segment allocations. This is accomplished by using the STARTUP_HOARD_GC_VM flag in the [STARTUP_FLAGS Enumeration](../../core/unmanaged-api/hosting/startup-flags-enumeration.md).
120+
When hosting the CLR, an application can request that the garbage collector retain its segments. This reduces the frequency of segment allocations. This is accomplished by using the STARTUP_HOARD_GC_VM flag in the [STARTUP_FLAGS Enumeration](../../framework/unmanaged-api/hosting/startup-flags-enumeration.md).
121121

122122
|Performance checks|
123123
|------------------------|

docs/standard/threading/exceptions-in-managed-threads.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ If these exceptions are unhandled in the main thread, or in threads that entered
3434

3535
## Host override
3636

37-
An unmanaged host can use the [ICLRPolicyManager](../../core/unmanaged-api/hosting/iclrpolicymanager-interface.md) interface in the Hosting API to override the default unhandled exception policy of the common language runtime. The [ICLRPolicyManager::SetUnhandledExceptionPolicy](../../core/unmanaged-api/hosting/iclrpolicymanager-setunhandledexceptionpolicy-method.md) function is used to set the policy for unhandled exceptions.
37+
An unmanaged host can use the [ICLRPolicyManager](../../framework/unmanaged-api/hosting/iclrpolicymanager-interface.md) interface in the Hosting API to override the default unhandled exception policy of the common language runtime. The [ICLRPolicyManager::SetUnhandledExceptionPolicy](../../framework/unmanaged-api/hosting/iclrpolicymanager-setunhandledexceptionpolicy-method.md) function is used to set the policy for unhandled exceptions.
3838

3939
## See also
4040

docs/standard/threading/the-managed-thread-pool.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The number of operations that can be queued to the thread pool is limited only b
3838
You can control the maximum number of threads by using the <xref:System.Threading.ThreadPool.GetMaxThreads%2A?displayProperty=nameWithType> and <xref:System.Threading.ThreadPool.SetMaxThreads%2A?displayProperty=nameWithType> methods.
3939

4040
> [!NOTE]
41-
> Code that hosts the common language runtime can set the size using the [`ICorThreadpool::CorSetMaxThreads`](../../core/unmanaged-api/hosting/icorthreadpool-corsetmaxthreads-method.md) method.
41+
> Code that hosts the common language runtime can set the size using the [`ICorThreadpool::CorSetMaxThreads`](../../framework/unmanaged-api/hosting/icorthreadpool-corsetmaxthreads-method.md) method.
4242
4343
### Thread pool minimums
4444

@@ -56,7 +56,7 @@ When a minimum is reached, the thread pool can create additional threads or wait
5656

5757
The easiest way to use the thread pool is to use the [Task Parallel Library (TPL)](../parallel-programming/task-parallel-library-tpl.md). By default, TPL types like <xref:System.Threading.Tasks.Task> and <xref:System.Threading.Tasks.Task%601> use thread pool threads to run tasks.
5858

59-
You can also use the thread pool by calling <xref:System.Threading.ThreadPool.QueueUserWorkItem%2A?displayProperty=nameWithType> from managed code (or [`ICorThreadpool::CorQueueUserWorkItem`](../../core/unmanaged-api/hosting/icorthreadpool-corqueueuserworkitem-method.md) from unmanaged code) and passing a <xref:System.Threading.WaitCallback?displayProperty=nameWithType> delegate representing the method that performs the task.
59+
You can also use the thread pool by calling <xref:System.Threading.ThreadPool.QueueUserWorkItem%2A?displayProperty=nameWithType> from managed code (or [`ICorThreadpool::CorQueueUserWorkItem`](../../framework/unmanaged-api/hosting/icorthreadpool-corqueueuserworkitem-method.md) from unmanaged code) and passing a <xref:System.Threading.WaitCallback?displayProperty=nameWithType> delegate representing the method that performs the task.
6060

6161
Another way to use the thread pool is to queue work items that are related to a wait operation by using the <xref:System.Threading.ThreadPool.RegisterWaitForSingleObject%2A?displayProperty=nameWithType> method and passing a <xref:System.Threading.WaitHandle?displayProperty=nameWithType> that, when signaled or when timed out, calls the method represented by the <xref:System.Threading.WaitOrTimerCallback?displayProperty=nameWithType> delegate. Thread pool threads are used to invoke callback methods.
6262

0 commit comments

Comments
 (0)