I know it's an old thread, but I still face the problem Dijipark speaks about.

add_resource seems not to work dynamically. I tried it both from inside a dll as well as from a wdl function, but without success.