This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Step 1) Set the COR_PRF_HIGH_IN_MEMORY_SYMBOLS_UPDATED flag so that your profiler will receive callbacks when symbols are loaded for modules. | |
// in production handle possible failing HRESULTs | |
ICorProfilerInfo5* pCorProfilerInfo5 = … | |
DWORD lowFlags = 0; // Most profilers will have other flags to set | |
DWORD highFlags = COR_PRF_HIGH_IN_MEMORY_SYMBOLS_UPDATED; | |
pCorProfilerInfo5->SetEventMask2(lowFlags, highFlags); | |
// Step 2) Implement ICorProfilerCallback7 so that your profiler can handle the symbol load notification |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Transactions; | |
namespace YourNamespaceGoesHere | |
{ | |
public class NonMSDTCPromoterEnlistment : IPromotableSinglePhaseNotification | |
{ | |
Guid promoterType; | |
Guid distributedTxId; | |
Transaction enlistedTransaction; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Current approach | |
public class Net46Approach | |
{ | |
public static byte[] SignECDsaSha512(byte[] data, X509Certificate2 cert) | |
{ | |
// This would require using cert.Handle and a series of p/invokes to get at the | |
// underlying key, then passing that to a CngKey object, and passing that to | |
// new ECDsa(CngKey). It's a lot of work. | |
throw new Exception("That's a lot of work..."); | |
} |