AKB Forums

Go Back   AKB Forums > Technical sections > Languages, Compilers and Interpreters
Home Register Blogs FAQ Members List Calendar Downloads Arcade Mark Forums Read

Languages, Compilers and Interpreters C,C++,C#,.NET,Java,PHP,Perl,SQL and more

Troubles when posting message? Click here! :: Проблемы с отправлением сообщения? Нажмите сюда!

Reply
 
LinkBack Thread Tools Display Modes
Old Feb 4, 2004, 10:10   #1
Administrator
 
greka's Avatar
 
Join Date: Sep 2001
Location: @work
Posts: 5,347
Rep Power: 10
Reputation: 23
Send a message via ICQ to greka
Memory Mapped Files

I don't need to Map entire file but a portion of it (say, 1024 bytes).
And i want to read entire file, block by block, till the end.

Could anybody gimme a sample?
thanks in advance.
__________________
И повешенные могут качаться в неположенную сторону. /С.Е.Лец/
greka is offline   Reply With Quote Quote selected
Old Feb 4, 2004, 10:14   #2
Грустно...
 
Agregat's Avatar
 
Join Date: Aug 2002
Location: Там, где всегда идут дожди
Posts: 21,614
Rep Power: 11
Reputation: 202
Send a message via ICQ to Agregat Send a message via MSN to Agregat
Задавай соответствующие параметры в MapViewOfFile.
__________________
http://аvitya.livejournal.com
Хотели, как лучше, а получилось даже хуже...
Лозунг шахматиста: На каждый шах - ответим матом!
Agregat is offline   Reply With Quote Quote selected
Old Feb 4, 2004, 10:57   #3
Administrator
 
greka's Avatar
 
Join Date: Sep 2001
Location: @work
Posts: 5,347
Rep Power: 10
Reputation: 23
Send a message via ICQ to greka
schital fayl, kusok mappirovannogo poodoshel k koncu - poluchayu error "can't read from file".

nujno sdelat' Unmap, potom: MapViewofFile (, , , newFileOffsetLow) ?
__________________
И повешенные могут качаться в неположенную сторону. /С.Е.Лец/
greka is offline   Reply With Quote Quote selected
Old Feb 4, 2004, 12:36   #4
Грустно...
 
Agregat's Avatar
 
Join Date: Aug 2002
Location: Там, где всегда идут дожди
Posts: 21,614
Rep Power: 11
Reputation: 202
Send a message via ICQ to Agregat Send a message via MSN to Agregat
Ну ты же знаешь размер сколько ты промаппил в память. Как прочел свои 1024 байта - снова Unmap/MapViewOfFile. Есть вариант два - пишешь свой маппер. Не будет так же эффективно, но пахать будет.
__________________
http://аvitya.livejournal.com
Хотели, как лучше, а получилось даже хуже...
Лозунг шахматиста: На каждый шах - ответим матом!
Agregat is offline   Reply With Quote Quote selected
Reply


Thread Tools
Display Modes

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to delete files with invalid file names acid Software 8 Jan 13, 2004 07:45
Nujen isxodniy cod podborshika dlya linux no1 Unix 12 May 5, 2003 13:58
Unreal Tournamet 2003 HAS GONE GOLD! -=iR0Nr@T=- Games 13 Oct 5, 2002 19:29
2Web Developers| PHP,Perl,HTML,.... files strax. Web Development 11 May 27, 2002 23:45
Conventional Memory acid Fun 4 Mar 7, 2002 06:37


All times are GMT. The time now is 05:33.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
This board was founded on September 29, 2001
Powered by Viper Internet

Affordable Web Hosting | ParevNet

Buy text link