cab10.dll Cabarchive erstellen
Verfasst: 03.07.2007 20:25
Da das so schön im InstallForge thread besprochen wird, dachte ich mal, ich poste das hier rein:
Download: http://oregonstate.edu/~reeset/html/oth ... /cab10.dll
Beispiel:
Download: http://oregonstate.edu/~reeset/html/oth ... /cab10.dll
Beispiel:
Code: Alles auswählen
If OpenLibrary(2,"cab10.dll")
CabAbout =GetFunction(2,"CABABOUT")
CabCompressInitialize =GetFunction(2,"CABCOMPRESSINITIALIZE")
CabDecompressInitialize =GetFunction(2,"CABDECOMPRESSINITIALIZE")
CabCreate =GetFunction(2,"CABCREATE")
CabAddFile =GetFunction(2,"CABADDFILE")
CabClose =GetFunction(2,"CABCLOSE")
CabEnum =GetFunction(2,"CABENUM")
CabExtract =GetFunction(2,"CABEXTRACT")
CabCompressTerminate =GetFunction(2,"CABCOMPRESSTERMINATE")
CabDecompressTerminate =GetFunction(2,"CABDECOMPRESSTERMINATE")
Else
MessageRequester("Error","Could not load cab10.dll!",#MB_ICONERROR)
End
EndIf
Procedure.s CabAbout()
Shared CabAbout.l
ProcedureReturn PeekS(CallFunctionFast(CabAbout))
EndProcedure
Procedure.l CabCompressInitialize()
Shared CabCompressInitialize.l
ProcedureReturn CallFunctionFast(CabCompressInitialize)
EndProcedure
Procedure.l CabCreate(Destination.s)
Shared CabCreate.l
ProcedureReturn CallFunctionFast(CabCreate, Destination)
EndProcedure
Procedure.l CabAddFile(hCab, Source.s, Destination.s)
Shared CabAddFile.l
ProcedureReturn CallFunctionFast(CabAddFile, hCab, Source, Destination)
EndProcedure
Procedure.l CabClose(hCab.l)
Shared CabClose.l
ProcedureReturn CallFunctionFast(CabClose, hCab)
EndProcedure
Procedure.l CabCompressTerminate()
Shared CabCompressTerminate.l
ProcedureReturn CallFunctionFast(CabCompressTerminate)
EndProcedure
CabFileName.s="C:/cabinet.cab"
File.s="C:/data.dat"
If CabCompressInitialize()
CabFile = CabCreate(CabFileName)
If CabFile
CabAddFile(CabFile, File,File)
CabClose(CabFile)
EndIf
CabCompressTerminate()
EndIf