Windows API - GetLastError woes