Bug fix when WinApi function has no parameters