Skip to content

Instantly share code, notes, and snippets.

@kevingosse
Created December 18, 2025 08:51
Show Gist options
  • Select an option

  • Save kevingosse/62c825941fdbe01fb810ccdde45a0ef1 to your computer and use it in GitHub Desktop.

Select an option

Save kevingosse/62c825941fdbe01fb810ccdde45a0ef1 to your computer and use it in GitHub Desktop.
class Profiler : CorProfilerCallback3Base
{
// The default base implementation would just check that iCorProfilerInfoVersion matches the expected version for CorProfilerCallback3Base,
// and otherwise return an error code
public override HResult ValidateTargetRuntime(int iCorProfilerInfoVersion)
{
return HResult.S_OK; // I want to ignore the validation logic performed by Silhouette
}
public override HResult Initialize() // No more iCorProfilerInfoVersion here
{
// Here, I can only use the ICorProfilerInfo up to 3
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment