Board index » delphi » How to hide data (files) from users?

How to hide data (files) from users?

Hi!

I am writing an application that loads data from a comma seperated
values text file and also a few high resolution bitmaps.
Since these files hold "hard information", I don't want users to rip
them off. They should only be available to my application.

What would be a good way of hiding this data? The text file is about
500KB and the bitmaps are enormous in size. I need fast access to
them.

Thanks for your help,
Marcus

*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
Marcus Monnig - minib...@cs.tu-berlin.de - PGP Public Key on request
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~

 

Re:How to hide data (files) from users?


Quote
Marcus Monnig wrote:

> Hi!

> I am writing an application that loads data from a comma seperated
> values text file and also a few high resolution bitmaps.
> Since these files hold "hard information", I don't want users to rip
> them off. They should only be available to my application.

> What would be a good way of hiding this data? The text file is about
> 500KB and the bitmaps are enormous in size. I need fast access to
> them.

Call them .DLL and put them in system directory ;)

Erik.

--
Need a custom component? Late on a project? Could use an util?
DOS Device driver? A VxD? NT drivers or services?
Applications of any kind?
Low rates, fast delivery!

When responding to news postings, please CC a copy to my email address.
Thanks.
Erik Sperling Johansen <e...@info-pro.no>

Re:How to hide data (files) from users?


Quote
Marcus Monnig wrote:

> Hi!

> I am writing an application that loads data from a comma seperated
> values text file and also a few high resolution bitmaps.
> Since these files hold "hard information", I don't want users to rip
> them off. They should only be available to my application.

> What would be a good way of hiding this data? The text file is about
> 500KB and the bitmaps are enormous in size. I need fast access to
> them.

> Thanks for your help,
> Marcus

Create a resource file that contains the strings and images you
want to use, then use BRCC32.EXE to compile it. You can then
use {$I MyFileName.RES} to include it in your project.

This technique fills both your requirements. It prevents users
from messing with your strings and pictures, while at the same
time it gives you fairly quick and easy access to those strings
and pictures from within your program.

Delphi2 Unleashed has a small section on creating resource
files. There may be other books that go into more detail. Good
luck.

Re:How to hide data (files) from users?


On Tue, 18 Mar 1997 13:53:07 +0100, Erik Sperling Johansen

Quote
<e...@info-pro.no> wrote:
>> What would be a good way of hiding this data? The text file is about
>> 500KB and the bitmaps are enormous in size. I need fast access to
>> them.

>Call them .DLL and put them in system directory ;)

Thanks for your reply!

So that would mean that I had to load the dll and then load the bitmap
from there into a TBitmap. Would mean to block twice the resources on
loading right?

Marcus

*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
Marcus Monnig - minib...@cs.tu-berlin.de - PGP Public Key on request
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~

Re:How to hide data (files) from users?


On Tue, 18 Mar 1997 08:21:30 -0600, Edward McSweeney

Quote
<emcswee...@mayo.edu> wrote:
>Create a resource file that contains the strings and images you
>want to use, then use BRCC32.EXE to compile it. You can then
>use {$I MyFileName.RES} to include it in your project.

>This technique fills both your requirements. It prevents users
>from messing with your strings and pictures, while at the same
>time it gives you fairly quick and easy access to those strings
>and pictures from within your program.

>Delphi2 Unleashed has a small section on creating resource
>files. There may be other books that go into more detail. Good
>luck.

Thanks for your idea.

I doubt if it would be a good thing to add a few megs (not yet sure
how much exactly) to the compiled exe. Doesn't that effect the system
performance?

Marcus

*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
Marcus Monnig - minib...@cs.tu-berlin.de - PGP Public Key on request
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~

Re:How to hide data (files) from users?


Quote
In article <332fc15b.11513...@news.cs.tu-berlin.de>, minib...@cs.tu-berlin.de wrote:
>On Tue, 18 Mar 1997 13:53:07 +0100, Erik Sperling Johansen
><e...@info-pro.no> wrote:

>>> What would be a good way of hiding this data? The text file is about
>>> 500KB and the bitmaps are enormous in size. I need fast access to
>>> them.

>>Call them .DLL and put them in system directory ;)

>Thanks for your reply!

>So that would mean that I had to load the dll and then load the bitmap
>from there into a TBitmap. Would mean to block twice the resources on
>loading right?

No, just CALL them .dll and use them as an text file.

The Graphical Gome      (r...@ktibv.nl)

Senior Software Engineer

--------------------------------------------------------------------------------------------------------------
Delphi developers FAQ at http://www.gnomehome.demon.nl/uddf/index.htm
Non frame version     at  http://www.gnomehome.demon.nl/uddf/indexnf.htm

Re:How to hide data (files) from users?


Quote
Marcus Monnig wrote:
> Thanks for your idea.

> I doubt if it would be a good thing to add a few megs (not yet sure
> how much exactly) to the compiled exe. Doesn't that effect the system
> performance?

No. They will only affect the size of the EXE file. The resources
are only called into memory when you want them. They are not
loaded up front.

Re:How to hide data (files) from users?


Quote
minib...@cs.tu-berlin.de (Marcus Monnig) writes:
>On Tue, 18 Mar 1997 08:21:30 -0600, Edward McSweeney
><emcswee...@mayo.edu> wrote:
>>Create a resource file that contains the strings and images you
>>want to use, then use BRCC32.EXE to compile it. You can then
>>use {$I MyFileName.RES} to include it in your project.

>>This technique fills both your requirements. It prevents users
>>from messing with your strings and pictures, while at the same
>>time it gives you fairly quick and easy access to those strings
>>and pictures from within your program.

>>Delphi2 Unleashed has a small section on creating resource
>>files. There may be other books that go into more detail. Good
>>luck.
>Thanks for your idea.
>I doubt if it would be a good thing to add a few megs (not yet sure
>how much exactly) to the compiled exe. Doesn't that effect the system
>performance?
>Marcus
>*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
>Marcus Monnig - minib...@cs.tu-berlin.de - PGP Public Key on request
>*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~

Actually, no. Delphi 2 compiled exe's don't, AFAIK, load all at once. They
go through a memory mapped file access, meaning that sections of the code
only get loaded in as they are physically referenced (either by an execution of
code within an area, or by referencing data). This all happens transparently.

Also by putting the stuff in a resource file means it gets embedded in your
application itself, so would require more sophisticated tools to rip off your
images than merely working on a DLL file that had them.

Of course, people can always use PrintScreen if they want to grab a copy of an
image your program uses desperately enough.

--
Paul Gilbert           | p...@yallara.cs.rmit.edu.au
Bach App Sci, Bach Eng | The opinions expressed are my own, all my own, and
Year 4, RMIT Melbourne | as such will contain no references to small {*word*141}
Australia              | creatures from Alpha Centauri.

Other Threads