?? wimadll.h
字號(hào):
// 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
#ifndef ERRINFO_MOVEFILE_DESTINATIONEQUALSOURCE
#define ERRINFO_MOVEFILE_DESTINATIONEQUALSOURCE ((DWORD)(0x80000001UL))
#define ERRINFO_MOVEFILE_DESTINATIONSUBFOLERDEPL ((DWORD)(0x80000002UL))
#endif
BOOL WIMAAPI MoveFileToDir(HIMA hIma,LPCSTR lpName,LPCSTR lpExt,LPCSTR lpszDestDir,
LPBOOL lpfReplaceNeeded,BOOL fDoRealMove,BOOL fDoReplaceIfNeeded,
LPDWORD lpdwErrInfo);
// RenameFile : Rename one file
// uiPosDir : The uiPosInDir fields in DIRINFO structure that describe
// the file
// lpNewLongName: The new name of the file
BOOL RenameFile(HIMA hIma,UINT uiPosDir,LPCSTR lpNewLongName);
// 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...)
BOOL ChangeDateAndAttribute(HIMA hIma,UINT uiPosDir,LPBYTE lpbNewAttr,
LPWORD lpNewDosDate,LPWORD lpNewDosTime,
LPBYTE lpbNewdir_CreateMSec,
LPWORD lpwNewdir_CreateTime,LPWORD lpwNewdir_CreateDate,
LPWORD lpwNewdir_LastAccessDate);
// ReadData : Direct read data in image.
// dwPos : begin position
// dwSize : number of byte to copy (size of buffer)
// lpBuf : buffer that will receive data
BOOL WIMAAPI ReadData(HIMA hIma,DWORD dwPos,DWORD dwSize,LPSTR lpBuf);
// 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
BOOL WIMAAPI WriteData(HIMA hIma,DWORD dwPos,DWORD dwSize,LPCSTR lpBuf);
/* */
//
// 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);
// GetDriveInfo : Get info about drive type
// bDrive : number of driver (0 = 'A:', 1 = 'B:')
// return the kind of drive
DRIVEINFO WIMAAPI GetDriveInfo(BYTE bDrive);
typedef struct
{
DWORD dwSizeStruct;
DWORD dwHost;
DWORD dwTargetID;
DWORD dwTargetType;
char szDeviceName[32];
} ASPIINQUIRYTAB;
// 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);
// 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);
// 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);
BOOL WIMAAPI WimLargeReadAspiCDImageIgnoreErrorCB(HWND hWnd,EVENTNOTIFCALLBACK pEventNotifCallBack,LPVOID lpUsrParam,
DWORD dwHost,DWORD dwTargetID,
LPSTR lpFn,LPDWORD lpdwTotal,BOOL fIgnoreError);
// return value != 0 if WimLargeReadLargeIma can be used with CDRom
// (elsewhere, only hard disk partition)
DWORD WIMAAPI 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);
BOOL WIMAAPI WimLargeReadLargeImaCB(HWND hWnd,EVENTNOTIFCALLBACK pEventNotifCallBack,LPVOID lpUsrParam,
char cDrive,LPSTR lpFn,LPDWORD lpdwTotal,CHOICEAPP caRead);
BOOL WIMAAPI WimLargeReadLargeImaEx(HWND hWnd,char cDrive,LPSTR lpFn,
LPDWORD lpdwTotal,LPDWORD lpdwTotalHigh,CHOICEAPP caRead);
BOOL WIMAAPI WimLargeReadLargeImaCBEx(HWND hWnd,EVENTNOTIFCALLBACK pEventNotifCallBack,LPVOID lpUsrParam,
char cDrive,LPSTR lpFn,
LPDWORD lpdwTotal,LPDWORD lpdwTotalHigh,CHOICEAPP caRead);
// Write Disk partition from image
// cDrive : disk letter ('C' for disk C:...)
// lpdwTotal : will receive number of byte processed
// lpdwTotal : will receive high part of 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);
BOOL WIMAAPI WimLargeWriteLargeImaCB(HIMA hIma,
HWND hWnd,EVENTNOTIFCALLBACK pEventNotifCallBack,LPVOID lpUsrParam,
char cDrive,LPDWORD lpdwTotal,
CHOICEAPP caWrite,BOOL fCheckDiskBeforeWriteThis);
BOOL WIMAAPI WimLargeWriteLargeImaEx(HIMA hIma,HWND hWnd,char cDrive,
LPDWORD lpdwTotal,LPDWORD lpdwTotalHigh,
CHOICEAPP caWrite,BOOL fCheckDiskBeforeWriteThis,
BOOL fAcceptAdapt,LPBOOL lpfGeometryIncompatible);
BOOL WIMAAPI WimLargeWriteLargeImaCBEx(HIMA hIma,
HWND hWnd,EVENTNOTIFCALLBACK pEventNotifCallBack,LPVOID lpUsrParam,
char cDrive,LPDWORD lpdwTotal,LPDWORD lpdwTotalHigh,
CHOICEAPP caWrite,BOOL fCheckDiskBeforeWriteThis,
BOOL fAcceptAdapt,LPBOOL lpfGeometryIncompatible);
// say if a letter if a CDRom
BOOL WIMAAPI WimLargeIsIsoCDDrive(char cDrive);
// Write the boot sector of an image
BOOL WIMAAPI WriteSectBoot(HIMA hIma,const BYTE* lpBuf,DWORD dwSizeBuf);
// Read the boot sector of an image
BOOL WIMAAPI GetSectBoot(HIMA hIma,BYTE* lpBuf,DWORD dwSizeBuf,LPDWORD lpdwSizeBoot);
// Get the total size of an image
BOOL WIMAAPI GetImageSize(HIMA hIma,LPDWORD lpdwLow,LPDWORD lpdwHigh);
// Get the free space in an image
BOOL WIMAAPI GetFreeSpaceInImage(HIMA hIma,LPDWORD lpdwLow,LPDWORD lpdwHigh);
// IsFileExportableRawStandard, ExportRawStandardFile for export not .iso CDRom (like .bin) to .iso image
BOOL WIMAAPI IsFileExportableRawStandard(HIMA hIma,LPBOOL lpfUsefulExport,
LPDWORD lpdwSizeIsoFileLow,LPDWORD lpdwSizeIsoFileHigh);
BOOL WIMAAPI ExportRawStandardFile(HIMA hIma,HWND hWnd,
LPCSTR lpszIsoFileName);
BOOL WIMAAPI ExportRawStandardFileCB(HIMA hIma,HWND hWnd,EVENTNOTIFCALLBACK pEventNotifCallBack,LPVOID lpUsrParam,
LPCSTR lpszIsoFileName);
///
typedef struct
{
BYTE bActivate;
BYTE bHeadBegin;
WORD wCylSectBegin;
BYTE bType; // 0=none, 5=ext
BYTE bHeadEnd;
WORD wCylSectEnd;
DWORD dwDist;
DWORD dwSize;
} PARTITION;
typedef struct
{
PARTITION part;
DWORD dwPos;
DWORD dwPosPartition;
BOOL fIsFat32;
BOOL fIsFat;
BOOL fIsNtfs;
BOOL fIsLinux;
BYTE bDisk;
BYTE bFill[3];
} PARTDESC;
typedef PARTDESC* PPARTDESC;
#define PARTITION_DEFINED
DWORD WIMAAPI MakePartitionList(LPCSTR lpfn,LPCSTR lpszPassword,
DWORD*pdwNbPartFound,DWORD *pdwNbFat32Found,
DWORD dwArraySize,PARTDESC* pList);
DWORD WIMAAPI GetNumberPhysicalDisk();
BOOL WIMAAPI GetPhysicalDiskSizeAndInfo(DWORD dwDisk,LPDWORD lpdwSizeLow,LPDWORD lpdwSizeHigh,
LPBOOL lpfRemovable,
LPTSTR lpszUnitName,DWORD dwUnitNameSize);
typedef enum
{
PHYSICALDISKIMAGEFORMAT_UNKNOWN = 0,
PHYSICALDISKIMAGEFORMAT_FIXED,
PHYSICALDISKIMAGEFORMAT_VHDFIXED,
PHYSICALDISKIMAGEFORMAT_VHDDYNAMIC,
PHYSICALDISKIMAGEFORMAT_VMDKFIXED,
PHYSICALDISKIMAGEFORMAT_VMDKDYNAMIC,
} PHYSICALDISKIMAGEFORMAT;
// Create image of a physical disk of a virtual file
BOOL WIMAAPI CreatePhysicalDiskImage(HWND hWnd,DWORD dwDisk,LPCSTR lpFn,PHYSICALDISKIMAGEFORMAT PhysFormat);
BOOL WIMAAPI CreatePhysicalDiskImageCB(HWND hWnd,EVENTNOTIFCALLBACK pEventNotifCallBack,LPVOID lpUsrParam,
DWORD dwDisk,LPCSTR lpFn,PHYSICALDISKIMAGEFORMAT PhysFormat);
BOOL WIMAAPI RestorePhysicalDiskImage(HWND hWnd,DWORD dwDisk,LPCSTR szFile);
BOOL WIMAAPI RestorePhysicalDiskImageCB(HWND hWnd,EVENTNOTIFCALLBACK pEventNotifCallBack,LPVOID lpUsrParam,
DWORD dwDisk,LPCSTR szFile);
BOOL WIMAAPI ConvertVhdImgFileName(HWND hWnd,LPCSTR szFileRead,LPCSTR lpFilenameParamWrite,PHYSICALDISKIMAGEFORMAT PhysFormat);
BOOL WIMAAPI ConvertVhdImgFileNameCB(HWND hWnd,EVENTNOTIFCALLBACK pEventNotifCallBack,LPVOID lpUsrParam,
LPCSTR szFileRead,LPCSTR lpFilenameParamWrite,PHYSICALDISKIMAGEFORMAT PhysFormat);
#ifdef __cplusplus
}
#endif /* __cplusplus */
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -