well win32 api is compiled as libraries wich you can link to just about anything since they're modules.. include the header for the apropriate language to get the prototypes of the win32api and link with the libraries you want and then you're ready make calls to them..
haven't really done this in either fortran or pascal but I've done it in asm and that's the principle...

maybe I'm wrong but I hope this somewhat helps..

/btq