CngKey.ParentWindowHandle CngKey.ParentWindowHandle CngKey.ParentWindowHandle CngKey.ParentWindowHandle Property

Definition

Gets or sets the window handle (HWND) that should be used for user interface (UI) prompts caused by accessing the key.

public:
 property IntPtr ParentWindowHandle { IntPtr get(); void set(IntPtr value); };
[get: System.Security.SecurityCritical]
[set: System.Security.SecurityCritical]
public IntPtr ParentWindowHandle { get; set; }
member this.ParentWindowHandle : nativeint with get, set
Public Property ParentWindowHandle As IntPtr

Property Value

The parent window handle for the key.

Remarks

The parent window handle for the key is used in UI prompts, such as smart card PIN prompts. This value is not persisted with persisted keys.

We recommend that you always set this property for keys that display a user interface. Do not use the default value of null for such keys.

Security

SecurityPermission
for permission to call unmanaged code. Demand value: LinkDemand. Associated enumeration: UnmanagedCode

Applies to