Advertisement

01.24.2007 at 07:36AM PST, ID: 22134852
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Problem When Reading Large Files With MapViewOfFile

Tags: mapviewoffile, large
Hello,
I have problems when trying to read files with MapViewOfFile API function. Actually I only have problems when I try to read very large file. Here is what I am doing;

long offsetHight = 0;
long offsetLow = 0;
long positionAdjustment = 0;
int startpointer;
NativeMethods.SYSTEM_INFO syInfo = new NativeMethods.SYSTEM_INFO();
NativeMethods.GetSystemInfo(ref syInfo);
offSettemp = (100000);
positionAdjustment = (offSettemp % syInfo.dwAllocationGranularity);
if (positionAdjustment != 0)
offSettemp = offSettemp - positionAdjustment;
offsetHight = ((offSettemp >> 32) & 0xFFFFFFFF);
offsetLow = (offSettemp & 0xFFFFFFFF);

IntPtr mapFile = NativeMethods.CreateFileMapping(objectHandle.DangerousGetHandle(), IntPtr.Zero, NativeMethods.PageProtection.ReadWrite, 0, 0, string.Empty);
IntPtr viewFile = NativeMethods.MapViewOfFile(mapFile, 0x004, (int)offsetHight, (int)offsetLow, 8192);

Above code returns the value for "viewFile" handle only when I map up to 1.9 GB but when I try to set the offset at (i.e 10 milion) the file handle always return zero and GetLastError is 8 ERROR_NOT_ENOUGH_MEMORY

Please advice....

Please advice.....
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: ismarosmanovic
Solution Provided By: itsmeandnobodyelse
Participating Experts: 4
Solution Grade: B
Views: 62
Translate:
Loading Advertisement...
01.24.2007 at 07:49AM PST, ID: 18386727

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.24.2007 at 07:53AM PST, ID: 18386781

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.24.2007 at 07:57AM PST, ID: 18386831

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.24.2007 at 08:28AM PST, ID: 18387186

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.24.2007 at 08:40AM PST, ID: 18387355

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.24.2007 at 09:24AM PST, ID: 18387805

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.24.2007 at 09:24AM PST, ID: 18387811

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.24.2007 at 10:04AM PST, ID: 18388186

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.24.2007 at 12:19PM PST, ID: 18389624

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.24.2007 at 02:01PM PST, ID: 18390651

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.24.2007 at 02:05PM PST, ID: 18390693

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.24.2007 at 11:22PM PST, ID: 18393704

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.25.2007 at 01:56AM PST, ID: 18394154

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.25.2007 at 02:37AM PST, ID: 18394302

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29