My code crashed when I asked WIL to convert an exception to an HRESULT, did I throw an improper exception type?

3 · Raymond Chen · Oct. 20, 2021, 2:02 p.m.
A customer used WRL to implement their COM objects, with the help of wil. Meanwhile, they also had client code that instantiated one of those COM objects. An exception was thrown and caught, but the code crashed trying to convert it to an HRESULT: // Simplified int __cdecl wmain() { CoInitialize(nullptr); The post My code crashed when I asked WIL to convert an exception to an HRESULT, did I throw an improper exception type? appeared first on The Old New Thing....