Autor Beitrag
XPert
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 129

Windows 98/00/Me/XP
D6 Pers
BeitragVerfasst: Mo 27.01.03 20:45 
Hi Leute,
jetzt kommt 'ne etwas größere Frage:

Wie kann ich mit .cab-Dateien arbeiten?
ich weiß, dass man die nur einmal erstellen kann, aber wie kann ich mit delphi eine default.cab mit den dateien 1.txt 7.exe 4.htm 8.lnk füllen?

halt so grundsätzlicher umgang mit cabinet'S.......

_________________
MfG Fabian Schweers :lol:
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mo 27.01.03 21:26 
schau dir mal das tut hier an:
www.tutorials.delphi-source.de/cabinet/

_________________
In the beginning was the word.
And the word was content-type: text/plain.
XPert Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 129

Windows 98/00/Me/XP
D6 Pers
BeitragVerfasst: Mo 27.01.03 21:39 
hey danke für die hilfe, aber ich suche jemanden der mir das RICHTIG erklären kann.......
kann mir denn keiner hier mal einfach source geben mit dem ich eine einfache cabinet erstelle, die zwei dateien nachher enthalten soll????
:autsch:
:o)

_________________
MfG Fabian Schweers :lol:
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Di 28.01.03 00:56 
Ganz so einfach ist das nicht. In Deinem Fall würde ich Dir empfehlen mal bei Torry vorbei zu schauen und eine Komponente für Cab´s zu suchen. Da sind auf jeden Fall ein paar dabei! Mit hilfe dieser Komponenten ist das Arbeiten mit Cab-Dateien auch relativ einfach.

Gruß
TINO
XPert Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 129

Windows 98/00/Me/XP
D6 Pers
BeitragVerfasst: Di 28.01.03 19:55 
Schlusssatz:

Wenn man mit CabFiles (Cabinet-Dateien) arbeiten will/muss, sollte sich die Komponente von folgender Seite saugen gehen:

aravilsoft.tripod.com

Direkter Download-Link:

aravilsoft.tripod.com/cabd120.zip

_________________
MfG Fabian Schweers :lol:
n0000b
Hält's aus hier
Beiträge: 3



BeitragVerfasst: Di 19.08.03 14:47 
Das Topic is alt, aber bevor ich ein neues aufmach ^^
Also hab auch die Komponente, die weiter unten genannt ist und sie funzt auch gut.
Nur mit dem IsCabinet komm ich net klar (*ist ein noob*)
Zitat:
function IsCabinet(const aFileName: String;
var aCabInfo: TFDICABINETINFO): Boolean;

das is die Funktion und so ruf ich die auf
Zitat:
TSTCabReader.IsCabinet(regpfad + '\anim.idx',test)

Dann muss man für das test dingens nen neuen Typ machen (TFDICABINETINFO)
So das steht dann auch in der Hilfe drin
Zitat:
type
TFDICABINETINFO = record
cbCabinet: Longint; // Total length of cabinet file
cFolders: USHORT; // Count of folders in cabinet
cFiles: USHORT; // Count of files in cabinet
setID: USHORT; // Cabinet set ID
iCabinet: USHORT; // Cabinet number in set (0 based)
fReserve: WIN_BOOL; // TRUE => RESERVE present in cabinet
hasprev: WIN_BOOL; // TRUE => Cabinet is chained prev
hasnext: WIN_BOOL; // TRUE => Cabinet is chained next
end;

PFDICABINETINFO = ^TFDICABINETINFO;

So alles eingefügt, variable noch zugewiesen und dann:
[Error] Updatefm.pas(149): Undeclared identifier: 'USHORT'
[Error] Updatefm.pas(153): Undeclared identifier: 'WIN_BOOL'
So und was mach ich jetzt???
ICh hoff ihr könnt helfen. Hab Delphi7. Aja und aus win_bool boolean zumachen bzw. aus ushort real oder so: das funzt au net
barfuesser
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 324



BeitragVerfasst: Di 19.08.03 16:44 
Hallo,
n0000b hat folgendes geschrieben:

[Error] Updatefm.pas(149): Undeclared identifier: 'USHORT'
[Error] Updatefm.pas(153): Undeclared identifier: 'WIN_BOOL'

versuch mal 'Word' statt 'USHORT' und 'Boolean' statt 'WIN_BOOL'.

[edit]Ich glaub, ich habe den letzten Satz in Deinem Posting überlesen :oops: [/edit]

barfuesser
n0000b
Hält's aus hier
Beiträge: 3



BeitragVerfasst: Di 19.08.03 17:06 
hmm.. jetzt hab ich in uses die pas von dem cabreader reingeschreiben und jetzt funzt schon ma mehr...
NUR
Zitat:
if TSTcabReader.IsCabinet(regpfad + '\anim.idx', aCabInfo) = true
then

Norma müsste das gehn, aber er gibt dann den fehler aus
Zitat:
[Error] Updatefm.pas(308): This form of method call only allowed for class methods



EDIT:
Aja gibts viellecht noch ne andere Möglichkeit zu schaun ob ne datei ne cab datei is???
EDIT2: Jetzt hab ichs ;)
Zitat:
if STCabReader1.IsCabinet(regpfad + '\anim.idx', aCabInfo) = true
then

so muss es sein