|
|
|||||||||||||
Class RegistryRequestpublic class RegistryRequest implements ISecurityRequest { // Fields public static final int CREATE; public static final int DELETE; public static final int OPEN; public static final int READ; public static final int WRITE; // Constructors public RegistryRequest (int access, String value); // Methods public PermissionID getPermissionID(); public String toString (); } This class represents a request for access to a registry key. It should be used as the security request object for a parameterized security check involving registry permissions. The RegistryPermission.check method expects a RegistryRequest object as its parameter. The following example shows how to use a RegistryRequest object to perform a security check to see if a specific registry key can be accessed. // Create a ReqistryRequest object that indicates that you want // to read the registry key "HKLM\Software\stuff". RegistryRequest sreq = new RegistryRequest(RegistryRequest.READ,"HKLM\Software\stuff"); // Check to see that all of your callers have the rights to // read that registry key. PolicyEngine.checkPermission(sreq); ... For more information about checking registry permissions, see the com.ms.security.PolicyEngine class and the RegistryPermission class. ConstructorsRegistryRequestpublic RegistryRequest (int access, String value); MethodsgetPermissionIDpublic PermissionID getPermissionID(); toStringpublic String toString (); Fields
|
© 1998 Microsoft Corporation. All rights reserved. Terms of use. |