microsoft / microsoft/wil

Add some `THROW_IF_FAILED_MSGW` macros

Open
#181 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
3k
Forks
300
Avg merge
19h 12m
Merged PRs (30d)
1

Description

wil::ResultException has a field contains wide-character string message, I use it to interact with Windows API. But it's converted from ANSI strings, which may not be converted in correct ways.
For example, some strings hard encoded in GB3212(which codepage is 936) by my compiler can't convert correctly. If we use wide-character error message directly, those problems can be avoided.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing THROW_IF_FAILED macros and wil::ResultException handling in the repository, then compare how their message arguments are converted. Define the wide-character THROW_IF_FAILED_MSGW variants so Windows API error messages can remain wide strings, and verify that the new macros preserve the existing failure behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.