Can anybody help me with the CAB-DLL. I've heard that one can create and extract CAB-Archives with it and I found something on that. This is the download-link: http://download.microsoft.com/download/platformsdk/cab/2.0/w98nt42kmexp/en-us/Cabsdk.exe

In the examples anything is written in C I think and it would be great if somebody can help me with translating it and/or give any other information about the CAB-DLL.

thx in advance
Posted on 2003-10-10 06:30:25 by ChigpA
Well i once got it working on vb, but i guess the c source will be easier to translate.
What i can tell you to save some time (took me a while to figure out, and then ages trying to fix it from within vb) is that the functions use C calling method (ie you need to clean up the stack yourself).

These are the vb structures and api calls:

Private Type FdiCabinetInfo
CabinetSize As Long
NrFolders As Integer
NrFiles As Integer
SetID As Integer
CabinetNumber As Integer
Reserved As Long
HasPrev As Long
HasNext As Long
End Type
Private Type FdiErrorStruct
Code As Long
Type As Long
IsError As Long
End Type
Private Type FdiNotifyStruct
FileSize As Long
String1 As Long
String2 As Long
String3 As Long
UserData As Long
hFile As Long
Date As Integer
Time As Integer
Attribs As Integer
CabID As Integer
CabNumber As Integer
FolderNumber As Integer
FdiError As Long
End Type

' _cdecl api's, call indirectly
'Private Declare Function FDICreate Lib "cabinet" (ByVal MemAllocFunc As Long, ByVal MemFreeFunc As Long, ByVal FileOpenFunc As Long, ByVal FileReadFunc As Long, ByVal FileWriteFunc As Long, ByVal FileCloseFunc As Long, ByVal FileSeekFunc As Long, ByVal CPUType As Long, FdiError As FdiErrorStruct) As Long
'Private Declare Function FDIIsCabinet Lib "cabinet" (ByVal hFdi As Long, ByVal hFile As Long, CabinetInfo As FdiCabinetInfo) As Long
'Private Declare Function FDICopy Lib "cabinet" (ByVal hFdi As Long, ByVal CabinetName As String, ByVal CabinetPath As String, ByVal Flags As Long, ByVal MsgHandler As Long, ByVal DecryptHandler As Long, UserData As Any) As Long
'Private Declare Function FDIDestroy Lib "cabinet" (ByVal hFdi As Long) As Long
Posted on 2003-10-11 02:04:19 by Joshua