Discuss this help topic in CBFS Forum

CallbackFileSystem.AddDeniedProcess method

Filter:

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

CallbackFileSystem     See also    

Overview

Adds an element to the "Access Denied" process list

Declaration

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

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

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

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

[C#]
    void AddDeniedProcess( string ProcessFileName, uint ProcessID, bool ChildProcesses, CbFsDesiredAccess DesiredAccess );

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

[Java]
    void addDeniedProcess( 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 forbidden with this rule

Values of CbFsDesiredAccess

Description

Use this method to add an element to the list of the processes, which are forbidden from accessing 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     DeleteDeniedProcess     GetAccessDeniedProcess     GetAccessDeniedProcessCount    

Discuss this help topic in CBFS Forum