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