Solid File System

Virtual file system enigne that can be embedded into your software.

SolFSStorage.AddGrantedProcess method


Pascal    Plain C    C++ (DLL/Lib)    C++ (VCL)    C++ (.NET)    C#    VB.NET    Java 

SolFSStorage     See also    


Adds an element to the "Access Granted" process list

Not applicable


    procedure AddGrantedProcess( const ProcessFileName : TSolFSString; ProcessID : LongWord; ChildProcesses : boolean; DesiredAccess : TSolFSDesiredAccess );

    type TSolFSString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[Plain C]
    long _stdcall StorageAddProcessRestriction( unsigned long Storage, PStorageProcessRestriction ProcessRestriction );

    typedef union StorageProcessUnion {
      SolFSLongWord ProcessID;
      PSolFSWideChar ProcessFileName;
    } TStorageProcess, *PStorageProcess;

    typedef struct StorageProcessRestriction {
      SolFSLongWord RestrictionType;
      SolFSLongWord DesiredAccess;
      SolFSBool ChildProcesses;
      SolFSLongWord ProcessType;
      TStorageProcess Process;
    } TStorageProcessRestriction, *PStorageProcessRestriction;

    Values for RestrictionType:
    #define SOLFS_PROCESS_GRANTED    1
    #define SOLFS_PROCESS_DENIED    2

    Values for ProcessType:
    #define SOLFS_PROCESS_BY_ID    1
    #define SOLFS_PROCESS_BY_NAME    2

[C++ (DLL/Lib)]
    void AddGrantedProcess( const wchar_t* ProcessFileName, unsigned long ProcessID, bool ChildProcesses, SolFSDesiredAccess DesiredAccess );

[C++ (VCL)]
    void __fastcall AddGrantedProcess( TCBString ProcessFileName, unsigned long &ProcessID, bool ChildProcesses, TSolFSDesiredAccess DesiredAccess );

[C++ (.NET)]
    void AddGrantedProcess( String* ProcessFileName, unsigned long ProcessID, bool ChildProcesses, SolFSDesiredAccess DesiredAccess );

    void AddGrantedProcess( String ProcessFileName, UInt32 ProcessID, bool ChildProcesses, SolFSDesiredAccess DesiredAccess );

    Sub AddGrantedProcess( ByVal ProcessFileName As String, ByVal ProcessID As UInt32, ByVal ChildProcesses As Boolean ByVal DesiredAccess As SolFSDesiredAccess )

    not applicable;


  • [Plain C] Storage - handle to the storage returned by Create or Open function.
  • ProcessFileName - the name of the process executable file (see description for details). Can be empty if the element is added for existing process by its PID
  • ProcessID - the PID (process ID) of process. Can be 0 if the element was added using the name of the executable file.
  • ChildProcesses - specifies if access is allowed to children of the given process
  • DesiredAccess - specifies what kind of access (read, write, both) is allowed with this rule

Values of SolFSDesiredAccess

Return value

     [Plain C]  0 if the function succeeded or one of Error codes if the function failed.


Use this method to add an element to the list of the processes, which are allowed to access the storage. Use ProcessFileName to specify the name of the process, which has not been yet started.

You can specify either full path to the process name, or just a filename with extension. In the first case the specified name will be compared to the full path to the process being started. In the second case only file name will be compared to the file name of the process executable.

NOTE: Enable process restrictions by setting ProcessRestrictionsEnabled property to true before calling this method. The method may be called after the storage is opened (not before).

See also

ProcessRestrictionsEnabled     DeleteGrantedProcess     DeleteGrantedProcessByIndex     GetAccessGrantedProcess     GetAccessGrantedProcessCount    

Back to top