CryptMsgOpenToEncode
[DllImport("Crypt32.dll", SetLastError = true)]
public static extern IntPtr CryptMsgOpenToEncode(
uint dwMsgEncodingType,
uint dwFlags,
uint dwMsgType,
IntPtr pvMsgEncodeInfo,
IntPtr pszInnerContentObjID,
IntPtr pStreamInfo
);
Microsoft documentation: Link
Last updated