Add Windows error code retrieval and message formatting