Add log macros for handling Win32 errors.