[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
private struct DATA_BLOB {
public int cbData;
public IntPtr pbData;
}
VB .NET Signature:
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)> Structure DATA_BLOB
Public cbData As Integer
Public pbData As IntPtr
End Structure
Notes:
None.
Tips & Tricks:
Remember that DATA_BLOB.pbData for the output parameters of the CryptProtectData and CryptUnprotectData functions will point to a block of unmanaged memory that needs to be cleaned up using a call to LocalFree from kernel32. You will of course have to use pinvoke to call LocalFree.
The CryptProtectData function performs encryption on the data in a DATA_BLOB structure. Typically, only a user with the same logon credential as the encrypter can decrypt the data. In addition, the encryption and decryption usually must be done on the same computer.
3/16/2007 7:39:46 AM - ed@sharplogic.com-71.121.130.50
The CryptUnprotectData function decrypts and does an integrity check of the data in a DATA_BLOB structure. Usually, only a user with the same logon credentials as the encrypter can decrypt the data. In addition, the encryption and decryption must be done on the same computer.
9/6/2012 12:36:21 AM - -203.166.19.130
The CryptProtectData function performs encryption on the data in a DATA_BLOB structure. Typically, only a user with the same logon credential as the encrypter can decrypt the data. In addition, the encryption and decryption usually must be done on the same computer.
3/16/2007 7:39:46 AM - ed@sharplogic.com-71.121.130.50
The CryptUnprotectData function decrypts and does an integrity check of the data in a DATA_BLOB structure. Usually, only a user with the same logon credentials as the encrypter can decrypt the data. In addition, the encryption and decryption must be done on the same computer.
9/6/2012 12:36:21 AM - -203.166.19.130
Frees the specified local memory object and invalidates its handle.
8/27/2008 3:05:46 PM - -151.145.238.91
Frees the specified local memory object and invalidates its handle.