📄 wimadll.bas
字号:
Declare Function CreateMemFatHima Lib "wimadll.dll" () As Long
' CreateMemHfsHima : Create an Image Object for Mac floppy.
' you need call ReadImaFile, ReadFloppy
' extract, inject... cannot be used
Declare Function CreateMemHfsHima Lib "wimadll.dll" () As Long
' CreateCDIsoIma : Create an Image Object by loading CDRom ISO image
' lpFn : Filename of .ISO file
' inject,...cannot be used
Declare Function CreateCDIsoIma Lib "wimadll.dll" (ByVal lpFn As String) As Long
' OpenFatLargeFile : Open a large disk image (hard disk image)
' hWnd : parent window for progress window
' lpFn : FileName
' dwPosFileBegin : position in file (usualy 0)
' dwPosFileBegin : position in file, high (usualy 0), for file > 4GB
' fReadOnlyAsked : if the file must be opened in read-only mode
'HIMA WIMAAPI OpenFatLargeFile(HWND hWnd,LPCSTR lpFn,DWORD dwPosInFile,DWORD dwPosInFileHigh,BOOL fReadOnlyAsked);
'HIMA WIMAAPI OpenFatLargeFileCB(HWND hWnd,EVENTNOTIFCALLBACK pEventNotifCallBack,LPVOID lpUsrParam,
' LPCSTR lpFn,DWORD dwPosInFile,DWORD dwPosInFileHigh,BOOL fReadOnlyAsked);
Declare Function OpenFatLargeFile Lib "wimadll.dll" (ByVal hWnd As Long, _
ByVal lpFn As String, ByVal dwPosInFile As Long, ByVal dwPosInFileHigh As Long, _
ByVal fReadOnlyAsked As Boolean) As Long
Declare Function OpenFatLargeFileCB Lib "wimadll.dll" (ByVal hWnd As Long, _
ByVal pEventNotifCallBack As Long, ByVal lpUsrParam As Long, _
ByVal lpFn As String, ByVal dwPosInFile As Long, ByVal dwPosInFileHigh As Long, _
ByVal fReadOnlyAsked As Boolean) As Long
' DeleteIma : Delete an Image Object.
Declare Sub DeleteIma Lib "wimadll.dll" (ByVal Ima As Long)
' ReadImaFile: 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)
Declare Function ReadImaFile Lib "wimadll.dll" (ByVal Ima As Long, ByVal hWnd As Long, _
ByVal lpFn As String, lpfCompr As Boolean, ByVal dwPosFileBegin As Long) As Boolean
Declare Function ReadImaFileEx Lib "wimadll.dll" (ByVal Ima As Long, ByVal hWnd As Long, _
ByVal lpFn As String, lpfCompr As Boolean, ByVal dwPosFileBegin As Long, _
ByVal lpszPassword As String) As Boolean
Declare Function ReadImaFileExCB Lib "wimadll.dll" (ByVal Ima As Long, ByVal hWnd As Long, _
ByVal pEventNotifCallBack As Long, ByVal lpUsrParam As Long, _
ByVal lpFn As String, lpfCompr As Boolean, ByVal dwPosFileBegin As Long, _
ByVal lpszPassword As String) As Boolean
' 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)
Declare Function WriteImaFile Lib "wimadll.dll" (ByVal Ima As Long, ByVal hWnd As Long, _
ByVal lpFn As String, ByVal fTruncate As Boolean, ByVal fCompr As Boolean, _
ByVal iLevelCompress As Long, ByVal dwPosBeginWrite As Long, _
ByVal lpNameInCompr As String) As Boolean
Declare Function WriteImaFileEx Lib "wimadll.dll" (ByVal Ima As Long, ByVal hWnd As Long, _
ByVal lpFn As String, ByVal fTruncate As Boolean, ByVal fCompr As Boolean, _
ByVal iLevelCompress As Long, ByVal dwPosBeginWrite As Long, _
ByVal lpNameInCompr As String, ByVal lpszPassword As String) As Boolean
Declare Function WriteImaFileExCB Lib "wimadll.dll" (ByVal Ima As Long, ByVal hWnd As Long, _
ByVal pEventNotifCallBack As Long, ByVal lpUsrParam As Long, _
ByVal lpFn As String, ByVal fTruncate As Boolean, ByVal fCompr As Boolean, _
ByVal iLevelCompress As Long, ByVal dwPosBeginWrite As Long, _
ByVal lpNameInCompr As String, ByVal lpszPassword As String) As Boolean
' 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)
' BOOL WIMAAPI ReadFloppy(HIMA hIma,HWND hWnd,BYTE bFloppy,CHOICEAPP caRead);
Declare Function ReadFloppy Lib "wimadll.dll" (ByVal Ima As Long, ByVal hWnd As Long, _
ByVal bFloppy As Byte, ByVal caRead As Long) As Boolean
Declare Function ReadFloppyCB Lib "wimadll.dll" (ByVal Ima As Long, ByVal hWnd As Long, _
ByVal pEventNotifCallBack As Long, ByVal lpUsrParam As Long, _
ByVal bFloppy As Byte, ByVal caRead As Long) As Boolean
' 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
'BOOL WIMAAPI WriteFloppy(HIMA hIma,HWND hWnd,BYTE bFloppy,CHOICEAPP caFormat,
' CHOICEAPP caWrite,CHOICEAPP caCompare,
' BYTE fCheckDiskBeforeWrite);alias
Declare Function WriteFloppy Lib "wimadll.dll" (ByVal Ima As Long, _
ByVal hWnd As Long, ByVal bFloppy As Byte, _
ByVal caFormat As Long, ByVal caWrite As Long, ByVal caCompare As Long, _
ByVal fCheckDiskBeforeWrite As Byte) As Boolean
Declare Function WriteFloppyCB Lib "wimadll.dll" (ByVal Ima As Long, _
ByVal hWnd As Long, _
ByVal pEventNotifCallBack As Long, ByVal lpUsrParam As Long, _
ByVal bFloppy As Byte, _
ByVal caFormat As Long, ByVal caWrite As Long, ByVal caCompare As Long, _
ByVal fCheckDiskBeforeWrite As Byte) As Boolean
' Create a directory in the image
' lpDir : Directory name
' BOOL WIMAAPI MkDir(HIMA hIma,LPSTR lpDir);
Declare Function MkDir Lib "wimadll.dll" (ByVal Ima As Long, ByVal lpDir As String) As Boolean
' Change current directory by name
' lpDir : Directory name
' BOOL WIMAAPI ChszDir(HIMA hIma,LPSTR lpDir);
Declare Function ChszDir Lib "wimadll.dll" (ByVal Ima As Long, ByVal lpDir As String) As Boolean
' Change current directory by mode
' bMode : CDM_ROOT or CDM_UPPER (equiv. to cd \ and cd ..)
' BOOL WIMAAPI ChDir(HIMA hIma,BYTE bMode);
Declare Function ChDir Lib "wimadll.dll" (ByVal Ima As Long, ByVal bMode As Byte) As Boolean
' 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.
' for the CB version, the only event is DWEV_PROGRESSPERCENT
'BOOL WIMAAPI InjectFile(HIMA hIma,LPSTR lpFn,
' LPDWORD lpDwSize,LPBOOL lpTooBig,
' LPSTR lpNameWhenInjected);
Declare Function InjectFile Lib "wimadll.dll" (ByVal Ima As Long, ByVal lpFn As String, _
lpdwSize As Long, lpTooBig As Boolean, ByVal lpNameWhenInjected As String) As Boolean
Declare Function InjectFileCB Lib "wimadll.dll" (ByVal Ima As Long, _
ByVal pEventNotifCallBack As Long, ByVal lpUsrParam As Long, _
ByVal lpFn As String, _
lpdwSize As Long, lpTooBig As Boolean, ByVal lpNameWhenInjected As String) As Boolean
' 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 ! :-))
'BOOL WIMAAPI MakeEmptyImage(HIMA hIma,int iNoTypeDisk);
Declare Function MakeEmptyImage Lib "wimadll.dll" (ByVal Ima As Long, ByVal iNoTypeDisk As Long) As Boolean
Declare Function MakeEmptyImageEx Lib "wimadll.dll" (ByVal Ima As Long, _
ByVal lpszBootSectorGeom As String,ByVal lpszBootSectorCode As String) As Boolean
Declare Function BuildImaNewFormat Lib "wimadll.dll" (ByVal hOldIma As Long,fNewTypeDisk As Boolean,ByVal iNoTypeDisk As Long) As Long
Declare Function BuildImaNewFormatEx Lib "wimadll.dll" (ByVal hOldIma As Long,ByVal hNewIma As Long, _
ByVal lpszBootSectForGeometry As String,ByVal fDiscardOldIma As Boolean) As Boolean
Declare Function BuildImaNewFormatExCB Lib "wimadll.dll" (ByVal hOldIma As Long,ByVal hNewIma As Long, _
ByVal pEventNotifCallBack As Long, ByVal lpUsrParam As Long, _
ByVal lpszBootSectForGeometry As String,ByVal fDiscardOldIma As Boolean) As Boolean
' InitWimaSdk : Init the DLL and use hinstdll for resource
'#define DEBENUSTD "ENU"
' #define BASEENUSTD (10000)
Const DEBENUSTD = "ENU"
Const BASEENUSTD = (10000)
' BOOL WIMAAPI InitWimaSdk(HINSTANCE hinstdll,LPSTR lpDeb,WORD wBase);
Declare Function InitWimaSdk Lib "wimadll.dll" (ByVal hinstdll As Long, ByVal lpDeb As String, _
ByVal wBase As Integer) As Boolean
' GetCurDir : Get the name of current directory
' lpBuf : buffer that will receive the name
' uiMaxSize : the size of buffer
' BOOL WIMAAPI GetCurDir(HIMA hIma,LPSTR lpBuf,UINT uiMaxSize);
Declare Function GetCurDir Lib "wimadll.dll" (ByVal Ima As Long, ByVal lpBuf As String, _
ByVal uiMaxSize As Long) As Boolean
' GetNbEntryCurDir : Get the number of entry of cur directory
' DWORD WIMAAPI GetNbEntryCurDir(HIMA hIma);
Declare Function GetNbEntryCurDir Lib "wimadll.dll" (ByVal Ima As Long) As Long
' 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)
' BOOL WIMAAPI GetDirInfo(HIMA hIma,LPDIRINFO lpdi,BYTE bSort);
'' GetDirInfo and Sort MUST BE CHECKED IN BASIC!!!
Declare Function GetDirInfo Lib "wimadll.dll" (ByVal Ima As Long, di As DIRINFO, ByVal bSort As Byte) As Boolean
' Sort : Resort the array obtained by GetDirInfo
'BOOL WIMAAPI Sort(HIMA hIma,LPDIRINFO lpdi,BYTE bSort);
Declare Function Sort Lib "wimadll.dll" (ByVal Ima As Long, di As DIRINFO, ByVal bSort As Byte) As Boolean
' GetLabel : Get the label of Image
' lpBuf : will receive the label
'BOOL WIMAAPI GetLabel(HIMA hIma,LPSTR lpBuf);
Declare Function GetLabel Lib "wimadll.dll" (ByVal Ima As Long, ByVal lpDir As String) As Boolean
' SetLabel : Set the label of Image
' lpBuf : contain the new label
' BOOL WIMAAPI SetLabel(HIMA hIma,LPSTR lpBuf);
Declare Function SetLabel Lib "wimadll.dll" (ByVal Ima As Long, ByVal lpDir As String) As Boolean
' 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
'BOOL WIMAAPI ExtractFile(HIMA hIma,UINT uiPosDir,LPSTR lpPath,LPSTR lpFullName);
' for the CB version, the only event is DWEV_PROGRESSPERCENT
Declare Function ExtractFile Lib "wimadll.dll" (ByVal Ima As Long, ByVal uiPosDir As Long, _
ByVal lpPath As String, ByVal lpFullName As String) As Boolean
Declare Function ExtractFileCB Lib "wimadll.dll" (ByVal Ima As Long, _
ByVal pEventNotifCallBack As Long, ByVal lpUsrParam As Long, _
ByVal uiPosDir As Long, _
ByVal lpPath As String, ByVal lpFullName As String) As Boolean
' CheckSpaceForFile : Check you've space for inject a file of dwSize bytes
' BOOL WIMAAPI CheckSpaceForFile(HIMA hIma,DWORD dwSize);
Declare Function CheckSpaceForFile Lib "wimadll.dll" (ByVal Ima As Long, ByVal dwSize As Long) As Boolean
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -