[fpc-devel] FPC for minimal Win-32

Sven Barth pascaldragon at googlemail.com
Fri Mar 25 13:46:00 CET 2011


Am 25.03.2011 13:10, schrieb José Mejuto:
> Hello FPC,
>
> Thursday, March 24, 2011, 10:19:09 PM, you wrote:
>
>>> Or simply create a dummy "oleaut32.dll" which exports the same
>>> functions prototypes without doing nothing (empty functions) and drop
>>> that DLL in the same folder as the exe.
> SB>  But then you must not use FPC for that DLL as the oleaut32 functions are
> SB>  used in DLLs as well.
>
> Instead modify RTL to not import that functions, provide a simple
> empty stub in a "local" DLL to keep the dll loader happy and disable
> unicode. Maybe I'm dropping something in the path and this approach is
> not good.
>
> SB>  Also if you follow this approach it might be safer to stay far away from
> SB>  any function that takes a WideString (UnicodeString might work though).
>
> The worst thing could be a "no answer" function, or implement a very
> basic non complian unicode operations (I had not checked what
> oleaut32.dll functions perform).
>

As the RTL can be switched to "don't use those functions", as I've 
described, the impact should be low.

Note: You do that switch in your main program as well as the 
variable/constant is available in the implementation section of the 
system unit (maybe you need to enable "writable typed constants"). Then 
a stub would be sufficient.

Regards,
Sven



More information about the fpc-devel mailing list