Sure it´s possible. You just programm your Dll in any compiler (look at the sdk_plugin) in your 3DGS folder, put the Dll in your plugin folder and write some importing stuff like this:

Func Dll:

DLLFUNC var Add_one_to_var(var variable)
{
variable=1;
}

Import code in a wdl script:

dllfunction Add_one_to_var(variable);


Now you can use the 'Add_one_to_var(variable)' Function in c-script.