So now i have updated the code flow in such a way that i have only one "call node" block in the main vi. All dll calls are routed through this block. Hence in case of an error i can have the dll unloaded by specifying a NULL path. This did make my code a little messy but its the only way i guess for now.
Thanks,
Abel.