10 Years
Discussion Span
Last Post by jwenting

Ok thanks for the advice. I has already check out delphi.about.com and found some usefull tips an tricks, but
there is nothing on using and re-using a resource within a DLL.

There are examples an using BMP's and WAV's, even extracting the file to the work Dir. This was the closest i found. but after extracting it and using it you cant get it back in.

[B]procedure[/B] TForm1.Button2Click(Sender: TObject);
rStream: TResourceStream; 
fStream: TFileStream; 
fname: [B]string[/B];
[B]{[/B][B]this is good but only goes 1way}[/B]
rStream := TResourceStream.Create(hInstance, 'Intro', RT_RCDATA);
[B]try[/B]  fStream := TFileStream.Create(fname, fmCreate);
     [B]try[/B]   fStream.CopyFrom(rStream, 0);
     [B]finally[/B]   fStream.Free;  
  [B]finally[/B]  rStream.Free; 

this is great to get it out and use it once off.

I need to reuse it and keep it in???:sad:

The other thing i found was a stringtable. once again you can read from it but not write to it.

Perhaps i got the wrong idea of a what Im tring to do. maybe some one has a better idea of how to keep information in a secure way. (reading and Writing)


Do you have ANY grasp at all about what a DLL is?

If you did you'd know that what you want simply isn't going to work.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.