Edited to allow DLL to be loaded via Resources.