Importer Plugin SDK

From SpybotWiki
Revision as of 20:14, 27 May 2008 by CCRDude (talk | contribs) (New page: To improve ''rapid detection prototyping'', OpenSBI Edit Lite allows software developers to add their own importer plugins for custom data sources. ==User details== If you get a new p...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

To improve rapid detection prototyping, OpenSBI Edit Lite allows software developers to add their own importer plugins for custom data sources.

User details

If you get a new plugin, its name will usually start with IP, and it will be of the Application Extension (.dll) format. You need to close the editor if it is still open, put the file into its Plugins subfolder, and restart the editor. The new plugin will appear inside it's File: Import menu.

Developer details

Importer plugins are standard DLLs that need to export 7 functions, which are using the stdcall calling convention.

Exports

The GetDisplayName* functions are used to get the name for File: Import menu (do not include the prefix Import or trailing dots), with the return value of GetAuthorName* shown in the hint of the menu item as the source of the plugin. ShowDialog is called when the user clicks the menu item, and the GetData* functions should return the SBI contents created if ShowDialog was successful.

Pascal

function GetAuthorNameLen: cardinal; stdcall;
function GetAuthorName(const Name: PChar; const Len: cardinal): boolean; stdcall;
function GetDisplayNameLen: cardinal; stdcall;
function GetDisplayName(const Name: PChar; const Len: cardinal): boolean; stdcall;
function ShowDialog: boolean; stdcall;
function GetDataLen: cardinal; stdcall;
function GetData(const Name: PChar; const Len: cardinal): boolean; stdcall;

C/C++

See Pascal example; cardinal equals an unsigned integer, PChar is a char* and boolean a bool.

Example

A demo plugin is available (TODO: add link).