connect method in DLL