Connecting Tech Pros Worldwide Help | Site Map

FILE out of memory

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 22nd, 2005, 10:18 AM
Gerrit Hulleman
Guest
 
Posts: n/a
Default FILE out of memory

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, 10:18 AM
Karl Heinz Buchegger
Guest
 
Posts: n/a
Default 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
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.