Share via


WindowsIdentity.GetCurrent メソッド

現在の Windows ユーザーを表す WindowsIdentity オブジェクトを返します。

Public Shared Function GetCurrent() As WindowsIdentity
[C#]
public static WindowsIdentity GetCurrent();
[C++]
public: static WindowsIdentity* GetCurrent();
[JScript]
public static function GetCurrent() : WindowsIdentity;

戻り値

現在のユーザーを表す WindowsIdentity オブジェクト。

例外

例外の種類 条件
SecurityException 呼び出し元に、正しいアクセス許可がありません。要件のセクションを参照してください。

必要条件

プラットフォーム: Windows NT Server 4.0, Windows NT Workstation 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

.NET Framework セキュリティ:

参照

WindowsIdentity クラス | WindowsIdentity メンバ | System.Security.Principal 名前空間