C# 如何在C中使用CryptUnprotectData#

C# 如何在C中使用CryptUnprotectData#,c#,C#,有人能提供详细的例子说明如何在C#中使用CryptUnprotectData方法吗。我找到的所有信息都有C中的示例。如果可能,请在C中导入: [ DllImport("Crypt32.dll", SetLastError=true, CharSet=System.Runtime.InteropServices.CharSet.Auto) ] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool CryptUnprot

有人能提供详细的例子说明如何在C#中使用
CryptUnprotectData
方法吗。我找到的所有信息都有C中的示例。

如果可能,请在C中导入:

[
DllImport("Crypt32.dll",
SetLastError=true,
CharSet=System.Runtime.InteropServices.CharSet.Auto)
]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool CryptUnprotectData(
    ref DATA_BLOB pDataIn,
    StringBuilder szDataDescr,
    ref DATA_BLOB pOptionalEntropy,
    IntPtr pvReserved,
    ref CRYPTPROTECT_PROMPTSTRUCT pPromptStruct,
    CryptProtectFlags dwFlags,
    ref DATA_BLOB pDataOut
);

Stackoverflow是一个英文问答网站,为什么要暂停?Op提供了一个你在这里提到的方法的英文翻译?Found C#示例:但是我在用C构建pDataIn结构时遇到了问题#