[DUG] access memory as a file

John Bird johnkbird at paradise.net.nz
Sun Jul 9 23:41:12 NZST 2006


 
My guess:  If your DLL is actually asking for a filename and opens it with
standard file i/o routines then you are pretty much without options.
However more generally what you want as far as reading from memory can be
certainly be done even though I haven't actually done it - having used
TFileStream stuff a lot with great success I notice there are lots of
similar routines that read and write memory streams as well  - see
TMemoryStream.
 
If you were on linux/Unix there would be other options as well, as the
memory (and everything else as well) is part of the filesystem.
 

John 

 -----Original Message-----
From: delphi-bounces at ns3.123.co.nz [mailto:delphi-bounces at ns3.123.co.nz] On
Behalf Of Ross Levis
Sent: Saturday, 8 July 2006 11:47 a.m.
To: NZ Borland Developers Group - Delphi List
Subject: [DUG] access memory as a file



I doubt this is possible but I thought I would ask anyway.
 
I have a 3rd party DLL which opens a file that I specify.  Specially it is
an audio decoder plugin which decodes MP3 to PCM.
 
What I would like to do is use this plugin to access a memory location which
contains MP3 data instead of a file.
 
Is it possible to set up something in Windows where you specify a filename
but actually accesses memory instead.
 
This will be used with encrypted mp3 files so they are not accessible to
anyone to steal for their own use.  I am currently opening the file,
decrypting, and then saving a temporary file to disk.  But this has 2
disadvantages.  It is very slow, so lots of latency between asking a track
to play and hearing it.  And also, while the file is decrypted on disk,
someone can steal it.
 
The DLL cannot be modified.  Is there any solution?
 
Thanks,
Ross.


__________ NOD32 1.1461 (20060329) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns3.123.co.nz/pipermail/delphi/attachments/20060709/7e1afb30/attachment.html


More information about the Delphi mailing list