Lazarus

Installation => PDAs and Smartphones => Topic started by: roeug on October 29, 2006, 08:24:14 pm

Title: MapViewOfFile WinCE
Post by: roeug 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
Title: RE: MapViewOfFile WinCE
Post by: felipemdc 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.
Title: RE: MapViewOfFile WinCE
Post by: oro06 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 :)
Title: RE: MapViewOfFile WinCE
Post by: Marc 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.
Title: RE: MapViewOfFile WinCE
Post by: oro06 on October 31, 2006, 07:49:29 am
done
TinyPortal © 2005-2018