microsoft / media-foundation

Repository for Windows Media Foundation related tools and samples
MIT License
145 stars 31 forks source link

MediaFoundation seems incompatible with Arbitrary Code Guard #40

Open jrmuizel opened 2 years ago

jrmuizel commented 2 years ago

Adding:

    PROCESS_MITIGATION_DYNAMIC_CODE_POLICY policy = {0};
    policy.ProhibitDynamicCode = 1;
    SetProcessMitigationPolicy(ProcessDynamicCodePolicy, &policy, sizeof(policy));

to wWinMain of MediaEngineDCompWin32Sample causes a crash in 32 bit builds. i.e. https://github.com/jrmuizel/media-foundation/commit/3507e8ced2498a7fa89149af0c4a5bd967528cea

Is this expected? Can anything be done to prevent MediaFoundation from crashing when ACG is enabled?