WindowsPrincipalとは? わかりやすく解説

WindowsPrincipal クラス

コードによって Windows ユーザーの Windows グループ メンバシップを確認できるようにします。

名前空間: System.Security.Principal
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

<SerializableAttribute> _
<ComVisibleAttribute(True)> _
Public Class WindowsPrincipal
    Implements IPrincipal
Dim instance As WindowsPrincipal
[SerializableAttribute] 
[ComVisibleAttribute(true)] 
public class WindowsPrincipal : IPrincipal
[SerializableAttribute] 
[ComVisibleAttribute(true)] 
public ref class WindowsPrincipal : IPrincipal
/** @attribute SerializableAttribute() */ 
/** @attribute ComVisibleAttribute(true) */ 
public class WindowsPrincipal implements IPrincipal
SerializableAttribute 
ComVisibleAttribute(true) 
public class WindowsPrincipal implements IPrincipal
継承階層継承階層
System.Object
  System.Security.Principal.WindowsPrincipal
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
WindowsPrincipal メンバ
System.Security.Principal 名前空間

WindowsPrincipal コンストラクタ

WindowsIdentity オブジェクトを指定して、WindowsPrincipal クラスの新しいインスタンスを初期化します。

名前空間: System.Security.Principal
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Sub New ( _
    ntIdentity As WindowsIdentity _
)
Dim ntIdentity As WindowsIdentity

Dim instance As New WindowsPrincipal(ntIdentity)
public WindowsPrincipal (
    WindowsIdentity ntIdentity
)
public:
WindowsPrincipal (
    WindowsIdentity^ ntIdentity
)
public WindowsPrincipal (
    WindowsIdentity ntIdentity
)
public function WindowsPrincipal (
    ntIdentity : WindowsIdentity
)

パラメータ

ntIdentity

WindowsPrincipal の新しいインスタンスの生成元となる WindowsIdentity オブジェクト。

例外例外
例外の種類条件

ArgumentNullException

ntIdentity が null 参照 (Visual Basic では Nothing) です。

使用例使用例

現在の WindowsIdentity オブジェクトから新しい WindowsPrincipal オブジェクトを作成する例を次に示します。

Dim wi As WindowsIdentity = WindowsIdentity.GetCurrent()
Dim wp As New WindowsPrincipal(wi)        

WindowsIdentity wi = WindowsIdentity.GetCurrent();
WindowsPrincipal wp = new WindowsPrincipal(wi);

WindowsIdentity^ wi = WindowsIdentity::GetCurrent();
WindowsPrincipal^ wp = gcnew WindowsPrincipal( wi );
WindowsIdentity wi = WindowsIdentity.GetCurrent();
WindowsPrincipal wp = new WindowsPrincipal(wi);
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
WindowsPrincipal クラス
WindowsPrincipal メンバ
System.Security.Principal 名前空間

WindowsPrincipal プロパティ


パブリック プロパティパブリック プロパティ

参照参照

関連項目

WindowsPrincipal クラス
System.Security.Principal 名前空間

WindowsPrincipal メソッド


パブリック メソッドパブリック メソッド

プロテクト メソッドプロテクト メソッド
参照参照

関連項目

WindowsPrincipal クラス
System.Security.Principal 名前空間

WindowsPrincipal メンバ

コードによって Windows ユーザーの Windows グループ メンバシップを確認できるようにします。

WindowsPrincipal データ型で公開されるメンバを以下の表に示します。


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド WindowsPrincipal WindowsIdentity オブジェクトを指定して、WindowsPrincipal クラスの新しいインスタンスを初期化します。
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

WindowsPrincipal クラス
System.Security.Principal 名前空間



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「WindowsPrincipal」の関連用語

WindowsPrincipalのお隣キーワード

   

英語⇒日本語
日本語⇒英語
   



WindowsPrincipalのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS