public static InstallationProxyError instproxy_status_get_error(PlistHandle status, out string name, out string description, ref ulong code) { System.Runtime.InteropServices.ICustomMarshaler descriptionMarshaler = NativeStringMarshaler.GetInstance(null); System.IntPtr descriptionNative = System.IntPtr.Zero; System.Runtime.InteropServices.ICustomMarshaler nameMarshaler = NativeStringMarshaler.GetInstance(null); System.IntPtr nameNative = System.IntPtr.Zero; InstallationProxyError returnValue = InstallationProxyNativeMethods.instproxy_status_get_error(status, out nameNative, out descriptionNative, ref code); name = ((string)nameMarshaler.MarshalNativeToManaged(nameNative)); nameMarshaler.CleanUpNativeData(nameNative); description = ((string)descriptionMarshaler.MarshalNativeToManaged(descriptionNative)); descriptionMarshaler.CleanUpNativeData(descriptionNative); return(returnValue); }
/// <summary> /// Gets error name, code and description from a response if available. /// </summary> /// <param name="status"> /// The dictionary status response to use. /// </param> /// <param name="name"> /// Pointer to store the name of an error. /// </param> /// <param name="description"> /// Pointer to store error description text if available. /// The caller is reponsible for freeing the allocated buffer after use. /// If NULL is passed no description will be returned. /// </param> /// <param name="code"> /// Pointer to store the returned error code if available. /// If NULL is passed no error code will be returned. /// </param> /// <returns> /// INSTPROXY_E_SUCCESS if no error is found or an INSTPROXY_E_* error /// value matching the error that ẃas found in the status. /// </returns> public virtual InstallationProxyError instproxy_status_get_error(PlistHandle status, out string name, out string description, ref ulong code) { return(InstallationProxyNativeMethods.instproxy_status_get_error(status, out name, out description, ref code)); }