OK Schreiben in eine EXE Datein:
Delphi-Quellcode:
ExtraResManager.AddFile(edSoundFileName.Text, 1, 'Sound');
ExtraResManager.AddFile(edLogoFileName.Text, 2, 'Logo');
ExtraResManager.AddFile(ExtractFilePath(Application.ExeName) + cboxLanguages.Text + '.lng', 3, 'Language');
ExtraResManager.SaveToEXEFile(FolderDialog.Directory + '\Anwendung.exe');
Lesen aus der EXE (sichselber):
Delphi-Quellcode:
If ExtraResManager.HasExtraResources(Application.ExeName) Then
begin
ExtraResManager.LoadFromEXEFile(Application.ExeName);
For I:=0 To ExtraResManager.Resources.Count - 1 Do
begin
If ExtraResManager.Resources.Items[I].ResName = 'Sound' Then
ExtraResManager.Resources.Items[I].SaveToFile('C:\sound.wav')
else
If ExtraResManager.Resources.Items[I].ResName = 'Logo' Then
ExtraResManager.Resources.Items[I].SaveToFile('C:\logo.bmp')
else
If ExtraResManager.Resources.Items[I].ResName = 'Language' Then
ExtraResManager.Resources.Items[I].SaveToFile('C:\language.lng');
end;
end;