Bug 1674902: Part 5 - mscom::ActivationContext cleanup; r=Jamie

I just wanted to add a better explanation for what the magic `2` constant
is for.

Differential Revision: https://phabricator.services.mozilla.com/D95602
This commit is contained in:
Aaron Klotz 2020-11-03 16:55:07 +00:00
parent 9f37ad4cb5
commit fd31cffe8e

View File

@ -23,10 +23,15 @@ namespace mscom {
class ActivationContext final {
public:
// This is the default resource ID that the Windows dynamic linker searches
// for when seeking a manifest while loading a DLL.
static constexpr WORD kDllManifestDefaultResourceId = 2;
ActivationContext() : mActCtx(INVALID_HANDLE_VALUE) {}
explicit ActivationContext(WORD aResourceId);
explicit ActivationContext(HMODULE aLoadFromModule, WORD aResourceId = 2);
explicit ActivationContext(HMODULE aLoadFromModule,
WORD aResourceId = kDllManifestDefaultResourceId);
ActivationContext(ActivationContext&& aOther);
ActivationContext& operator=(ActivationContext&& aOther);