⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wimadll.pas

📁 对ima、imz压缩文件修改
💻 PAS
📖 第 1 页 / 共 4 页
字号:
                      lpdwNumberItem: PLongInt): Bool;
               stdcall; external WimaDllName name 'RefreshInternalBufferDirInfo';

function GetBufferDirInfoItem(hIma: HIMA;
                      lpdi: PDIRINFO;
                      dwItemPos: LongInt): Bool;
               stdcall; external WimaDllName name 'GetBufferDirInfoItem';

function ReSortBufferDirInfo(hIma: HIMA;
                      bSort: BYTE): Bool;
               stdcall; external WimaDllName name 'ReSortBufferDirInfo';

{/// GetLabel : Get the label of Image }
{/// lpBuf : will receive the label }

function GetLabel(hIma: HIMA;
                      lpBuf: PChar): Bool;
               stdcall; external WimaDllName name 'GetLabel'

{/// SetLabel : Set the label of Image }
{/// lpBuf : contain the new label }

function SetLabel(hIma: HIMA;
                      lpBuf: PChar): Bool;
               stdcall; external WimaDllName name 'SetLabel';

{/// ExtractFile : Extract one file }
{/// unPosDir : The uiPosInDir fields in DIRINFO structure that describe }
{/// the file }
{/// lpPath : Path where extract the file }
{/// lpFullName: will receive the exact full name of created file. Can be NULL }

function ExtractFile(hIma: HIMA;
                      uiPosDir: LongInt;
                      lpPath: PChar;
                      lpFullName: PChar): Bool;
               stdcall; external WimaDllName name 'ExtractFile';

function ExtractFileCB(hIma: HIMA;
                      hWnd: HWND;
                      pEventNotifCallBack: TWIMACALLBACK;
                      lpUsrParam: Pointer;
                      uiPosDir: LongInt;
                      lpPath: PChar;
                      lpFullName: PChar): Boolean;
               stdcall; external WimaDllName name 'ExtractFileCB';

function ExtractFileVirtual(hIma: HIMA;
                      pFileIoCallBack: TWIMAFILEIOCALLBACK;
                      dwMaxVirtualBufSize: LongInt;
                      lpParamUsrExtractOut: Pointer;
                      dwPosDir: LongInt;
                      lpPath: PChar;
                      lpFullName: PChar): Bool;
               stdcall; external WimaDllName name 'ExtractFileVirtual';

function ExtractFileVirtualCB(hIma: HIMA;
                      pFileIoCallBack: TWIMAFILEIOCALLBACK;
                      dwMaxVirtualBufSize: LongInt;
                      lpParamUsrExtractOut: Pointer;
                      pEventNotifCallBack: TWIMACALLBACK;
                      lpUsrParam: Pointer;
                      dwPosDir: LongInt;
                      lpPath: PChar;
                      lpFullName: PChar): Bool;
               stdcall; external WimaDllName name 'ExtractFileVirtualCB';

{/// CheckSpaceForFile : Check you've space for inject a file of dwSize bytes }

function CheckSpaceForFile(hIma: HIMA;
                      dwSize: LongInt): Bool;
               stdcall; external WimaDllName name 'CheckSpaceForFile';

{/// to know if an inject is possible but need replace }
{/// lpFn : contain the name of file to be injected }
{/// lpDwSize : will receive the size of old file with same name. Can be NULL }
{/// lpNameWhenInjected : if not NULL, contain a new name in the image }
{/// lpShortName : will receive the short (8) name of file in image. Can be NULL }
{/// lpShortExt : will receive the short (3) ext of file in image. Can be NULL }
{/// (if the file must have another name when injected) }

function IfInjectPossibleButNeedReplace(hIma: HIMA;
                      lpFn: PChar;
                      lpDwSize: PLongInt;
                      lpShortName: PChar;
                      lpShortExt: PChar;
                      lpNameWhenInjected: PChar): Bool;
               stdcall; external WimaDllName name 'IfInjectPossibleButNeedReplace';

{/// RmDir : Remove a directory }
{/// unPosDir : The uiPosInDir fields in DIRINFO structure that describe }
{/// the file }

function RmDir(hIma: HIMA;
                      uiPosDir: LongInt): Bool;
               stdcall; external WimaDllName name 'RmDir';

{/// DeleteFileNameExt
 //   Delete a file in the image
 //     for filling lpNom and lpExt, use data obtained from GetDirInfo
 //   lpNom : pointer to array of 8 chars (name of 8.3 name, use DIRINFO.nom)
 //   lpExt : pointer to array of 3 chars (ext  of 8.3 name, use DIRINFO.ext)
 //   fRealDel : TRUE to really delete, FALSE to only test if delete is possible }

function DeleteFileNameExt(hIma: HIMA;
                      lpNom: PChar;
                      lpExt: PChar;
                      fRealDel: Bool): Bool;
               stdcall; external WimaDllName name 'DeleteFileNameExt';


{// MoveFileToDir
 //    Move a file from current directory to another directory
 //     for filling lpNom and lpExt, use data obtained from GetDirInfo
 //   lpName: pointer to array of 8 chars (name of 8.3 name, use DIRINFO.nom)
 //   lpExt : pointer to array of 3 chars (ext  of 8.3 name, use DIRINFO.ext)
 //   lpszDestDir : string contained the path of new directory (like "dir1\\dir2")
 //   lpfReplaceNeeded : will receive TRUE if we need replace an existing file
 //   fDoRealMove : TRUE to really delete, FALSE to only test if move is possible
 //   fDoReplaceIfNeeded : TRUE to to the move if we need replace an existing file
 //          (ignored if replace is not needed)
 //   lpdwErrInfo : will receive a ERRINFO_MOVEFILE_* if there is error with lpszDestDir


 BOOL WIMAAPI MoveFileToDir(HIMA hIma,LPCSTR lpName,LPCSTR lpExt,LPCSTR lpszDestDir,
                            LPBOOL lpfReplaceNeeded,BOOL fDoRealMove,BOOL fDoReplaceIfNeeded,
                            LPDWORD lpdwErrInfo); }
Const ERRINFO_MOVEFILE_DESTINATIONEQUALSOURCE = $80000001;
Const ERRINFO_MOVEFILE_DESTINATIONSUBFOLERDEPL = $80000002;

function MoveFileToDir(hIma: HIMA;
                       lpName: PChar;
                       lpExt: PChar;
                       lpszDestDir: PChar;
                       fDoRealMove: Bool;
                       fDoReplaceIfNeeded: Bool;
                       lpdwErrInfo: PLongInt): Bool;
                stdcall; external WimaDllName name 'MoveFileToDir';


{// RenameFile :    Rename one file }
{ //  uiPosDir :     The uiPosInDir fields in DIRINFO structure that describe }
{ //                  the file }
{ //  lpNewLongName: The new name of the file }
function RenameFile(hIma: HIMA;
                      uiPosDir: LongInt;
                      lpNewLongName: PChar): Bool;
               stdcall; external WimaDllName name 'RenameFile';

{ ChangeDateAndAttribute :    Change the date and attribute of a File }
{  uiPosDir :     The uiPosInDir fields in DIRINFO structure that describe }
{                  the file }
{  *lpbNewAttr:   Contain the new attribute of the file (or NULL to no change) }
{  *lpNewDosDate, }
{  *lpNewDosTime: Contain the Modified Date and Time (or NULL to no change) }
{  *lpbNewdir_CreateMSec,*lpwNewdir_CreateTime,*lpwNewdir_CreateDate }
{                 Contain the Created Date and Time (or NULL to no change) }
{  *lpwNewdir_LastAccessDate : Contain the Last Access Date (or NULL...) }

function ChangeDateAndAttribute(hIma: HIMA;
                      uiPosDir: LongInt;
                      lpbNewAttr: PByte;
                      lpNewDosDate: PWord;
                      lpNewDosTime: PWord;
                      lpbNewdir_CreateMSec: PByte;
                      lpwNewdir_CreateTime: PWord;
                      lpwNewdir_CreateDate: PWord;
                      lpwNewdir_LastAccessDate: PWord): Bool;
               stdcall; external WimaDllName name 'ChangeDateAndAttribute';

{/// ReadData : Direct read data in image. }
{/// dwPos : begin position }
{/// dwSize : number of byte to copy (size of buffer) }
{/// lpBuf : buffer that will receive data }

function ReadData(hIma: HIMA;
                      dwPos: LongInt;
                      dwSize: LongInt;
                      lpBuf: PChar): Bool;
               stdcall; external WimaDllName name 'ReadData';

{/// WriteData : Direct write data in image. Be carreful, WI don't refresh dir! }
{/// dwPos : begin position }
{/// dwSize : number of byte to copy (size of buffer) }
{/// lpBuf : buffer that contain data }

function WriteData(hIma: HIMA;
                      dwPos: LongInt;
                      dwSize: LongInt;
                      lpBuf: PChar): Bool;
               stdcall; external WimaDllName name 'WriteData';

{/// To be added : DRIVEINFO, GetFatImaSizeFileName, GetDriveInfo  }


{
//
// GetFatImaSizeFileName : Get information about UNCOMPRESSED Fat image
//   lpfn :          FileName
//   lpdwSize :      Will receive the size of the image, 32 bits low part of 64 bit data
//   lpdwSize!high : Will receive the size of the image, 32 bits high part of 64 bit data
//   lpfIsBigFat :   Boolean pointer, will receive TRUE if this is a large image (>2.88MB), not floppy image
//   lpdwPosInFile : Will receive the position of the image
BOOL WIMAAPI GetFatImaSizeFileName(LPCSTR lpFn,LPDWORD lpdwSize,LPDWORD lpdwSizeHigh,LPBOOL lpfIsBigFat,LPDWORD lpdwPosInFile);
}
function GetFatImaSizeFileName(lpFn :PChar;
                      lpdwSize: PLongInt;
                      lpdwSizeHigh: PLongInt;
                      lpfIsBigFat: PBoolean;
                      lpdwPosInFile: PLongInt): Bool;
               stdcall; external WimaDllName name 'GetFatImaSizeFileName';

{// GetDriveInfo : Get info about drive type
//  bDrive : number of driver (0 = 'A:', 1 = 'B:')
//  return the kind of drive}
{DriveInfo return:
  NO_FLOPPY=0,
  FLOPPY_360=1,
  FLOPPY_12M=2,
  FLOPPY_720=3,
  FLOPPY_144=4,
  FLOPPY_288=5,
  LDISK_REMOVABLE=6,
  LDISK_HARDDISK=7,
  LDISK_CDROM=8,
  FLOPPY_LS120=9
DRIVEINFO WIMAAPI GetDriveInfo(BYTE bDrive);
 }
function GetDriveInfo(bDrive: BYTE): LongInt;
               stdcall; external WimaDllName name 'GetDriveInfo';

{
// Fill the ASPI Inquiry array.
// if lpAspiCdRomInquityTab is NULL AND dwMaxNumberInArray==0, just return the number of ASPI CDrom Unit.
//  lpAspiCdRomInquityTab : Will receive the Array of SCSI Unit
//  dwMaxNumberInArray : size of array (in number of ASPIINQUIRYTAB)
DWORD WIMAAPI WimLargeAspiCdromInquiryFillArray(ASPIINQUIRYTAB* lpAspiCdRomInquityTab,DWORD dwMaxNumberInArray);
}
function WimLargeAspiCdromInquiryFillArray(lpAspiCdRomInquityTab: PASPIINQUIRYTAB;
                      dwMaxNumberInArray: LongInt): LongInt;
               stdcall; external WimaDllName name 'WimLargeAspiCdromInquiryFillArray';

{
// Create a CDRom Image fro ASPI Unit, using dwHost and dwTargetID from AspiCdromInquiy
//   lpFn : Filename to create
//   lpdwTotal : will receive the filesize
// Note : I suggest using WimLargeReadAspiCDImageIgnoreError with fIgnoreError at FALSE
BOOL WIMAAPI WimLargeReadAspiCDImage(HWND hWnd,DWORD dwHost,DWORD dwTargetID,LPSTR lpFn,LPDWORD lpdwTotal);
}
function WimLargeReadAspiCDImage(hWnd: HWND;
                      dwHost: LongInt;
                      dwTargetID: LongInt;
                      lpFn: PChar;
                      lpdwTotal: PLongInt): Bool;
               stdcall; external WimaDllName name 'WimLargeReadAspiCDImage';
{
// Like WimLargeReadAspiCDImage
// fIgnoreError :
//    FALSE : if there is error ignore it only if the error is after ISO9660 size (suggested)
//    TRUE : Ignore all ISO 9660 error
BOOL WIMAAPI WimLargeReadAspiCDImageIgnoreError(HWND hWnd,DWORD dwHost,DWORD dwTargetID,LPSTR lpFn,LPDWORD lpdwTotal,BOOL fIgnoreError);
}
function WimLargeReadAspiCDImageIgnoreError(hWnd: HWND;
                      dwHost: LongInt;
                      dwTargetID: LongInt;
                      lpFn: PChar;
                      lpdwTotal: PLongInt;
                      fIgnoreError: Bool): Bool;
               stdcall; external WimaDllName name 'WimLargeReadAspiCDImageIgnoreError';

function WimLargeReadAspiCDImageIgnoreErrorCB(hWnd: HWND;
                      pEventNotifCallBack: TWIMACALLBACK;
                      lpUsrParam: Pointer;
                      dwHost: LongInt;
                      dwTargetID: LongInt;
                      lpFn: PChar;
                      lpdwTotal: PLongInt;
                      fIgnoreError: Bool): Bool;
               stdcall; external WimaDllName name 'WimLargeReadAspiCDImageIgnoreErrorCB';
{
// return value != 0 if WimLargeReadLargeIma can be used with CDRom
// (elsewhere, only hard disk partition)
DWORD WIMAAPI WimLargeIsReadImaIsoPossible();
}
function WimLargeIsReadImaIsoPossible(): LongInt;
               stdcall; external WimaDllName name 'WimLargeIsReadImaIsoPossible';

{
// Read Disk partition to image
//  cDrive : disk letter ('C' for disk C:...)
//  lpdwTotal : will receive number of byte processed
//  caRead : USED, or ALL (ALL if you want read unused part of disk)
BOOL WIMAAPI WimLargeReadLargeIma(HWND hWnd,char cDrive,LPSTR lpFn,LPDWORD lpdwTotal,CHOICEAPP caRead);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -