Copies the contents of a managed System.Security.SecureString object into unmanaged memory.
The address, in unmanaged memory, where s was copied, or 0 if s is a System.Security.SecureString object whose length is 0.
The Marshal.SecureStringToGlobalAllocUnicode(System.Security.SecureString) method is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling the Marshal.ZeroFreeGlobalAllocUnicode(IntPtr) method.