Export (0) Print
Expand All

KeyContainerPermissionAccessEntry Constructor (String, String, Int32, String, Int32, KeyContainerPermissionFlags)

Note: This constructor is new in the .NET Framework version 2.0.

Initializes a new instance of the KeyContainerPermissionAccessEntry class with the specified property values.

Namespace: System.Security.Permissions
Assembly: mscorlib (in mscorlib.dll)

public KeyContainerPermissionAccessEntry (
	string keyStore,
	string providerName,
	int providerType,
	string keyContainerName,
	int keySpec,
	KeyContainerPermissionFlags flags
)
public KeyContainerPermissionAccessEntry (
	String keyStore, 
	String providerName, 
	int providerType, 
	String keyContainerName, 
	int keySpec, 
	KeyContainerPermissionFlags flags
)
public function KeyContainerPermissionAccessEntry (
	keyStore : String, 
	providerName : String, 
	providerType : int, 
	keyContainerName : String, 
	keySpec : int, 
	flags : KeyContainerPermissionFlags
)

Parameters

keyStore

The name of the key store.

providerName

The name of the provider.

providerType

The type code for the provider. See the ProviderType property for values.

keyContainerName

The name of the key container.

keySpec

The key specification. See the KeySpec property for values.

flags

A bitwise combination of the KeyContainerPermissionFlags values.

Exception typeCondition

ArgumentException

The resulting entry would have unrestricted access.

This constructor allows access rights to be assigned for specific key containers. A keySpec or providerType value of –1 represents all key specifications or provider types. A keyStore, providerName, or keyContainerName of "*" represents all key stores, providers, or key containers. A providerName or keyContainerName that is a null reference (Nothing in Visual Basic) represents all providers or key containers.

The following code example shows the use of the KeyContainerPermissionAccessEntry(String,String,Int32,String,Int32,KeyContainerPermissionFlags) constructor. This code example is part of a larger example provided for the KeyContainerPermission class.

private static KeyContainerPermissionAccessEntry 
    keyContainerPermAccEntry3 = new KeyContainerPermissionAccessEntry(
    "Machine", providerName, providerType, myKeyContainerName, 1, 
    KeyContainerPermissionFlags.Open);

private static KeyContainerPermissionAccessEntry keyContainerPermAccEntry3 = 
    new KeyContainerPermissionAccessEntry("Machine", providerName, 
        providerType, myKeyContainerName, 1, KeyContainerPermissionFlags.Open);

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2014 Microsoft