wininet: Moved creation of an object and allocating handles to common function.