Yes, it’s possible to invoke Windows API in the compiler. The main problem may come whether you have Excel 32-bit or 64-bit… But here is some guide:
function lib "libName.dll" [alias ExternalFunctionName] [callingConvention] functionName(arguments) as resultType;
For example, the following declaration:
function lib "CustomLib.dll" MyFunction(arg as integer) as integer
imports a function called MyFunction from CustomLib.dll. Default calling convention, if not specified, is stdcall. Scripter also allows to declare a different calling convention (stdcall, register, pascal, cdecl or safecall) and to use a different name for DLL function, like the following declaration:
function MessageBox lib "User32.dll" alias "MessageBoxA" stdcall (hwnd as pointer, text as string, caption as string, msgtype as integer) as integer
that imports ‘MessageBoxA’ function from User32.dll (Windows API library), named ‘MessageBox’ to be used in script.