?
Solved

Adding Virtual Memory To Multiline Listbox or RichEdit

Posted on 1997-04-17
2
Medium Priority
?
230 Views
Last Modified: 2013-12-04
null
0
Comment
Question by:pollarda
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
amartin030297 earned 300 total points
ID: 1334627
The best approach to resolve your problem is to use memory-mapped files.
The Win32 API functions you'll need to research are:
  CreateFile
  MapViewOfFile
  CloseHandle

Also, "Advanced Windows" by Jeffery Richter will help you if you need further research.

Here's the idea of how it works:
 you "CreateFile" (which doesn't create a new file, but creates a file handle which represents a file). This handle returned to you is VERY fast (sub millisecond).  You can open an existing file (which is probably what you are doing..
  You can then later pass the HANDLE returned by CreateFile to MappedViewOfFile.  Returned from this function is a POINTER which represents the file as IF it were in memory.  This is also a VERY fast call.  ** Note:  Nothing is actually in memory at this point, but you do have a linear pointer to memory for the size you told mappedviewoffile to use.

You can then use that pointer as if you had the whole file in memory.. (functions like strrev for instance) ANY function which uses a pointer can use that pointer... The VMM system will automagically map in your file in 4k pages behind the scene..and map-out unused onces... Thus you can page though a file easily, from any point.

You can also obtain more info at:
   http://lonestar.texas.net/~amartin/free.html
file: RADFILE.ZIP, password:  BETARADFILE4  (or BETARADFILE2)

0
 

Author Comment

by:pollarda
ID: 1334628
Edited text of question
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question