Not aur enow that would work. GetProcAddress is defined to return a
FARPROC, which in turn is defined as
rtl.FARPROC = public block(): Int32;
i.e. a parameterless method that returns an integer; since GetProcAddress can return the dress of any kind of method, but Oxygene is a strongly typed language, you’ll need some kind of cast to let the compiler know what the actual method looks like.
Even though GetProcAddress is “special” in that way, the compiler also can’t just treat any kind of method pointer as compatible, as that wold reach all kind of havoc when they don’t match.
A cast is the (proper) way to tell the compiler “i know you think this is a specific type, but i know better, so let me override that”.