Uh oh!
There was an error while loading. Please reload this page.
COM server refactor and improvements - #537
Conversation
Duncan Horn (dunhor)
commented
Jul 24, 2025
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Uh oh!
There was an error while loading. Please reload this page.
Charles Milette (sylveon)
commented
Jul 24, 2025
I've pushed formatting fixes, however I am unsure what the errors on the clang build are about - they complain about illegal instructions but I don't appear to be doing anything that could trigger this. |
Duncan Horn (dunhor)
commented
Jul 24, 2025
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Duncan Horn (dunhor)
commented
Jul 24, 2025
Not sure about the illegal instruction part. I wonder if it hit an |
Duncan Horn (dunhor)
commented
Jul 24, 2025
roxk as FYI for the changes in file names/types |
Duncan Horn (dunhor)
commented
Jul 24, 2025
If it is indeed an issue with coroutine support in Clang, it could also be a bad jump pointer, etc. |
Charles Milette (sylveon)
commented
Jul 24, 2025
It's somehow hitting a compiler-generated |
Swapping the |
Charles Milette (sylveon)
commented
Jul 24, 2025
Should be fixed now. |
Duncan Horn (dunhor)
commented
Jul 29, 2025
/azp run |
Uh oh!
There was an error while loading. Please reload this page.
Duncan Horn (dunhor)
commented
Jul 29, 2025
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Uh oh!
There was an error while loading. Please reload this page.
I originally only wanted to do the CLSID parameter change, but ended up spotting a lot of potential improvements:
winrt::no_module_lockfor usage in OOP servers likeregister_com_serverbecause an in-proc class factory does need to increment the module lock.CoRegisterClassObjectnodiscardsREGCLS_SUSPENDEDin the overload that registers multiple instancesCoAddRefServerProcessandCoReleaseServerProcessin the lock we use - and also turn it purpose specific. This now means that as soon as the ref count hits 0, further activations are suspended to avoid potentially racy conditionscppwinrt_authoring.hI wanted to look into adding aggregation support to the factory, but backed off for now because cppwinrt's composition support machinery is almost entirely within the
winrt::implnamespace and assumesIInspectable.The end consumer API is almost identical. Most tests where modified very lightly if at all.
Supplants #533