Luiz Americo Pereira Camara wrote:
I want to store a utf-16 encoded file in a Lazarus resource file and than load as a Stream.

I already did the first step (create the lrs file with lazres) now i want to load the file in a stream.
Does someone know how i can do that?

maybe so:

function GetResourceStream(ResourceName: String): TStream;
var
  Res: TLResource;
begin
  Res := LazarusResources.Find(ResourceName);
  if (Res <> nil) and (Res.Value <> '') then
  begin
    Result := TMemoryStream.Create;
    ResultWrite(Res.Value[1], length(Res.Value));
    ResultPosition := 0;
  end;
end;

--
Best regards,
Paul Ishenin.

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to