/// <summary> /// 释放引擎Handler /// </summary> /// <returns></returns> public static bool DisposeEngine() { if (hEngine != null) { try { ResultCode result = (ResultCode)ASFAPI.ASFUninitEngine(hEngine); if (result == ResultCode.成功) { return(true); } else { throw new Exception(result.ToString()); } } catch (Exception ex) { throw ex; } finally { //Marshal.FreeHGlobal(hEngine); } } return(true); }
/// <summary> /// 释放引擎Handler /// </summary> /// <returns></returns> public static bool DisposeEngine() { if (hEngine != IntPtr.Zero) { try { ResultCode result = (ResultCode)ASFAPI.ASFUninitEngine(hEngine); if (result == ResultCode.成功) { return(true); } else { throw new Exception(result.ToString()); } } catch (Exception ex) { throw ex; } } return(true); }