📄 wimadll.pas
字号:
wPosInFile: Word;
wPosInFileHigh: Word;
fReadOnlyAsked: bool): HIMA;
stdcall; external WimaDllName name 'OpenLargeImageFileCB';
{/// DeleteIma : Delete an Image Object. }
procedure DeleteIma(Ima: HIMA) ;stdcall;
stdcall; external WimaDllName name 'DeleteIma';
{/// Read an image file (.IMA or .IMZ) }
{/// hWnd : parent window for progress window }
{/// lpFn : FileName }
{/// lpfCompr : pointer to Boolean (will receive TRUE if file is compressed) }
{/// dwPosFileBegin : position in file (usualy 0, except in WLZ) }
function ReadImaFile(hIma: HIMA;
hWnd: HWND;
lpFn: PChar;
lpfCompr: PBool;
dwPosFileBegin: LongInt): Bool;
stdcall; external WimaDllName name 'ReadImaFile';
function ReadImaFileEx(hIma: HIMA;
hWnd: HWND;
lpFn: PChar;
lpfCompr: PBool;
dwPosFileBegin: LongInt;
lpszPassword: PChar): Bool;
stdcall; external WimaDllName name 'ReadImaFileEx';
function ReadImaFileExCB(hIma: HIMA;
hWnd: HWND;
pEventNotifCallBack: TWIMACALLBACK;
lpUsrParam: Pointer;
lpFn: PChar;
lpfCompr: PBoolean;
dwPosFileBegin: LongInt;
lpszPassword: PChar): Boolean;
stdcall; external WimaDllName name 'ReadImaFileExCB';
{/// WriteImaFile : WriteCompressed image }
{/// hWnd : parent window for progress window }
{/// lpFn : FileName }
{/// fTruncate : TRUE if you want truncate unused part of image }
{/// fCompress : TRUE if you want compress }
{/// iLevelCompress : used is fCompress is TRUE, level of compress (1 to 9) }
{/// dwPosBeginWrite : position in file (usualy 0) }
{/// lpNameInCompr : alternate name in compressed file (can be NULL) }
function WriteImaFile(hIma: HIMA;
hWnd: HWND;
lpFn: PChar;
fTruncate: Bool;
fCompress: Bool;
iLevelCompress: Integer;
dwPosBeginWrite: LongInt;
lpNameInCompr: PChar): Bool;
stdcall; external WimaDllName name 'WriteImaFile';
function WriteImaFileEx(hIma: HIMA;
hWnd: HWND;
lpFn: PChar;
fTruncate: Bool;
fCompress: Bool;
iLevelCompress: Integer;
dwPosBeginWrite: LongInt;
lpNameInCompr: PChar;
lpszPassword: PChar): Bool;
stdcall; external WimaDllName name 'WriteImaFileEx';
function WriteImaFileExCB(hIma: HIMA;
hWnd: HWND;
pEventNotifCallBack: TWIMACALLBACK;
lpUsrParam: Pointer;
lpFn: PChar;
fTruncate, fCompress: Boolean;
iLevelCompress: Integer;
dwPosBeginWrite: LongInt;
lpNameInCompr: PChar;
dwCryptMethod: LongInt;
lpszPassword: PChar): Boolean;
stdcall; external WimaDllName name 'WriteImaFileExCB';
{/// ReadFloppy : Read a floppy }
{/// hWnd : parent window for progress window }
{/// bFloppy : Floppy to read (0 for A:) }
{/// caRead : USED, or ALL (ALL if you want read unused part of floppy) }
function ReadFloppy(hIma: HIMA;
hWnd: HWND;
bFloppy: BYTE;
caRead: CHOICEAPP): Bool ;
stdcall; external WimaDllName name 'ReadFloppy';
// ReadFloppyCB : do not display user interface but call CallBack
function ReadFloppyCB(hIma: HIMA;
hWnd: HWND;
pEventNotifCallBack: TWIMACALLBACK;
lpUsrParam: Pointer;
bFloppy: BYTE;
caRead: CHOICEAPP): Boolean;
stdcall; external WimaDllName name 'ReadFloppyCB';
{/// WriteFloppy : Write a floppy }
{/// hWnd : parent window for progress window }
{/// bFloppy : Floppy to write (0 for A:) }
{/// caFormat : NOTHING or ALL (ALL for format) }
{/// caWrite : USED or ALL }
{/// caCompare : NOTHING, USED or ALL }
{/// fCheckDiskBeforeWrite : if you want check disk is empty }
function WriteFloppy(hIma: HIMA;
hWnd: HWND;
bFloppy: BYTE;
caFormat: CHOICEAPP;
caWrite: CHOICEAPP;
caCompare: CHOICEAPP;
fCheckDiskBeforeWrite: BYTE): Bool;
stdcall; external WimaDllName name 'WriteFloppy';
function WriteFloppyCB(hIma: HIMA;
hWnd: HWND;
pEventNotifCallBack: TWIMACALLBACK;
lpUsrParam: Pointer;
bFloppy: BYTE;
caFormat: CHOICEAPP;
caWrite: CHOICEAPP;
caCompare: CHOICEAPP;
fCheckDiskBeforeWrite: BYTE): Boolean;
stdcall; external WimaDllName name 'WriteFloppyCB';
{/// Create a directory in the image }
{/// lpDir : Directory name }
function MkDir(hIma: HIMA;
lpDir: PChar): Bool ;stdcall;
stdcall; external WimaDllName name 'MkDir';
{/// Change current directory by name }
{/// lpDir : Directory name }
function ChszDir(hIma: HIMA;
lpDir: PChar): Bool;
stdcall; external WimaDllName name 'ChszDir';
{/// Change current directory by mode }
{/// bMode : CDM_ROOT or CDM_UPPER (equiv. to cd \ and cd ..) }
function ChDir(hIma: HIMA;
bMode: BYTE): Bool;
stdcall; external WimaDllName name 'ChDir';
{/// Change current directory by mode }
{/// bMode : CDM_ROOT or CDM_UPPER or CDM_ENTRY (equiv. to cd \ and cd ..) }
function ChDirPos(hIma: HIMA;
bMode: BYTE;
dwPosDir: LongInt): Bool;
stdcall; external WimaDllName name 'ChDirPos';
{/// InjectFile : Inject a file in floppy }
{/// lpFn : file to inject }
{/// lpDwSize : Pointer to DWORD that will receive the size. Can be NULL. }
{/// lpTooBig : Pointer to BOOL, become TRUE if file too big to be injected }
{/// (if InjectFile return FALSE). Can be NULL. }
{/// lpNameWhenInjected : if not NULL, contain a new name in the image }
{/// (if the file must have another name when injected). Can be NULL. }
function InjectFile(hIma: HIMA;
lpFn: PChar;
lpDwSize: PLongInt;
lpTooBig: PBool;
lpNameWhenInjected: PChar): Bool;
stdcall; external WimaDllName name 'InjectFile';
function InjectFileCB(hIma: HIMA;
hWnd: HWND;
pEventNotifCallBack: TWIMACALLBACK;
lpUsrParam: Pointer;
lpFn: PChar;
lpDwSize: PLongInt;
lpTooBig: PBOOLEAN;
lpNameWhenInjected: PChar): Boolean;
stdcall; external WimaDllName name 'InjectFileCB';
{/// MakeEmptyImage : make an empty image }
{/// iNotypeDisk : 4=720K,6=1440K,7=2880K,8=DMF2048,9=DMF1024,10=1680K }
{/// 0=160K,1=180K,2=320K,3=360K,5=1200K (old, no ! :-)) }
function MakeEmptyImage(hIma: HIMA;
iNoTypeDisk: Integer): Bool;
stdcall; external WimaDllName name 'MakeEmptyImage';
function MakeEmptyImageEx(hIma: HIMA;
lpszBootSectorGeom :PChar;
lpszBootSectorCode :PChar): Bool;
stdcall; external WimaDllName name 'MakeEmptyImageEx';
{// BuildImaNewFormat : Defrag (and pehaps change format)
// Success: return new Image object (hOldIma is destroyed)
// Error : Return NULL, hOldIma is not destroyed
// fNewTypeDisk : TRUE: change format using iNotypeDisk, FALSE: Just defrag
// iNotypeDisk : 4=720K,6=1440K,7=2880K,8=DMF2048,9=DMF1024,10=1680K
// 0=160K,1=180K,2=320K,3=360K,5=1200K (old, no ! :-))
HIMA WIMAAPI BuildImaNewFormat(HIMA hOldIma,BOOL fNewTypeDisk,int iNoTypeDisk); }
function BuildImaNewFormat(hIma: HIMA;
fNewTypeDisk : Bool;
iNoTypeDisk: Integer): HIMA;
stdcall; external WimaDllName name 'BuildImaNewFormat';
{// BuildImaNewFormat : Defrag (and pehaps change format)
// hNewIma will receive the new image and must have been created
// lpszBootSectForGeometry : contain a boot sector with geometry of new image
// fDiscardOldIma : TRUE to delete hOldIma (if BuildImaNewFormatEx has success)
BOOL WIMAAPI BuildImaNewFormatEx(HIMA hOldIma,HIMA hNewIma,BOOL fNewTypeDisk,
LPCSTR lpszBootSectForGeometry,BOOL fDiscardOldIma); }
function BuildImaNewFormatEx(hIma: HIMA;
hNewIma: HIMA;
fNewTypeDisk : Bool;
iNoTypeDisk: Integer;
lpszBootSectForGeometry: PChar;
fDiscardOldIma : Bool): Bool;
stdcall; external WimaDllName name 'BuildImaNewFormatEx';
{
BOOL WIMAAPI BuildImaNewFormatExCB(HIMA hOldIma,HIMA hNewIma,
EVENTNOTIFCALLBACK pEventNotifCallBack,LPVOID lpUsrParam,
BOOL fNewTypeDisk,
LPCSTR lpszBootSectForGeometry,BOOL fDiscardOldIma);
}
function BuildImaNewFormatExCB(hIma: HIMA;
hNewIma: HIMA;
pEventNotifCallBack: TWIMACALLBACK; lpUsrParam: Pointer;
fNewTypeDisk : Bool;
iNoTypeDisk: Integer;
lpszBootSectForGeometry: PChar;
fDiscardOldIma : Bool): Bool;
stdcall; external WimaDllName name 'BuildImaNewFormatExCB';
{ BOOL WINAPI BuildFat16EmptyImageFromSize(LPCTSTR lpszFileName,DWORD dwNbSector,DWORD dwNbRootEntry); }
function BuildFat16EmptyImageFromSize(lpszFileName: PChar;
dwNbSector: LongInt;
dwNbRootEntry: LongInt) : BOOL;
stdcall; external WimaDllName name 'BuildFat16EmptyImageFromSize';
{/// InitWimaSdk : Init the DLL and use hinstdll for resource }
Const DEBENUSTD = 'ENU';
Const BASEENUSTD = (10000);
function InitWimaSdk(hinstdll: HINST;
lpDeb: PChar;
wBase: Word): Bool;
stdcall; external WimaDllName name 'InitWimaSdk';
{/// GetCurDir : Get the name of current directory }
{/// lpBuf : buffer that will receive the name }
{/// uiMaxSize : the size of buffer }
function GetCurDir(hIma: HIMA;
lpBuf: PChar;
uiMaxSize: Word): Bool;
stdcall; external WimaDllName name 'GetCurDir';
{/// GetNbEntryCurDir : Get the number of entry of cur directory }
function GetNbEntryCurDir(hIma: HIMA): LongInt ;
stdcall; external WimaDllName name 'GetNbEntryCurDir';
{/// GetDirInfo : Get info about the entry of cur directory }
{/// LPDIRINFO : array of DIRINFO that will receive the info }
{/// (use GetNbEntryCurDir for know the size needed) }
{/// bSort : specify how the file must be sort }
{/// (SORT_NONE, SORT_NAME, SORT_EXT, SORT_SIZE or SORT_DATE) }
function GetDirInfo(hIma: HIMA;
lpdi: PDIRINFO;
bSort: BYTE): Bool;
stdcall; external WimaDllName name 'GetDirInfo';
{/// Sort : Resort the array obtained by GetDirInfo }
function Sort(hIma: HIMA;
lpdi: PDIRINFO;
bSort: BYTE): Bool;
stdcall; external WimaDllName name 'Sort';
function RefreshInternalBufferDirInfo(hIma: HIMA;
bSort: BYTE;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -