[Lazarus] windows rt

Sven Barth pascaldragon at googlemail.com
Sun May 12 14:48:42 CEST 2013

On 12.05.2013 14:19, Felipe Monteiro de Carvalho wrote:
>> ok if you allocate the memory using functions from the Windows API which are
>> available for WinRT)
>>From what I read what is available for allocating memory in WinRT is
> malloc from the Visual C RTL.

Yes, nevertheless the RTL needs to be adjusted for this, because the 
heap manager uses the HeapAlloc function from kernel32.dll and not the 
Visual C RTL.

>>> Also, does anyone know if the executable format at least in win rt is the
>>> same? pe format and available in both executable and dll forms?
>> It's the same.
> This part is really good! So one could theorically use the win32
> binutils and just copy the existing RTL and delete all calls to the
> WinAPI and substitute it to Visual C RTL calls to make a quick and
> dirty port ...

The big work of a WinRT port of FPC is exactly this substitution of API 
calls. Adding a new target to the compiler and the build utilities is 
easy. Implementing the RTL is the hard one and you'll have to do that no 
matter whether you do a "quick and dirty" port or a real one. In both 
cases you'll need to research the correct function to use and the 
correct way to pass in or retrieve data.


More information about the Lazarus mailing list