/// <summary> /// Call WinApi FreeLibrary for h2napi.dll /// </summary> /// <remarks> /// Is never called, used in test cases, can be used for autoupdate to unlock h2napi.dll file for write /// </remarks> /// <returns> /// true if h2napi.dll was successfully freed /// </returns> public static bool FreeLibrary() { lock (_lockObject) { var ret = (_dllAddress != IntPtr.Zero) && WinApiHelper.FreeLibrary(_dllAddress); _dllAddress = IntPtr.Zero; return(ret); } }