lol, this is exactly what my Aphotic project does. Well, actually, there's more to it than just calling DLLs. There are things that need to be done internally, like math. Other than that, most of the stuff is in plugin DLLs (which don't have annoying string tables). To use a DLL as a plugin, you just need to make a declaration file, which is something like this:
[messagebox.dec]
msgboxOK;0;8
msgboxOKCancel;0;8
[EOF]
Here we tell the compiler that there are two functions in the DLL, and that they do not return any values, and they both expect 8 bytes in the stack as parameters (two string pointers, window name and text).
This will not be compiled, exactly. The Aphotic environment is a JITer, so the compiler will produce bytecode which will later on go through a binary translator, providing more portability. Thanks for making this thread, you've reminded me I have to update my sig.
AphoticVM status: 80% AphoticBasic status: 10%