Posted: Sat Aug 07, 2004 11:36 am
Ok, heres my opinions. I love how you made the multiex.dll as an activex, although I don't think i would have installed it in the Windows\System directory. It allows other programs to use it like a scripting language and doesn't require its path to be known by the calling process. Now, I think the plugin files should be much simplier, like a standard DLL, your implementation is just like a dll with a wrapper around the functions into an activex. Although, activex is pretty easy for VB(it takes some of the hardness out, but is very limiting to what it can do), but its a little more difficult for other language, that have to design the activex interfaces as well as the classes. Also, you were saying that most of the functionality is in the multiex.dll, if we do it the way i described, it would be better to put the plugin functionality into the multiex.dll, this way other programs can use it, and the plugins, without having to know about them (black box theory).
Ok now onto the good stuff
Please bear with me, i wrote this up in 15 mins in Delphi (a stronger language i'm familar with)
mpOpenArchive does opening of read only archives as well as creating new archive files if supported new archive files.
Normally the plugin will implement ByName or ByIndex but not both, ByName is for files that contain filename, ByIndex is for files that don't contain filenames but rather on position in the file, 1 for the first file 2 for the 2nd.... so on so forth..... Also when you import a file by index and pass a -1 as the index, it will append the archive with the file.
Let me know what you think of the idea, cuz there is no point in starting to write it, if we both don't agree on it.
Ok now onto the good stuff
Please bear with me, i wrote this up in 15 mins in Delphi (a stronger language i'm familar with)
Code: Select all
// stdcall = WINAPI style calling convention
function mpGetVersion(var Major, Minor: Integer): Boolean; stdcall;
function mpGetFormatCount(): Integer; stdcall;
type
TFormatInfo = packed record
// DLL Format 1.0
FileMask: PChar;
GameName: PChar;
Flags: Int64; // used for testing for what the archive can do
end;
// This format can be expanded on and supported based
function mpGetFormatInfo(Index: Integer; var FormatInfo: TFormatInfo): Boolean;
function mpGetCreateOptions(var CreateOptions: PChar): Boolean;
// This replaces
function mpFindFileFirst(ArchiveHandle: Integer; FilePath: PChar; var FindData: TFileFindInfo): Boolean;
function mpFindFileNext(var FindData: TFileFindInfo): Boolean;
function mpFindClose(var FindData: TFileFindInfo): Boolean;
function mpIsArchive(Index: Integer; Filename: PChar): Boolean;
function mpOpenArchive(var ArchiveHandle: Integer; FormatIndex: Integer; Filename: PChar; Flags: Cardinal; CreateOptions: PChar): Boolean;
function mpExtractFileByName(ArchiveHandle: Integer; ArchiveFile: PChar; ExternalFile: PChar): Boolean;
function mpExtractFileByIndex(ArchiveHandle: Integer; Index: Integer; ExternalFile: PChar): Boolean;
function mpImportFileByName(ArchiveHandle: Integer; ArchiveFile: PChar; ExternalFile: PChar): Boolean;
function mpImportFileByIndex(ArchiveHandle: Integer; Index: Integer; ExternalFile: PChar): Boolean;
function mpCloseArchive(ArchiveHandle: Integer): Boolean;
Normally the plugin will implement ByName or ByIndex but not both, ByName is for files that contain filename, ByIndex is for files that don't contain filenames but rather on position in the file, 1 for the first file 2 for the 2nd.... so on so forth..... Also when you import a file by index and pass a -1 as the index, it will append the archive with the file.
Let me know what you think of the idea, cuz there is no point in starting to write it, if we both don't agree on it.