Seite 1 von 1

Erstellung von SQX-Archiven (sqx20.dll)

Verfasst: 07.06.2006 20:24
von javabean
Hallo,

ich spiele gerade etwas mit der "sqx20.dll" (zur Erstellung von .sqx-Archiven) herum. Aber irgendwie will es mir nicht gelingen ein SQX-Archiv zu erstellen oder zu entpacken. Ich weiß nicht woran es liegt - vielleicht hab' ich auch eine Struktur (siehe SQX_Const.pb) falsch übersetzt.

Einige Download-Links:
- DLL und Dokumentation (275 kB)
- SQX_Const.pb (20 kB)
- vollständige SQX-SDK (1.2 MB)

Hier sind meine mikrigen Versuche:

Code: Alles auswählen

XIncludeFile "SQX_Const.pb"


Procedure SqxCallback(pParam, pCallbackInfo)

EndProcedure

comp.SQX_COMPRESSOPTIONS

  comp\cbSize = SizeOf(SQX_COMPRESSOPTIONS)
  comp\dwFileFormat = #SQX_FILEFORMAT_20
  
  comp\compOptions\dwCompRate = #SQX_COMPRATE_MAXIMIUM
  comp\compOptions\dwDictionarySize = #SQX_DICTIONARY_4M
  comp\compOptions\fSolidFlag = #True
  
  comp\compOptions\dwExeCompression = #SQX_SPECIALCOMP_AUTOMATIC
  comp\compOptions\dwRgbCompression = #SQX_SPECIALCOMP_AUTOMATIC
  comp\compOptions\dwTextCompression = #SQX_SPECIALCOMP_AUTOMATIC
  comp\compOptions\dwAudioCompression = #SQX_SPECIALCOMP_AUTOMATIC
  comp\compOptions\dwMultimediaCompression = #SQX_SPECIALCOMP_AUTOMATIC
  
  comp\fRetainFolderStructure = #True
  


OpenLibrary(0,"sqx20.dll")

ArchiveName$ ="C:\SqxTest.sqx"

Debug CallFunction(0,"SqxInitArchive",@ArchiveName$,0,0,@hArch)

hFileList = CallFunction(0,"SqxInitFileList",hArch)
Debug hFileList

CompFile$ = "C:\PureBasic_v4.0.chm"
CallFunction(0,"SqxAppendFileList",hArch,hFileList,@CompFile$)

para.l = 4
CallFunction(0,"SqxCompressFiles",hArch,@SqxCallback(),@para,hFileList,@comp)
Vielleicht weiß jemand von Euch woran's liegen könnte?

LG, javabean

Verfasst: 08.06.2006 04:45
von edel
CallFunction(0,"SqxCompressFiles",hArch,@SqxCallback(),@para,hFileList,@comp)

Gibt hier "SQX_ERR_BAD_PARAMETER 48 The parameter is incorrect. " aus .

Vielleicht solltest du da nochmal nachschauen.

Verfasst: 29.01.2007 09:10
von ts-soft