Opc.Ua.WindowsCertificateStore.DuplicateString C# (CSharp) Method

DuplicateString() private static method

converts a managed string to an unmanaged string (allocated with malloc).
private static DuplicateString ( string text ) : IntPtr
text string
return System.IntPtr
        private static IntPtr DuplicateString(string text)
        {
            IntPtr wszText = IntPtr.Zero;

            if (!String.IsNullOrEmpty(text))
            {
                wszText = Marshal.StringToHGlobalUni(text);
            }

            return wszText;
        }