🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #11762

Re: add config data to end of file

#11762
From: Remy Lebeau (TeamB)
Date: Sat, 24 Jan 2004 03:30
34 lines
2359 bytes
"borland" <rogersmail@ntlworld.com> wrote in message
news:4011d110@newsgroups.borland.com...

> The problem i have is that he doesn't want the image to be
> available to other to allow them to either replace or change it..

If you are installing the program on an NT-based system (NT4, 2K, or XP),
you could always just make it so that non-admin users can't touch/modify any
files that the application is dependant on.

> The only ideas i have come up with so far it to write a header
> preceeded with a magic number at the end of the stream which
> will give the image and data sizes to read and offsets to the
> magic nunber..

That wouldn't stop someone fom altering the data if they really wanted to,
once it was determined what you were actually doing.

> Is it possible to create a dll at runtime and fill it with data

In theory, yes.  You would have to have intimate knowledge of how DLLs and
the PE format work in general, though.  Alternatively, you could create a
pre-compiled stub DLL that does not include the actual data, but is set up
to look for the data at the end of the stub.  Then you could simply copy the
stub to a new file when needed and append the desired data to the end of it.

> so i can at least ask if he will  be happy with an exe and one dll..

That won't stop someone from simply replacing the DLL with another one,
though.


Gambit
Technical Details
Message-ID: <4011e537$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4011c9b5@newsgroups.borland.com> <4011cfd3$1@newsgroups.borland.com> <4011d110@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,9f584b16be099db2
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-01-23 19:39:26 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4011c9b5@newsgroups.borland.com> <4011cfd3$1@newsgroups.borland.com> <4011d110@newsgroups.borland.com>
Subject: Re: add config data to end of file
Date: Fri, 23 Jan 2004 19:30:17 -0800
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 67.22.138.253
Message-ID: <4011e537$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1074914615 67.22.138.253 (23 Jan 2004 19:23:35 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail