CallbackFilter.GetFilterDefaultRule method


Pascal    C++ (Lib)    C++ (VCL)    C++ (.NET)    C#    VB.NET   

CallbackFilter     See also    


Returns the on-boot rule with the given index


    function GetFilterDefaultRule( Index : Integer; var Mask : TCBString; var AccessFlag : LongWord; ProductName : AnsiString) : boolean;
    type TCBString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[C++ (Lib)]
    bool GetFilterDefaultRule( int Index, LPWSTR* Mask, CbFltAccessFlags* AccessFlag, LPCSTR ProductName);

[C++ (VCL)]
    bool __fastcall GetFilterDefaultRule( int Index, WideString &Mask, unsigned * AccessFlag, AnsiString ProductName);

[C++ (.NET)]
    bool GetFilterDefaultRule( int Index, String^%Mask, CbFltAccessFlags% AccessFlag, String^ ProductName);

    bool GetFilterDefaultRule( int32 Index, ref string Mask, ref CbFltAccessFlags AccessFlag, string ProductName);

    Function GetFilterDefaultRule( ByVal Index As Int32, ByRef Mask As Integer, ByRef AccessFlag As CbFltAccessFlags, ByVal ProductName As String) As Boolean


  • Index - index of the rule
  • Mask - contains mask of the files to apply the filter to
  • AccessFlag - access filter flag
  • ProductName - the name or symbolic identifier of the program that has set the rule

Return values

TRUE / true if the function succeeded or FALSE / false if the function failed.

AccessFlag values


Use this method to retrieve Index'th on-boot rule from the list of on-boot rules, set by your application.

ProductName is used to distinguish the rules, set by different applications or modules. The value is used as a key in registry, so keep it short but unique. String format of GUID value works fine.

Read more about default rules.

See also

AddFilterDefaultRule     DeleteFilterDefaultRule     GetFilterDefaultCount