Reorder #includes
update stdafx.h

_SCL_SECURE_NO_WARNINGS
disable warning 4251
Create connection object for task

if existing connection is not found