static void EncodeString(ref AuthorizationItem item, string key, string value) { item.name = Marshal.StringToHGlobalAuto(key); if (value != null) { item.value = Marshal.StringToHGlobalAuto(value); item.valueLen = (IntPtr)value.Length; } }
static void EncodeString (ref AuthorizationItem item, string key, string value) { item.name = Marshal.StringToHGlobalAuto (key); if (value != null){ item.value = Marshal.StringToHGlobalAuto (value); item.valueLen = (IntPtr) value.Length; } }
extern static int AuthorizationCreate (AuthorizationItem *rights, AuthorizationItem *environment, AuthorizationFlags flags, out IntPtr auth);