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

📄 wimadll.pas

📁 对ima、imz压缩文件修改
💻 PAS
📖 第 1 页 / 共 4 页
字号:
}
function WimLargeReadLargeIma(hWnd: HWND;
                      cDrive: Char;
                      lpFn: PChar;
                      lpdwTotal: PLongInt;
                      caRead: CHOICEAPP): Bool;
               stdcall; external WimaDllName name 'WimLargeReadLargeIma';

function WimLargeReadLargeImaCB(hWnd: HWND;
                      pEventNotifCallBack: TWIMACALLBACK;
                      lpUsrParam: Pointer;
                      cDrive: char;
                      lpFn: PChar;
                      lpdwTotal: PLongInt;
                      caRead: CHOICEAPP): Boolean;
               stdcall; external WimaDllname name 'WimLargeReadLargeImaCB';

function WimLargeReadLargeImaEx(hWnd: HWND;
                      cDrive: Char;
                      lpFn: PChar;
                      lpdwTotal: PLongInt;
                      lpdwTotalHigh: PLongInt;
                      caRead: CHOICEAPP): Bool;
               stdcall; external WimaDllName name 'WimLargeReadLargeImaEx';

function WimLargeReadLargeImaCBEx(hWnd: HWND;
                      pEventNotifCallBack: TWIMACALLBACK;
                      lpUsrParam: Pointer;
                      cDrive: char;
                      lpFn: PChar;
                      lpdwTotal: PLongInt;
                      lpdwTotalHigh: PLongInt;
                      caRead: CHOICEAPP): Boolean;
               stdcall; external WimaDllname name 'WimLargeReadLargeImaCBEx';

{
// Write Disk partition from image
//  cDrive : disk letter ('C' for disk C:...)
//  lpdwTotal : will receive number of byte processed
//  caWrite : USED or ALL
//  fCheckDiskBeforeWrite : if you want check disk is empty
//  fAcceptAdapt : if geometry is incompatible and fAcceptAdapt is TRUE, adapt geometry
//          if geometry is incompatible and fAcceptAdapt is FALSE, return only FALSE
BOOL WIMAAPI WimLargeWriteLargeIma(HIMA hIma,HWND hWnd,char cDrive,LPDWORD lpdwTotal,
                                   CHOICEAPP caWrite,BOOL fCheckDiskBeforeWriteThis);
}
function WimLargeWriteLargeIma(hIma: HIMA;
                      hWnd: HWND;
                      cDrive: Char;
                      lpdwTotal:PLongInt;
                      caWrite: CHOICEAPP;
                      fCheckDiskBeforeWriteThis:Bool): Bool;
               stdcall; external WimaDllName name 'WimLargeWriteLargeIma';

function WimLargeWriteLargeImaCB(hIma: HIMA;
                      hWnd: HWND;
                      pEventNotifCallBack: TWIMACALLBACK;
                      lpUsrParam: Pointer;
                      cDrive: Char;
                      lpdwTotal:PLongInt;
                      caWrite: CHOICEAPP;
                      fCheckDiskBeforeWriteThis:Bool): Bool;
               stdcall; external WimaDllName name 'WimLargeWriteLargeImaCB';

function WimLargeWriteLargeImaEx(hIma: HIMA;
                      hWnd: HWND;
                      cDrive : Char;
                      lpdwTotal : PLongInt;
                      lpdwTotalHigh : PLongInt;
                      caWrite : CHOICEAPP;
                      fCheckDiskBeforeWriteThis : Bool;
                      fAcceptAdapt : Bool;
                      lpfGeometryIncompatible : PBool): Bool;
               stdcall; external WimaDllName name 'WimLargeWriteLargeImaEx';

function WimLargeWriteLargeImaCBEx(hIma: HIMA;
                      hWnd: HWND;
                      pEventNotifCallBack: TWIMACALLBACK;
                      lpUsrParam: Pointer;
                      cDrive : Char;
                      lpdwTotal : PLongInt;
                      lpdwTotalHigh : PLongInt;
                      caWrite : CHOICEAPP;
                      fCheckDiskBeforeWriteThis : Bool;
                      fAcceptAdapt : Bool;
                      lpfGeometryIncompatible : PBool): Bool;
               stdcall; external WimaDllName name 'WimLargeWriteLargeImaCBEx';

{
// say if a letter if a CDRom
BOOL WIMAAPI WimLargeIsIsoCDDrive(char cDrive);
}
function WimLargeIsIsoCDDrive(cDrive: Char): Bool;
               stdcall; external WimaDllName name 'WimLargeIsIsoCDDrive';


{ // Write the boot sector of an image
BOOL WIMAAPI WriteSectBoot(HIMA hIma,const BYTE* lpBuf,DWORD dwSizeBuf);
}
function WriteSectBoot(hIma: HIMA; lpBuf: PByte;
                      dwSizeBuf: LongInt): Bool;
               stdcall; external WimaDllName name 'WriteSectBoot';

{ // Read the boot sector of an image
BOOL WIMAAPI GetSectBoot(HIMA hIma,LPBYTE lpBuf,DWORD dwSizeBuf,LPDWORD lpdwSizeBoot);
}
function GetSectBoot(hIma: HIMA; lpBuf: PByte;
                      dwSizeBuf: LongInt;
                      lpdwSizeBoot: PLongInt): Bool;
               stdcall; external WimaDllName name 'GetSectBoot';


{// Get the total size of an image
BOOL WIMAAPI GetImageSize(HIMA hIma,LPDWORD lpdwLow,LPDWORD lpdwHigh);
}
function GetImageSize(hIma: HIMA;
                      lpdwLow: PLongInt;
                      lpdwHigh: PLongInt): Bool;
               stdcall; external WimaDllName name 'GetImageSize';


{// Get the free space in an image
BOOL WIMAAPI GetFreeSpaceInImage(HIMA hIma,LPDWORD lpdwLow,LPDWORD lpdwHigh);
}
function GetFreeSpaceInImage(hIma: HIMA;
                      lpdwLow: PLongInt;
                      lpdwHigh: PLongInt): Bool;
               stdcall; external WimaDllName name 'GetFreeSpaceInImage';

/////////////////////////  Not yet ported C code /////////////////////////////

{// IsFileExportableRawStandard, ExportRawStandardFile for export not .iso CDRom (like .bin) to .iso image
BOOL WIMAAPI IsFileExportableRawStandard(HIMA hIma,LPBOOL lpfUsefulExport,
                                         LPDWORD lpdwSizeIsoFileLow,LPDWORD lpdwSizeIsoFileHigh);
}
function IsFileExportableRawStandard(hIma: HIMA;
                      lpfUsefulExport: PBool;
                      lpdwSizeIsoFileLow: PLongInt;
                      lpdwSizeIsoFileHigh: PLongInt): Bool;
               stdcall; external WimaDllName name 'IsFileExportableRawStandard';

{BOOL WIMAAPI ExportRawStandardFile(HIMA hIma,HWND hWnd,
                                   LPCSTR lpszIsoFileName);
}
function ExportRawStandardFile(hIma: HIMA;
                      hWnd: HWND;
                      lpszIsoFileName: PChar): Bool;
               stdcall; external WimaDllName name 'ExportRawStandardFile';

{BOOL WIMAAPI ExportRawStandardFileCB(HIMA hIma,HWND hWnd,EVENTNOTIFCALLBACK pEventNotifCallBack,LPVOID lpUsrParam,
                                     LPCSTR lpszIsoFileName);
}
function ExportRawStandardFileCB(hIma: HIMA;
                      hWnd: HWND;
                      pEventNotifCallBack: TWIMACALLBACK;
                      lpUsrParam: Pointer;
                      lpszIsoFileName: PChar): Bool;
               stdcall; external WimaDllName name 'ExportRawStandardFileCB';

Type TWIMPARTITION = record
                        bActivate: Byte;
                        bHeadBegin: Byte;
                        wCylSectBegin: Word;
                        bType: Byte;    // 0=none, 5=ext
                        bHeadEnd: Byte;
                        wCylSectEnd: Word;
                        dwDist: LongInt;
                        dwSize: LongInt;
                      end;

Type TWIMPARTDESC = record
                        part: TWIMPARTITION;
                        dwPos: LongInt;
                        dwPosPartition: LongInt;
                        fIsFat32: Bool;
                        fIsFat: Bool;
                        fIsNtfs: Bool;
                        fIsLinux: Bool;
                        bDisk: Byte;
                        bFill: array[0..2] of Byte;
                      end;

Type PTWIMPARTDESC = ^TWIMPARTDESC;

{
// Don't know how to port this
#define PARTITION_DEFINED
}

{DWORD WIMAAPI MakePartitionList(LPCSTR lpfn,LPCSTR lpszPassword,
                           DWORD*pdwNbPartFound,DWORD *pdwNbFat32Found,
                           DWORD dwArraySize,PARTDESC* pList);
}
function MakePartitionList(lpfn: PChar;
                      lpszPassword: PChar;
                      pdwNbPartFound: PLongInt;
                      pdwNbFat32Found: PLongInt;
                      dwArraySize: LongInt;
                      pList: PTWIMPARTDESC): LongInt;
               stdcall; external WimaDllName name 'MakePartitionList';

{DWORD WIMAAPI GetNumberPhysicalDisk();
}
function GetNumberPhysicalDisk(): LongInt;
               stdcall; external WimaDllName name 'GetNumberPhysicalDisk';

{BOOL WIMAAPI GetPhysicalDiskSizeAndInfo(DWORD dwDisk,LPDWORD lpdwSizeLow,LPDWORD lpdwSizeHigh,
                                 LPBOOL lpfRemovable,
                                 LPTSTR lpszUnitName,DWORD dwUnitNameSize);
}
function GetPhysicalDiskSizeAndInfo(dwDisk: LongInt;
                      lpdwSizeLow: PLongInt;
                      lpdwSizeHigh: PLongInt;
                      lpfRemovable: PBool;
                      lpszUnitName: PChar;
                      dwUnitNameSize: LongInt): Bool;
               stdcall; external WimaDllName name 'GetPhysicalDiskSizeAndInfo';

type TWIMPHYSICALDISKIMAGEFORMAT =
(
    PHYSICALDISKIMAGEFORMAT_UNKNOWN,
    PHYSICALDISKIMAGEFORMAT_FIXED,
    PHYSICALDISKIMAGEFORMAT_VHDFIXED,
    PHYSICALDISKIMAGEFORMAT_VHDDYNAMIC,
    PHYSICALDISKIMAGEFORMAT_VMDKFIXED,
    PHYSICALDISKIMAGEFORMAT_VMDKDYNAMIC
);


// Create image of a physical disk of a virtual file

{BOOL WIMAAPI CreatePhysicalDiskImage(HWND hWnd,DWORD dwDisk,LPCSTR lpFn,PHYSICALDISKIMAGEFORMAT PhysFormat);
}
function CreatePhysicalDiskImage(hWnd: HWND;
                      dwDisk: LongInt;
                      lpFn: PChar;
                      PhysFormat: TWIMPHYSICALDISKIMAGEFORMAT): Bool;
               stdcall; external WimaDllName name 'CreatePhysicalDiskImage';

{BOOL WIMAAPI CreatePhysicalDiskImageCB(HWND hWnd,EVENTNOTIFCALLBACK pEventNotifCallBack,LPVOID lpUsrParam,
                                       DWORD dwDisk,LPCSTR lpFn,PHYSICALDISKIMAGEFORMAT PhysFormat);
}
function CreatePhysicalDiskImageCB(hWnd: HWND;
                      pEventNotifCallBack: TWIMACALLBACK;
                      lpUsrParam: Pointer;
                      dwDisk: LongInt;
                      lpFn: PChar;
                      PhysFormat: TWIMPHYSICALDISKIMAGEFORMAT): Bool;
               stdcall; external WimaDllName name 'CreatePhysicalDiskImageCB';

{BOOL WIMAAPI RestorePhysicalDiskImage(HWND hWnd,DWORD dwDisk,LPCSTR szFile);
}
function RestorePhysicalDiskImage(hWnd: HWND;
                      dwDisk: LongInt;
                      szFile: PChar): Bool;
               stdcall; external WimaDllName name 'RestorePhysicalDiskImage';

{BOOL WIMAAPI RestorePhysicalDiskImageCB(HWND hWnd,EVENTNOTIFCALLBACK pEventNotifCallBack,LPVOID lpUsrParam,
                                        DWORD dwDisk,LPCSTR szFile);
}
function RestorePhysicalDiskImageCB(hWnd: HWND;
                      pEventNotifCallBack: TWIMACALLBACK;
                      lpUsrParam: Pointer;
                      dwDisk: LongInt;
                      szFile: PChar): Bool;
               stdcall; external WimaDllName name 'RestorePhysicalDiskImageCB';

{BOOL WIMAAPI ConvertVhdImgFileName(HWND hWnd,LPCSTR szFileRead,LPCSTR lpFilenameParamWrite,PHYSICALDISKIMAGEFORMAT PhysFormat);
}
function ConvertVhdImgFileName(hWnd: HWND;
                      szFileRead: PChar;
                      lpFilenameParamWrite: PChar;
                      PhysFormat: TWIMPHYSICALDISKIMAGEFORMAT): Bool;
               stdcall; external WimaDllName name 'ConvertVhdImgFileName';

{BOOL WIMAAPI ConvertVhdImgFileNameCB(HWND hWnd,EVENTNOTIFCALLBACK pEventNotifCallBack,LPVOID lpUsrParam,
                                     LPCSTR szFileRead,LPCSTR lpFilenameParamWrite,PHYSICALDISKIMAGEFORMAT PhysFormat);
}
function ConvertVhdImgFileNameCB(hWnd: HWND;
                      pEventNotifCallBack: TWIMACALLBACK;
                      lpUsrParam: Pointer;
                      szFileRead: PChar;
                      lpFilenameParamWrite: PChar;
                      PhysFormat: TWIMPHYSICALDISKIMAGEFORMAT): Bool;
               stdcall; external WimaDllName name 'ConvertVhdImgFileNameCB';


implementation

end.

⌨️ 快捷键说明

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