Connecting Tech Pros Worldwide Help | Site Map

FILE out of memory

  #1  
Old July 22nd, 2005, 11:18 AM
Gerrit Hulleman
Guest
 
Posts: n/a
Is there a way to assign memory to a FILE variable, allowing information to
be read from memory in stead of from drive?

I am trying to re-use an open-source package. This package uses a FILE*
variable to load information from a file. Te content of the file is present
in memory, and would like like the integrated package to use this stream in
stead of a file.

Situation:
Info = "<XML><Test/></XML>";
FILE *input =fopen('input.xml','r');

Writing the Info to a file and than point to that file would be possible,
but is there a way to point the input var to the info? I cannot change the
FILE type of the var, since it is deeply integrated in the package.

Gerrit Hulleman


  #2  
Old July 22nd, 2005, 11:18 AM
Karl Heinz Buchegger
Guest
 
Posts: n/a

re: FILE out of memory


Gerrit Hulleman wrote:[color=blue]
>
> Is there a way to assign memory to a FILE variable, allowing information to
> be read from memory in stead of from drive?
>
> I am trying to re-use an open-source package. This package uses a FILE*
> variable to load information from a file. Te content of the file is present
> in memory, and would like like the integrated package to use this stream in
> stead of a file.
>
> Situation:
> Info = "<XML><Test/></XML>";
> FILE *input =fopen('input.xml','r');
>
> Writing the Info to a file and than point to that file would be possible,
> but is there a way to point the input var to the info? I cannot change the
> FILE type of the var, since it is deeply integrated in the package.
>[/color]

No.
Not with FILE

If the package had used the C++ streams, there would be a way. But not
with the old C FILE functionality.

--
Karl Heinz Buchegger
kbuchegg@gascad.at
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting an out of memory failure.... (long email) Sean Shanny answers 4 November 23rd, 2005 02:20 AM
Resource File Out of Memory Exception Mark answers 2 November 22nd, 2005 11:36 PM
Resource File Out of Memory Exception Mark answers 2 October 25th, 2005 12:15 AM
asp text file out of memory Sunshine answers 5 July 19th, 2005 12:50 PM