Not directly ; if the DLL you would like to load is not a GDC specific DLL, you'll need to rite a wrapper around it.
I don't know if os.DLL has been built the same way as C-extensions or if it has its own interface, but explanation below is valid whatever interface has been chosen:
To load a DLL dynamically, a program (gdc.exe or fglrun.exe) needs to know the function definition. With GDC, all functions must be like:
int functionName(struct frontEndInterface & fx);
where fx is a structure allowing the DLL to read in parameter and push out parameters.
with the DVM, the interface is much more complex, based on Informix. you can see it in f2c/fglExt.h. Most of Informix types can be passed, and a lot of functions / macro as proposed too. GDC api is very simple: call the function, get string / int parameter, return in / string parameter.
So what you would need to do is to make something like (thinking loud, I would not bet this compile directly ;) ) :
int mkdir(struct frontEndInterface & fx){
QString dirname;
fx.popQStriing(&dirname);
if (loadDVMLib("os")) {
int ret = execDVMFunction("mkdir", dirname);
fx.pushInteger(ret, false);
return 1;
} else {
return 0;
}
}
and of couse loadDVMLib() and execDVMFunction() should be very similar to the code we have in the runtime.
While this is potentially doable, I would either try to make it with a bunch of shellexec calls, or with my own library:
int mkdir(struct frontEndInterface & fx) {
QString dirname;
fx.popQStriing(&dirname);
QDir d(m_currentPath);
return d.mkdir(dirname);
}