Important information: this site is currently scheduled to go offline indefinitely by end of the year.
PROJECT: MultiEx Plugin Support
New Plugin Manager and Test Plugin,
documentation to follow
documentation to follow
Last edited by Rahly on Tue Jul 26, 2005 2:53 am, edited 1 time in total.
"By nature men are alike. Through practice they have become far apart." Confucius (Analect 17:2)
Manager function list
GetManagerVersion,
GetSupportedInterfaceVersion,
SetPluginDirectory,
RefreshPluginList,
PluginCount,
PluginInfo,
FreeCache,
SetCacheSize,
mpGetFormatCount,
mpGetFormatInfo,
mpGetOptions,
mpSetOption,
mpOpenArchive,
mpOpenArchiveBindStream,
mpCloseArchive,
mpIndexCount,
mpIndexedInfo,
mpFindInfo,
mpFindFirstFile,
mpFindNextFile,
mpFindClose,
mpIsFileAnArchive,
mpIsStreamAnArchive,
mpExportFileByNameToFile,
mpExportFileByIndexToFile,
mpExportFileByNameToStream,
mpExportFileByIndexToStream,
mpImportFileFromFile,
mpImportFileFromStream,
mpRemoveFileByName,
mpRemoveFileByIndex,
mpGetLastError,
mpGetErrorText
GetManagerVersion,
GetSupportedInterfaceVersion,
SetPluginDirectory,
RefreshPluginList,
PluginCount,
PluginInfo,
FreeCache,
SetCacheSize,
mpGetFormatCount,
mpGetFormatInfo,
mpGetOptions,
mpSetOption,
mpOpenArchive,
mpOpenArchiveBindStream,
mpCloseArchive,
mpIndexCount,
mpIndexedInfo,
mpFindInfo,
mpFindFirstFile,
mpFindNextFile,
mpFindClose,
mpIsFileAnArchive,
mpIsStreamAnArchive,
mpExportFileByNameToFile,
mpExportFileByIndexToFile,
mpExportFileByNameToStream,
mpExportFileByIndexToStream,
mpImportFileFromFile,
mpImportFileFromStream,
mpRemoveFileByName,
mpRemoveFileByIndex,
mpGetLastError,
mpGetErrorText
"By nature men are alike. Through practice they have become far apart." Confucius (Analect 17:2)
New functions
mpSetOption,
mpIndexedInfo,
mpFindInfo,
mpRemoveFileByName,
mpRemoveFileByIndex,
mpGetLastError,
mpGetErrorText
Changed functions
mpOpenArchive,
mpOpenArchiveBindStream,
mpFindFirstFile,
mpFindNextFile,
mpFindClose,
mpImportFileByNameFromFile, // Name changed to mpImportFileFromFile
mpImportFileByNameFromStream // Name changed to mpImportFileFromStream,
Removed functions
mpImportFileByIndexFromFile,
mpImportFileByIndexFromStream
mpSetOption,
mpIndexedInfo,
mpFindInfo,
mpRemoveFileByName,
mpRemoveFileByIndex,
mpGetLastError,
mpGetErrorText
Changed functions
mpOpenArchive,
mpOpenArchiveBindStream,
mpFindFirstFile,
mpFindNextFile,
mpFindClose,
mpImportFileByNameFromFile, // Name changed to mpImportFileFromFile
mpImportFileByNameFromStream // Name changed to mpImportFileFromStream,
Removed functions
mpImportFileByIndexFromFile,
mpImportFileByIndexFromStream
"By nature men are alike. Through practice they have become far apart." Confucius (Analect 17:2)
New Functions
You'll notice in the open functions I've removed CreateParams, I opted to let mpSetOption() to handle this, so there was no need for it to be here.
mpFind's have been changed with the removal of the TFindFileInfo structure
Code: Select all
function mpSetOption(FormatIndex: LongInt; OptionType: LongInt; Name: PChar; Value: PChar): LongBool; stdcall;
function mpIndexedInfo(FormatIndex: LongInt; ArchiveHandle: LongInt; Index: LongInt; Item: PChar): PChar; stdcall;
function mpFindInfo(FormatIndex: LongInt; Handle: LongInt; Field: PChar): PChar; stdcall;
Code: Select all
function mpOpenArchive(var ArchiveHandle: LongInt; FormatIndex: LongInt; ArchiveName: PChar; Flags: Cardinal): LongBool; stdcall;
function mpOpenArchiveBindStream(var ArchiveHandle: LongInt; FormatIndex: LongInt; Stream: IStream; Flags: Cardinal): LongBool; stdcall;
function mpFindFirstFile(FormatIndex: LongInt; ArchiveHandle: LongInt; FileMask: PChar): LongInt; stdcall;
function mpFindNextFile(FormatIndex: LongInt; FindHandle: LongInt): LongBool; stdcall;
function mpFindClose(FormatIndex: LongInt; FindHandle: LongInt): LongBool; stdcall;
mpFind's have been changed with the removal of the TFindFileInfo structure
"By nature men are alike. Through practice they have become far apart." Confucius (Analect 17:2)
Well, i removed things like TFileFindInfo, because it wasn't generic enough, so i put it on par with index viewing, because not all archives have file names.
For Example though, the test pluging, gives you.
FILENAME=STRING;FILESIZE=UINT64;FILEDATE=DATE;ARCHIVEDATE=DATE
when you mpGetOptions with the OPTIONTYPE_FILEINFO.
updated common unit
I'll also write up a C header later.
For Example though, the test pluging, gives you.
FILENAME=STRING;FILESIZE=UINT64;FILEDATE=DATE;ARCHIVEDATE=DATE
when you mpGetOptions with the OPTIONTYPE_FILEINFO.
updated common unit
Code: Select all
unit Common;
interface
type
TManagerPluginInfo = packed record
// Version 1.0
Size: LongInt;
PluginName: PChar;
PluginAuthor: PChar;
PluginURL: PChar;
PluginEmail: PChar;
PluginFullPath: PChar;
VersionMajor, VersionMinor: LongInt;
InterfaceMajor, InterfaceMinor: LongInt;
Supported: LongBool;
end;
TPluginInfo = packed record
// Version 1.0
Size: LongInt;
Name: PChar;
Author: PChar;
URL: PChar;
Email: PChar;
Major: LongInt;
Minor: LongInt;
end;
TFormatInfo = packed record
// Version 1.0
Size: LongInt;
FileMask: PChar; // This is better than an Interface
GameName: PChar; // This is the name of the game it supports
Flags: Int64; // Support flags
end;
const
SUPPORTFLAG_CREATE = $0000000000000001;
SUPPORTFLAG_IMPORT = $0000000000000002;
SUPPORTFLAG_EXPORT = $0000000000000004;
SUPPORTFLAG_DELETE = $0000000000000008;
SUPPORTFLAG_REPLACE = $0000000000000010;
SUPPORTFLAG_BYINDEX = $0000000000000020;
SUPPORTFLAG_BYNAME = $0000000000000040;
SUPPORTFLAG_HANDLEISTREAM = $0000000000000080;
SUPPORTFLAG_HANDLEFILE = $0000000000000100;
SUPPORTFLAG_TESTARCHIVE = $0000000000000200;
SUPPORTFLAG_EXPORTNAMEWILD= $0000000000000400;
SUPPORTFLAG_IMPORTNAMEWILD= $0000000000000800;
OPTIONTYPE_CREATE = $00000001;
OPTIONTYPE_EXPORT = $00000002;
OPTIONTYPE_IMPORT = $00000003;
OPTIONTYPE_FILEINFO = $00000004;
OPENFLAG_CREATENEW = $00000001;
OPENFLAG_OPENALWAYS = $00000002;
OPENFLAG_FOREXPORT = $00000004;
OPENFLAG_FORIMPORT = $00000008;
pERROR_OK = $00000000;
pERROR_INVALID_PARM_1 = $00000001;
pERROR_INVALID_PARM_2 = $00000002;
pERROR_INVALID_PARM_3 = $00000003;
pERROR_INVALID_PARM_4 = $00000004;
pERROR_INVALID_PARM_5 = $00000005;
pERROR_INVALID_PARM_6 = $00000006;
pERROR_INVALID_PARM_7 = $00000007;
pERROR_INVALID_PARM_8 = $00000008;
pERROR_INVALID_PARM_9 = $00000009;
pERROR_FILE_NOT_EXISTS = $0000000A;
pERROR_FILE_CANT_OPEN = $0000000B;
pERROR_INVALID_FORMAT = $0000000C;
pERROR_STREAM_READ = $0000000D;
pERROR_INVALID_HANDLE = $0000000E;
pERROR_INVALID_INDEX = $0000000F;
pERROR_CREATE_ERROR = $00000010;
pERROR_ARCHIVE_READ_ERROR = $00000011;
pERROR_NO_MATCHES = $00000012;
pERROR_ARCHIVE_CLOSED = $00000013;
pERROR_INVALID_OPTION = $00000014;
pERROR_WILDCARDS_NOT_ALLOWED = $00000015;
pERROR_INVALID_ARCHIVE = $00000016;
pERROR_FILE_EXISTS = $00000017;
pERROR_SPECIFICPLUGIN = $80000000;
InterfaceVersionMajor = 1;
InterfaceVersionMinor = 0;
implementation
end.
"By nature men are alike. Through practice they have become far apart." Confucius (Analect 17:2)
-
- Site Admin
- Posts: 4073
- Joined: Wed Jan 15, 2003 6:45 pm
- Location: Dungeons of Doom
- Has thanked: 450 times
- Been thanked: 682 times
- Contact:
Can you email me a complete, working test app Delphi source code that uses the manager functions? Along with all new .pas files (such as "common" etc).
So I can read them and implement the same stuff in MexCom? For instance, the testplugin is not detected by the manager. But I need to see how you have it in mind, and how each function is declared.
Yes, of course I have a lot of docs. But not all, and I need ALL.
Edit: Also, after a firstfile find, then I should do a mpFindInfo to get know what the file is about eh? But, the "working" BF plugin doesn't return the mpGetOptions FILEFIND options, just an emtpy string. So I have no way to get the fields, are do you have default fields to give in mpFindInfo?
Edit2: OpenArchive crashes the whole IDE now. Perhaps due to the Cardinal there? Or the LongBool return? Please check your PM.
So I can read them and implement the same stuff in MexCom? For instance, the testplugin is not detected by the manager. But I need to see how you have it in mind, and how each function is declared.
Yes, of course I have a lot of docs. But not all, and I need ALL.
Edit: Also, after a firstfile find, then I should do a mpFindInfo to get know what the file is about eh? But, the "working" BF plugin doesn't return the mpGetOptions FILEFIND options, just an emtpy string. So I have no way to get the fields, are do you have default fields to give in mpFindInfo?
Edit2: OpenArchive crashes the whole IDE now. Perhaps due to the Cardinal there? Or the LongBool return? Please check your PM.
sureMr.Mouse wrote:Can you email me a complete, working test app Delphi source code that uses the manager functions? Along with all new .pas files (such as "common" etc).
So I can read them and implement the same stuff in MexCom? For instance, the testplugin is not detected by the manager. But I need to see how you have it in mind, and how each function is declared.
of course, remember that i change a WHOLE LOT OF STUFF with the new manager, when you made me write a plugin that tested about 99% of the functionality. So the BF plugin does need to be updatedMr.Mouse wrote:Edit: Also, after a firstfile find, then I should do a mpFindInfo to get know what the file is about eh? But, the "working" BF plugin doesn't return the mpGetOptions FILEFIND options, just an emtpy string. So I have no way to get the fields, are do you have default fields to give in mpFindInfo?
shouldn't perhaps you forgot to take out the CreateParams value?Mr.Mouse wrote:Edit2: OpenArchive crashes the whole IDE now. Perhaps due to the Cardinal there? Or the LongBool return? Please check your PM.
"By nature men are alike. Through practice they have become far apart." Confucius (Analect 17:2)