Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Marshal::GetThreadFromFiberCookie Method (Int32)

 
Note: This API is now obsolete.

Converts a fiber cookie into the corresponding System.Threading::Thread instance.

Namespace:   System.Runtime.InteropServices
Assembly:  mscorlib (in mscorlib.dll)

public:
[SecurityCriticalAttribute]
[ObsoleteAttribute("The GetThreadFromFiberCookie method has been deprecated.  Use the hosting API to perform this operation.", 
	false)]
static Thread^ GetThreadFromFiberCookie(
	int cookie
)

Parameters

cookie
Type: System::Int32

An integer that represents a fiber cookie.

Return Value

Type: System.Threading::Thread^

A thread that corresponds to the cookie parameter.

Exception Condition
ArgumentException

The cookie parameter is 0.

Fiber cookies are opaque tokens that are used by the host when alerting the common language runtime to its fiber-scheduling decisions. They consist of a stack and register context.

SecurityCriticalAttribute

requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft