I look forward to when it's finished
I done skeleton of the plugin interface, if it helps. I try to put here everything i find useful. Ofc feel free to change/update it in post, i'll try to update my code asap so it should reflect the latest informations.
This interface should solve the Hacker requests too.
findplugin.h:
Code: Select all
typedef DWORD tSearchFlags;
#define SEARCH_FLAGS_FOR_REGEX 1 // valid is SearchFor (instead of SearchForArray) is in regex format.
#define SEARCH_FLAGS_IN_ARCHIVES 2
#define SEARCH_FLAGS_WHOLE_WORDS_ONLY 4
#define SEARCH_FLAGS_CASE_SENSITIVE 8
#define SEARCH_FLAGS_ASCII_CHARSET 0x10
#define SEARCH_FLAGS_NOT_IN_FILE 0x20
#define SEARCH_FLAGS_UNICODE 0x40
#define SEARCH_FLAGS_HEX 0x80
#define SEARCH_FLAGS_FIND_TEXT_REGEX 0x100 // Value in FindText is in regex format.
#define SEARCH_FLAGS_UTF8 0x200
#define SEARCH_DEPTH_UNLIMITED 0xffffffff
static const FILETIME = {0xffffffff, 0xffffffff};
typedef enum {
GreaterThan,
LessThan,
GreaterOrEqualThan,
LessOrEqualThan,
Equal,
NotEqual,
Contains,
NotContains,
ContainsCaseInsensitive,
NotContainsCaseInsensitive,
EqualCaseInsensitive,
NotEqualCaseInsensitive,
MatchesRegex,
NotMatchesRegex,
} tComparisonOP;
typedef struct {
WCHAR* Plugin; // Field Plugin:
WCHAR* Property; // Field Property:
tComparisonOP ComparisonOp; // Field OP:
WCHAR* Value; // Field Value:
} tFindFilesPluginsStructW;
typedef struct {
// General tab
union { // Field Search in:
WCHAR* SearchIn;
WCHAR** SearchInArray; // <- default valid field
};
union { // Field Search for:
WCHAR* SearchFor;
WCHAR** SearchForArray; // <- default valid field
};
tSearchFlags SearchFlags; // Various fields with checkboxes.
DWORD SearchDepth; // Field Search in subdirectories.
WCHAR* FindText; // Field Find text:
// Advanced tab
FILETIME DateBetweenLowerLimit; // Field Date between:
FILETIME DateBetweenUpperLimit;
FILETIME NotOlderThan; // Field Not older than:
DWORD64 FileSizeLowerLimit; // Field File size:
DWORD64 FileSizeUpperLimit;
DWORD AttributesMask; // Field Attributes: Mask of valid values in FindFilesStructW.Attributes.
DWORD Attributes; // Attributes, which you are looking for.
// Plugins tab
tFindFilesPluginsStructW* SearchInPlugins;
BOOL FindAnyMatch; // Fields FALSE = AND (all match), TRUE = OR (any match)
} tFindFilesStructW;
// Function prototypes
extern "C" __declspec(dllexport) HANDLE __stdcall FindFindFirstW(tFindFilesStructW* ffs,WIN32_FIND_DATAW *FindData);
extern "C" __declspec(dllexport) BOOL __stdcall FindFindNextW(HANDLE Hdl,WIN32_FIND_DATAW *FindData);
extern "C" __declspec(dllexport) int __stdcall FindFindClose(HANDLE Hdl);