Re: Question regarding MapViewOfFile
- From: "Luca Calligaris" <anonymous@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 13 Oct 2008 14:21:22 +0200
Windows Embedded CE 6.0 behaviour is 'more correct': you call MapViewOfFile
with read access and IsBadWritePtr
returns TRUE; look for 'Memory Mapped Files' in this this blog post to see
differences between %.0 and 6.0:
http://blogs.msdn.com/ce_base/archive/2006/11/14/application-compatibility-in-windows-ce-6-0.aspx.
--
Luca Calligaris
www.eurotech.it
"akjuturub04" <akjuturub04@xxxxxxxxx> ha scritto nel messaggio
news:9b2cc0e8-5306-4c25-be17-6d0a75fd6020@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi all,
I am working on HP WBTs. I noticed a question regarding behavior of
MapViewOfFile in WinCE 6 and WinCE 5. I wrote a small program.
hMap = CreateFileMapping( INVALID_HANDLE_VALUE,
NULL,
PAGE_READWRITE,
0,
10,
NULL );
pMap = MapViewOfFile( hMap, FILE_MAP_READ, 0, 0, 0 );
read = IsBadReadPtr(pMap,10);
write = IsBadWritePtr(pMap,10);
_stprintf(a,L"read : %d, write : %d ",read,write);
MessageBox(NULL,a, TEXT("Hello World"), MB_OKCANCEL |
MB_SETFOREGROUND | MB_TOPMOST);
When the above prog is run on a WinCE 6, the MessageBox displays :
read : 0, write : 1
and when the run on WinCE 5, the MessageBox displays :
read : 0, write : 0
Can some one kindly explain the above behavior? Thanks in advance.
Regards,
Amruth Kumar Juturu
.
- References:
- Question regarding MapViewOfFile
- From: akjuturub04
- Question regarding MapViewOfFile
- Prev by Date: Add OpenSSH to Windows CE 6 R2 build
- Next by Date: CE 6.0 Strataflash Driver Compatibility
- Previous by thread: Question regarding MapViewOfFile
- Next by thread: Add OpenSSH to Windows CE 6 R2 build
- Index(es):