This project has moved. For the latest updates, please go here.

Security.Principal.SafeTokenHandle


SafeHandle class for a Win32 HANDLE representing a windows token. This class can be used instead of the raw IntPtr returned from System.Security.Principal.WindowsIdentity.Token in order to prevent the WindowsIdentity object from closing out the hande from underneath you if it is garbage collected before your use of the handle is complete.

A SafeTokenHandle for a WindowsIdentity can be obtained by calling the System.Security.Principal.WindowsIdentity.GetSafeTokenHandle() extension method.

Last edited Jun 3, 2009 at 8:30 PM by shawnfa, version 2

Comments

No comments yet.