Re: Memory Mapped File Problem

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: ak (ak_at_workmail)
Date: 03/16/04


Date: Tue, 16 Mar 2004 20:56:49 +0800

On Tue, 16 Mar 2004 10:15:28 +0100, Nicolas <info@-REMOVE-.chsoft.ch>
wrote:

>> lpData = MapViewOfFile(hMapping, dwDesiredAccess, 0,
dwStartOffset,
>>dwLength);

you set dwLength to another value than the length of the file, so your
offset will always be outside.

use 0 instead to map whole file.

lpData = MapViewOfFile(hMapping,dwDesiredAccess,0,dwStartOffset,0);

hth/ak



Relevant Pages