Dialogs/ComCtlv6ActivationContext.cs
Incorrect end of line character(s) found. Open
Open
// Unless required by applicable law or agreed to in writing, software distributed under the License is
- Exclude checks
Incorrect end of line character(s) found. Open
Open
using System.Reflection;
- Exclude checks
Incorrect end of line character(s) found. Open
Open
public void Dispose()
- Exclude checks
Incorrect end of line character(s) found. Open
Open
contents.CopyTo(file);
- Exclude checks
Incorrect end of line character(s) found. Open
Open
using static Vanara.PInvoke.Kernel32;
- Exclude checks
Incorrect end of line character(s) found. Open
Open
_cookie.Dispose();
- Exclude checks
Incorrect end of line character(s) found. Open
Open
}
- Exclude checks
Incorrect end of line character(s) found. Open
Open
}
- Exclude checks
Incorrect end of line character(s) found. Open
Open
activationContext.Value?.Dispose();
- Exclude checks
Incorrect end of line character(s) found. Open
Open
lock (contextCreationLock)
- Exclude checks
Incorrect end of line character(s) found. Open
Open
- Exclude checks
Incorrect end of line character(s) found. Open
Open
- Exclude checks
Incorrect end of line character(s) found. Open
Open
return Win32Error.ThrowLastErrorIfInvalid(CreateActCtx(new ACTCTX(CreateTempFile(xpThemes))));
- Exclude checks
Incorrect end of line character(s) found. Open
Open
// - Used Lazy<T> to simplify logic
- Exclude checks
Incorrect end of line character(s) found. Open
Open
- Exclude checks
Incorrect end of line character(s) found. Open
Open
using Vanara.InteropServices;
- Exclude checks
Incorrect end of line character(s) found. Open
Open
- Exclude checks
Incorrect end of line character(s) found. Open
Open
private static readonly object contextCreationLock = new();
- Exclude checks
Incorrect end of line character(s) found. Open
Open
{
- Exclude checks
Incorrect end of line character(s) found. Open
Open
// with the License. You may obtain a copy of the License at
- Exclude checks
Incorrect end of line character(s) found. Open
Open
// Changes:
- Exclude checks
Incorrect end of line character(s) found. Open
Open
// - Use default as NULL pointer constant
- Exclude checks
Incorrect end of line character(s) found. Open
Open
- Exclude checks
Incorrect end of line character(s) found. Open
Open
{
- Exclude checks
Incorrect end of line character(s) found. Open
Open
- Exclude checks
Incorrect end of line character(s) found. Open
Open
{
- Exclude checks
Incorrect end of line character(s) found. Open
Open
}
- Exclude checks
Incorrect end of line character(s) found. Open
Open
// Original:
- Exclude checks
Incorrect end of line character(s) found. Open
Open
// - Adapted to Vanara semantics (safe handles and Win32Error)
- Exclude checks
Incorrect end of line character(s) found. Open
Open
- Exclude checks
Incorrect end of line character(s) found. Open
Open
internal sealed class ComCtlV6ActivationContext : IDisposable
- Exclude checks
Incorrect end of line character(s) found. Open
Open
_cookie = new(cookie, static ptr => Win32Error.ThrowLastErrorIfFalse(DeactivateActCtx(default, ptr), "ComCtl32 V6 activation context deactivation failed."));
- Exclude checks
Incorrect end of line character(s) found. Open
Open
private static readonly Lazy<SafeHACTCTX> activationContext = new(CreateActivationContext, true);
- Exclude checks
Incorrect end of line character(s) found. Open
Open
{
- Exclude checks
Incorrect end of line character(s) found. Open
Open
private static SafeHACTCTX CreateActivationContext()
- Exclude checks
Incorrect end of line character(s) found. Open
Open
{
- Exclude checks
Incorrect end of line character(s) found. Open
Open
// https://github.com/ookii-dialogs/ookii-dialogs-wpf/blob/master/src/Ookii.Dialogs.Wpf/ComCtlv6ActivationContext.cs
- Exclude checks
Incorrect end of line character(s) found. Open
Open
- Exclude checks
Incorrect end of line character(s) found. Open
Open
// See the License for the specific language governing permissions and limitations under the License.
- Exclude checks
Incorrect end of line character(s) found. Open
Open
using var xpThemes = Assembly.GetExecutingAssembly().GetManifestResourceStream($"{nameof(Scover)}.{nameof(Dialogs)}.XPThemes.manifest").AssertNotNull();
- Exclude checks
Incorrect end of line character(s) found. Open
Open
- Exclude checks
Incorrect end of line character(s) found. Open
Open
private static string CreateTempFile(Stream contents)
- Exclude checks
Incorrect end of line character(s) found. Open
Open
// https://opensource.org/licenses/BSD-3-Clause
- Exclude checks
Incorrect end of line character(s) found. Open
Open
using Vanara.PInvoke;
- Exclude checks
Incorrect end of line character(s) found. Open
Open
}
- Exclude checks
Incorrect end of line character(s) found. Open
Open
//
- Exclude checks
Incorrect end of line character(s) found. Open
Open
namespace Scover.Dialogs;
- Exclude checks
Incorrect end of line character(s) found. Open
Open
{
- Exclude checks
Incorrect end of line character(s) found. Open
Open
}
- Exclude checks
Incorrect end of line character(s) found. Open
Open
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except in compliance
- Exclude checks
Incorrect end of line character(s) found. Open
Open
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- Exclude checks
Incorrect end of line character(s) found. Open
Open
- Exclude checks
Incorrect end of line character(s) found. Open
Open
private readonly GenericSafeHandle _cookie;
- Exclude checks
Incorrect end of line character(s) found. Open
Open
_ = Win32Error.ThrowLastErrorIfFalse(ActivateActCtx(activationContext.Value, out nint cookie), "ComCtl32 V6 activation context activation failed.");
- Exclude checks
Incorrect end of line character(s) found. Open
Open
return file.Name;
- Exclude checks
Incorrect end of line character(s) found. Open
Open
//
- Exclude checks
Incorrect end of line character(s) found. Open
Open
// - Adapted the code to use Vanara.
- Exclude checks
Incorrect end of line character(s) found. Open
Open
public ComCtlV6ActivationContext()
- Exclude checks
Incorrect end of line character(s) found. Open
Open
- Exclude checks
Incorrect end of line character(s) found. Open
Open
using FileStream file = new(Path.GetTempFileName(), FileMode.Open);
- Exclude checks