Discuss this help topic in CBFS Forum

CallbackFileSystem.AddGrantedProcess method

Filter:

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

CallbackFileSystem     See also    

Overview

Adds an element to the "Access Granted" process list

Declaration

[Pascal]
    procedure AddGrantedProcess( const ProcessFileName : TCBString; ProcessID : LongWord; ChildProcesses : boolean; DesiredAccess : TCbFsDesiredAccess );
    type TCBString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

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

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

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

[C#]
    void AddGrantedProcess( String ProcessFileName, UInt32 ProcessID, bool ChildProcesses, CbFsDesiredAccess DesiredAccess );

[VB.NET]
    Sub AddGrantedProcess( ByVal ProcessFileName As String, ByVal ProcessID As UInt32, ByVal ChildProcesses As Boolean ByVal DesiredAccess As CbFsDesiredAccess )

[Java]
    void addGrantedProcess( String processFileName, long processId, boolean childProcesses, CbFsDesiredAccess desiredAccess )

Parameters

  • ProcessFileName - either full name (i.e. including the path) or just filename.ext of the process executable file. 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 is 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 CbFsDesiredAccess

Description

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. If the name is empty and -1 is passed for ProcessID, the rule is treated as being set for all processes.

NOTE: Enable process restrictions by setting ProcessRestrictionsEnabled to true before calling this method. This method may be called only after a successful call to MountMedia method.

Call from...

This method may be called only from outside of callback / event handlers.

See also

ProcessRestrictionsEnabled     DeleteGrantedProcess     GetAccessGrantedProcess     GetAccessGrantedProcessCount    

Discuss this help topic in CBFS Forum