Recent

Author Topic: MapViewOfFile WinCE  (Read 8658 times)

roeug

  • Jr. Member
  • **
  • Posts: 67
    • http://roeug.50megs.com/
MapViewOfFile WinCE
« on: October 29, 2006, 08:24:14 pm »
I could not find MapViewOfFile function declaration for wince-arm

I have tryed
{$IFDEF wince}
function MapViewOfFile(hFileMappingObject:HANDLE; dwDesiredAccess:DWORD;
dwFileOffsetHigh:DWORD; dwFileOffsetLow:DWORD; dwNumberOfBytesToMap:DWORD):
LPVOID;external KernelDLL name 'MapViewOfFile';
{$ENDIF}

But I am not sure

Please, your advice

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
RE: MapViewOfFile WinCE
« Reply #1 on: October 30, 2006, 11:21:10 am »
Here is the docs for this functions:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcesdkr/html/_wcesdk_Win32_MapViewOfFile.asp

I checked it and it really seams to be missing. It should be on the file:

fpc/rtl/wince/wininc/coredll.inc

Your declaration seams perfect to me, does it work?

You can just use it like that for your code, but it would be nice if you could drop an e-mail on fpc mailling list and ask it to be included on the official sources for Free Pascal, so it will be available by default on the next versions.

oro06

  • Newbie
  • Posts: 5
RE: MapViewOfFile WinCE
« Reply #2 on: October 30, 2006, 03:41:52 pm »
hi,

as you can see at begining of coredll.inc there is :

{exported functions list = to do,
 * please remove functions done *

     Exports

       ordinal    name
....
      342 MapViewOfFile
}

line 323 in the commented part ,
at this moment it is not done BUT it exist in list of exported functions under wince

this commented list correspond to remaing api calls that could be implemented if needed.

btw, not sure it is the best way to use them all :)

(the more your code rely on OS api calls the more dependant it will be and the less portable also could be)

anyway,  you can drop a line here with wince api needed, i'll do my best to update rtl.

ps: it's better five by five than one by one :)

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2582
RE: MapViewOfFile WinCE
« Reply #3 on: October 30, 2006, 07:37:41 pm »
In theory, when smartlinked, the extra declarations shouldn't harm.
Anyway, I'll need (atleast) this one if I want to implement the windebugger also for CE.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

oro06

  • Newbie
  • Posts: 5
RE: MapViewOfFile WinCE
« Reply #4 on: October 31, 2006, 07:49:29 am »
done

 

TinyPortal © 2005-2018