Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   Delphi Flash in ressourcen? (https://www.delphipraxis.net/10093-flash-ressourcen.html)

citybreaker 11. Okt 2003 15:04


Flash in ressourcen?
 
Hallo!

Gibt es eine Möglichkeit eine Flashdatei
in eine Ressource File zu packen?

SirThornberry 11. Okt 2003 15:18

Re: Flash in ressourcen?
 
geht es ums reinpacken und ums dann wieder rausholen??? zum reinpacken gibts brcc32.exe im bin Verzeichnis von Delphi

citybreaker 11. Okt 2003 15:25

Re: Flash in ressourcen?
 
Sowhl als auch. Bilder und texte bekomm ich
in Ressourcen rein. Da hab ich mal den Tut gelesen.
Aber wie das mit Flash geht, kA.

SirThornberry 11. Okt 2003 15:32

Re: Flash in ressourcen?
 
HINWEIS: DER SOURCE STAMMT NICHT VON MIR SONDERN VON ASSARBAD VON DELPHI-SOURCE.DE

.rc datei erzeugen und da rein:
HookDLL BINRES "flash-datei"

die compilieren (oder wie man das nennt) mit:
brcc32 [PFAD]\main.rc

ins programm:
{$R main.res}


und dann zum extrahieren
Delphi-Quellcode:
function putbinresto(binresname: pchar; newpath: string): boolean;
var ResSize, HG, HI, SizeWritten, hFileWrite: Cardinal;
begin
  result := false;
  HI := FindResource(hInstance, binresname, 'BINRES');
  if HI <> 0 then begin
    HG := LoadResource(hInstance, HI);
    if HG <> 0 then begin
      ResSize := SizeOfResource(hInstance, HI);
      hFileWrite := CreateFile(pchar(newpath), GENERIC_READ or
      GENERIC_WRITE, FILE_SHARE_READ or FILE_SHARE_WRITE, nil,
      CREATE_ALWAYS, FILE_ATTRIBUTE_ARCHIVE, 0);
      if hFileWrite <> INVALID_HANDLE_VALUE then
      try
        result := (WriteFile(hFileWrite, LockResource(HG)^, ResSize,
        SizeWritten, nil) and (SizeWritten = ResSize));
      finally
        CloseHandle(hFileWrite);
      end;
    end;
  end;
end;

citybreaker 11. Okt 2003 15:34

Re: Flash in ressourcen?
 
Ok, dass werde ich mal dierekt ausprobieren.


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:19 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz