Last time I tried to make an app, without using api on windows, and after getting it working i tried to compile it on linux, well... I discovered some minor change that has made my app not portable at all
There`ll always be minor variations between the different versions cos of the OS`s
eg. the Amiga version has different file attributes compared to Win32, no way around it except rewrite the OS to match Windows..(before you even ask.. NO )
Luckily most differences can be wrapped between CompilerIf - CompilerEndif for each OS.