ThreadNetworkContext Class

Definition

Note

Windows Information Protection (WIP) policy cannot be applied on Windows 10, version 1511 (build 10586) or earlier.

A protected network context for an enterprise identity. The creation of the context tags all network connections made thereafter on the current thread with the identity, and allows access to enterprise resources that are access controlled by the enterprise's policy.

Note

Although is attributed as being agile, Close (or ) must be called on the originating thread in order to avoid an exception.

public ref class ThreadNetworkContext sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Security.EnterpriseData.EnterpriseDataContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class ThreadNetworkContext final : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Security.EnterpriseData.EnterpriseDataContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class ThreadNetworkContext : System.IDisposable
Public NotInheritable Class ThreadNetworkContext
Implements IDisposable
Inheritance
ThreadNetworkContext
Attributes
Implements

Windows requirements

Device family
Windows Desktop Extension SDK (introduced in 10.0.10240.0)
Windows Mobile Extension SDK (introduced in 10.0.10240.0)
API contract
Windows.Security.EnterpriseData.EnterpriseDataContract (introduced in v1.0)

Methods

Close()

Note

Windows Information Protection (WIP) policy cannot be applied on Windows 10, version 1511 (build 10586) or earlier.

Closes the protected network context. To avoid race conditions against other tasks, the app must call Close after access to the protected resource is initiated.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Applies to

See also