Fixed ctypes/wintypes issue

The c_void_p and HRESULT are not accessible from wintypes in Python3.
This patch fixes the issue and it keeps functionality for Python27

Change-Id: I0a1c5d0770a66529528d1e2f7f1ba08368e53fe7
Fixes Python34 bugs

This fix is needed due to the different encodings on Python27 and
Python34. Some tests failed and some string values were not
compatible.

Change-Id: I7206a0549051971da76b3b30221aea9f86eed904