More fixes about using Windows API through ctypes (#39376)
Summary:
Representation of `NULL` using `c_void_p` is `None` in ctypes.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/39376
Differential Revision: D21833451
Pulled By: malfet
fbshipit-source-id: 70ec0a805a6c473e946ce9a7566440b6e0cd81ba