I want to use the function CryptProtectData()
the definition is:
[DllImport("Crypt32.dll",SetLastError = true,CharSet = System.Runtime.InteropServices.CharSet.Auto)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool CryptProtectData(
ref DATA_BLOB pDataIn,
String szDataDescr,
ref DATA_BLOB pOptionalEntropy,
IntPtr pvReserved,
ref CRYPTPROTECT_PROMPTSTRUCT pPromptStruct,
CryptProtectFlags dwFlags,
ref DATA_BLOB pDataOut
);
the parameter "CRYPTPROTECT_PROMPTSTRUCT pPromptStruct" requires a ref to structure, but i need to pass null here. the description of the function on msdn says that u can pass null here, but C# doesnot allow this...
Is there any way out... plz help...