🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #389

Re: Memory mapped file question

#389
From: Bob Gonder
Date: Sat, 19 Apr 2008 18:54
10 lines
1187 bytes
Totte Karlsson wrote:

>Is that possible/feasible? Any simple answer on how to remove x bytes in a file 
>from the end of file?

First set position to cutoff point.
	ret = SetFilePointer( h, offset, NULL, FILE_BEGIN );

Then Truncate it.
	ret = SetEndOfFile(h);
Technical Details
Message-ID: <tmfk0491m2qmn0lpe8uivlv8n0gsd4jvor@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!feeder.erje.net!news.isoc.lu!newsgroups.borland.com!not-for-mail
References: <48094dc2$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,be92db2618fc0f73
X-Google-Attributes: gid10cc67,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Memory mapped file question
Date: Sat, 19 Apr 2008 11:54:04 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <tmfk0491m2qmn0lpe8uivlv8n0gsd4jvor@4ax.com>
References: <48094dc2$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.77.145.64
X-Trace: newsgroups.borland.com 1208631241 67.77.145.64 (19 Apr 2008 11:54:01 -0700)
Lines: 12
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!feeder.erje.net!news.isoc.lu!newsgroups.borland.com!not-for-mail