Discuss this help topic in CBFS Forum

CallbackFileSystem.GetAccessGrantedProcess method


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

CallbackFileSystem     See also    


Returns information about the element in the "Access Granted" process list


    procedure GetAccessGrantedProcess( Index : integer; var ProcessName : TCBString; var ProcessId : LongWord; var IncludeChildren : boolean; var DesiredAccess : TCbFsDesiredAccess );
    type TCBString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[C++ (DLL/Lib)]
    void GetAccessGrantedProcess( int Index, wchar_t* *ProcessName, unsigned long * ProcessId, bool * IncludeChildren, CbFsDesiredAccess *DesiredAccess );

[C++ (VCL)]
    void __fastcall GetAccessGrantedProcess( int Index, TCBString &ProcessName, unsigned long &ProcessId, bool &IncludeChildren, CbFsDesiredAccess &DesiredAccess );

[C++ (.NET)]
    void GetAccessGrantedProcess( int Index, String* &ProcessName, unsigned long &ProcessId, bool &IncludeChildren, CbFsDesiredAccess &DesiredAccess );

    void GetAccessGrantedProcess( int Index, ref String ProcessName, ref UInt32 ProcessId, ref bool IncludeChildren, ref CbFsDesiredAccess DesiredAccess );

    Sub GetAccessGrantedProcess( ByVal Index As Integer, ByRef ProcessName As String, ByRef ProcessId As UInt32, ByRef IncludeChildren As Boolean, ByRef DesiredAccess As CbFsDesiredAccess )

    public void getAccessGrantedProcess( int index, stringRef processName, longRef processId, boolRef includeChildren, longRef desiredAccess );


  • Index - the index of the element in the list of processes.
  • ProcessName - the name of process executable file. Can be empty if the element was added using PID and not file name
  • ProcessId - the PID (process ID) of process. Can be 0 if the element was added using the name of the executable file.
  • IncludeChildren - 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


Use this method to get information about the element of the list of processes, which are allowed to access the storage.

If ProcessName is empty and ProcessID is -1, this means that the rule applies to 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.

[C++ (Lib)] Memory for ProcessName value is allocated internally in API (you don't need to allocate it when calling this method). Use free() operator to free the memory which was allocated by API for ProcessName value.

Call from...

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

See also

ProcessRestrictionsEnabled     AddGrantedProcess     DeleteGrantedProcess     GetAccessGrantedProcessCount    

Discuss this help topic in CBFS Forum