Author: Miroslav Stampar
URL: http://mstampar.awardspace.com/
// Protect string content by marshalling
IntPtr bstr = Marshal.SecureStringToBSTR(password);
try
{
// ...
// use the bstr
// ...
}
finally
{
Marshal.ZeroFreeBSTR(bstr);
}










