Re: [fpc-pascal] help: converting windows API to linux
On Wed, 9 Apr 2008, Bee wrote: You should rewrite the whole unit in a cross-platform manner. Is it possible? I read somewhere that the behavior API of Windows is pretty much different to API of Linux (and other uni*x platform). Maybe I'll end up writing a specific unit for each platform. :( You should make abstraction of what this unit tries to achieve; After that you can see how this can be done in a cross platform manner. If you just try to re-implement the windows API calls with 'cross-platform' ones, then you are bound to fail... (the createevent etc. is rather specific) Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] help: converting windows API to linux
On Wed, 9 Apr 2008, Bee wrote: Hi all, I've been trying to convert a Delphi unit to FPC. The problem is the unit utilizes lots of low level windows APIs, such as: VirtualProtect, CreateEvent, CloseHandle, etc. Due my lack of linux low level API knowledge, I hope someone here could show me where to find a complete guide about similar linux API of the windows counterpart, including the description, the parameter lists, the API behavior differences, and which FPC unit should be used (instead of just windows unit). Or maybe I should just rewrite the whole unit from scratch on linux? :-D You should rewrite the whole unit in a cross-platform manner. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] help: converting windows API to linux
You should rewrite the whole unit in a cross-platform manner. Is it possible? I read somewhere that the behavior API of Windows is pretty much different to API of Linux (and other uni*x platform). Maybe I'll end up writing a specific unit for each platform. :( -Bee- has Bee.ography at: http://beeography.wordpress.com ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] help: converting windows API to linux
Bee wrote: You should rewrite the whole unit in a cross-platform manner. Is it possible? I read somewhere that the behavior API of Windows is Yes it's possible, but nobody said it would be easy. :-) I've done this a few times before. IBM's website had some good documentation on porting Windows apps to Linux etc... The tiOPF project took some time to get cross-platform and cross-compiler compatible, but it's working now. Regards, - Graeme - ___ fpGUI - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal