I know you can use Sleep(45); but that puts the dll to sleep im looking for a way to wait so that the dll still runs at the same time.