You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
intmain()
{
#ifdef _CONTROL_FLOW_GUARD
PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY cfg_policy;
if (GetProcessMitigationPolicy(GetCurrentProcess(), ProcessControlFlowGuardPolicy, &cfg_policy, sizeof(cfg_policy)))
{
cfg_policy.StrictMode = true;
SetProcessMitigationPolicy(ProcessControlFlowGuardPolicy, &cfg_policy, sizeof(cfg_policy));
}
#endif// do something that requires loading the VCRT forwarders, like initializing WinUI.
}
When building the above code with /cf:guard, the following error occurs when trying to load the forwarder DLLs.
Exception thrown at 0x00007FFC0160467C (KernelBase.dll) in TranslucentTB.exe: WinRT originate error - 0x80070679 : 'The specified image file was blocked from loading because it does not enable a feature required by the process: Control Flow Guard.'.
The text was updated successfully, but these errors were encountered:
Note that I use Control Flow Guard in both debug and release builds of my apps, both debug and release forwarders should build with Control Flow Guard enabled
When building the above code with /cf:guard, the following error occurs when trying to load the forwarder DLLs.
The text was updated successfully, but these errors were encountered: