Okay...I must've been having a blonde moment, because I totally screwed that up.
The component I mentioned really DOES attach files into your main executable, but the catch is you have to do it at design time by double-clicking on the component and selecting the file you want to attach. And...
It's not in memory. The file gets physically attached to your main executable when you call DataLoadFromFile, and it remains there permanently. And then when you need to extract the file, you call the DataSaveToFile procedure and it extracts the file to your hard drive.
Sorry about the late reply. The last couple of days have been crazy for me.
Okay, so back to your problem. The easiest solution (by far) is this:
procedure TForm1.Button1Click(Sender: TObject);
begin
// store the target file inside your main application...
Okay, fair enough..
It's late at night where I am, so I'm off to bed in a few minutes, but I'll post something for you tomorrow. It's actually not that difficult, but when you're trying to do it for the very first time, it can seem daunting.
Why is it so important that your main executable contain the packaged file? Your problem could be solved so easily if you simply distributed the packaged file as a secondary file, and have the main program call it when necessary.
If it makes you feel any better, you're both wrong about string lengths :P
In Delphi, the maximum string length is restricted by the 2 GB stack limit. That means that no string type can ever exceed 2 GB (31-bit).
For AnsiString, the maximum length is 31-bit (2 billion characters because each...
I know your post is 3 weeks old already, but in case you didn't solve the problem yet, the reason for your problem is because you aren't handling the Client.WriteInteger command at the server.
So basically you're writing two things to the server (the integer and the stream), but the server is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.