IHostCrst Interface

Serves as the host's representation of a critical section for threading.

interface IHostCrst : IUnknown {
    HRESULT Enter (
        [in]  DWORD option
    );
    HRESULT Leave ();
    HRESULT SetSpinCount (
        [in]  DWORD dwSpinCount
    );
    HRESULT TryEnter (
        [in]  DWORD option,
        [out] BOOL  *pbSucceeded
    );
};

Method

Description

IHostCrst::Enter Method

Enters the critical section.

IHostCrst::Leave Method

Leaves the critical section.

IHostCrst::SetSpinCount Method

Sets the spin count for the critical section.

IHostCrst::TryEnter Method

Attempts to enter the critical section, and reports success or failure immediately.

IHostCrst allows the common language runtime (CLR) to communicate directly with the host's representation of a critical section, rather than using Win32 functions such as EnterCriticalSection or LeaveCriticalSection.

Platforms: See .NET Framework System Requirements.

Header: MSCorEE.idl

Library: Included as a resource in MSCorEE.dll

.NET Framework Versions: 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft