Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion WinQuickLook.App/WinQuickLook.App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<ItemGroup>
<PackageReference Include="Hardcodet.NotifyIcon.Wpf" Version="2.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.2" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.3" />
</ItemGroup>

<ItemGroup>
Expand Down
32 changes: 16 additions & 16 deletions WinQuickLook.App/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
},
"Microsoft.Extensions.DependencyInjection": {
"type": "Direct",
"requested": "[10.0.2, )",
"resolved": "10.0.2",
"contentHash": "J/Zmp6fY93JbaiZ11ckWvcyxMPjD6XVwIHQXBjryTBgn7O6O20HYg9uVLFcZlNfgH78MnreE/7EH+hjfzn7VyA==",
"requested": "[10.0.3, )",
"resolved": "10.0.3",
"contentHash": "2DLOmC0EkB2smVK8lPP1PIKEgL1arE3CMp9XSIQB/Y7ev5nnnyuM/PizKJ6QfLD08QCYoopSC9SFdbYglDomYg==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.2"
"Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.3"
}
},
"AvalonEdit": {
Expand All @@ -29,26 +29,26 @@
},
"Markdig": {
"type": "Transitive",
"resolved": "0.44.0",
"contentHash": "X+CYMjcUnh/yO24wOSQxVFLiGqWrrtXJ5M7toHiM1Zk4Fg9UMLN5fkaq6FSOWH+mIprsHHgDMlq3MJhmrXalhg=="
"resolved": "0.45.0",
"contentHash": "ObNLcA1b+0lpNNoEg256g9faMeJZi35wZW0AnKJ4nGPJe+5qkwnV26kUvQTHuanFnSX9SdvPzOO41BVJ6XarAg=="
},
"Microsoft.Extensions.DependencyInjection.Abstractions": {
"type": "Transitive",
"resolved": "10.0.2",
"contentHash": "zOIurr59+kUf9vNcsUkCvKWZv+fPosUZXURZesYkJCvl0EzTc9F7maAO4Cd2WEV7ZJJ0AZrFQvuH6Npph9wdBw=="
"resolved": "10.0.3",
"contentHash": "bwGMrRcAMWx2s/RDgja97p27rxSz2pEQW0+rX5cWAUWVETVJ/eyxGfjAl8vuG5a+lckWmPIE+vcuaZNVB5YDdw=="
},
"Microsoft.Web.WebView2": {
"type": "Transitive",
"resolved": "1.0.3719.77",
"contentHash": "t+ucyKw5NTwMjsUrDF6R9Lk40lpcKQD1/HgyGFxl49tdA4h9dKlsj6FYGEmDRpFNfnTpENuTypMcdbrlkqBdDA=="
"resolved": "1.0.3800.47",
"contentHash": "vluoF9sqb72AB02yYs1UXW/2/VsxOMl2idiFJNvG993sOw3bHJvjHXmd3tqevTd9s3Md/9FgEzkOXoUl2Nb/ww=="
},
"winquicklook.core": {
"type": "Project",
"dependencies": {
"AvalonEdit": "[6.3.1.120, )",
"Cylinder.WPF": "[1.0.0-preview.2, )",
"Markdig": "[0.44.0, )",
"Microsoft.Web.WebView2": "[1.0.3719.77, )",
"Markdig": "[0.45.0, )",
"Microsoft.Web.WebView2": "[1.0.3800.47, )",
"WinQuickLook.CsWin32": "[1.0.0, )"
}
},
Expand All @@ -59,15 +59,15 @@
"net10.0-windows10.0.26100/win-arm64": {
"Microsoft.Web.WebView2": {
"type": "Transitive",
"resolved": "1.0.3719.77",
"contentHash": "t+ucyKw5NTwMjsUrDF6R9Lk40lpcKQD1/HgyGFxl49tdA4h9dKlsj6FYGEmDRpFNfnTpENuTypMcdbrlkqBdDA=="
"resolved": "1.0.3800.47",
"contentHash": "vluoF9sqb72AB02yYs1UXW/2/VsxOMl2idiFJNvG993sOw3bHJvjHXmd3tqevTd9s3Md/9FgEzkOXoUl2Nb/ww=="
}
},
"net10.0-windows10.0.26100/win-x64": {
"Microsoft.Web.WebView2": {
"type": "Transitive",
"resolved": "1.0.3719.77",
"contentHash": "t+ucyKw5NTwMjsUrDF6R9Lk40lpcKQD1/HgyGFxl49tdA4h9dKlsj6FYGEmDRpFNfnTpENuTypMcdbrlkqBdDA=="
"resolved": "1.0.3800.47",
"contentHash": "vluoF9sqb72AB02yYs1UXW/2/VsxOMl2idiFJNvG993sOw3bHJvjHXmd3tqevTd9s3Md/9FgEzkOXoUl2Nb/ww=="
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion WinQuickLook.Core.Tests/WinQuickLook.Core.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.4">
<PackageReference Include="coverlet.collector" Version="8.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
18 changes: 9 additions & 9 deletions WinQuickLook.Core.Tests/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"net10.0-windows10.0.26100": {
"coverlet.collector": {
"type": "Direct",
"requested": "[6.0.4, )",
"resolved": "6.0.4",
"contentHash": "lkhqpF8Pu2Y7IiN7OntbsTtdbpR1syMsm2F3IgX6ootA4ffRqWL5jF7XipHuZQTdVuWG/gVAAcf8mjk8Tz0xPg=="
"requested": "[8.0.0, )",
"resolved": "8.0.0",
"contentHash": "EMkj/2F6n6IVPrvGYkqzGJs6phuGGkq6N+E7KW9rNyzNxXbwQ1KfMqWyXNf9nCNEQOA6IjFwmOLvkriwKE7Orw=="
},
"Microsoft.NET.Test.Sdk": {
"type": "Direct",
Expand Down Expand Up @@ -71,8 +71,8 @@
},
"Markdig": {
"type": "Transitive",
"resolved": "0.44.0",
"contentHash": "X+CYMjcUnh/yO24wOSQxVFLiGqWrrtXJ5M7toHiM1Zk4Fg9UMLN5fkaq6FSOWH+mIprsHHgDMlq3MJhmrXalhg=="
"resolved": "0.45.0",
"contentHash": "ObNLcA1b+0lpNNoEg256g9faMeJZi35wZW0AnKJ4nGPJe+5qkwnV26kUvQTHuanFnSX9SdvPzOO41BVJ6XarAg=="
},
"Microsoft.ApplicationInsights": {
"type": "Transitive",
Expand Down Expand Up @@ -135,8 +135,8 @@
},
"Microsoft.Web.WebView2": {
"type": "Transitive",
"resolved": "1.0.3719.77",
"contentHash": "t+ucyKw5NTwMjsUrDF6R9Lk40lpcKQD1/HgyGFxl49tdA4h9dKlsj6FYGEmDRpFNfnTpENuTypMcdbrlkqBdDA=="
"resolved": "1.0.3800.47",
"contentHash": "vluoF9sqb72AB02yYs1UXW/2/VsxOMl2idiFJNvG993sOw3bHJvjHXmd3tqevTd9s3Md/9FgEzkOXoUl2Nb/ww=="
},
"Microsoft.Win32.Registry": {
"type": "Transitive",
Expand Down Expand Up @@ -225,8 +225,8 @@
"dependencies": {
"AvalonEdit": "[6.3.1.120, )",
"Cylinder.WPF": "[1.0.0-preview.2, )",
"Markdig": "[0.44.0, )",
"Microsoft.Web.WebView2": "[1.0.3719.77, )",
"Markdig": "[0.45.0, )",
"Microsoft.Web.WebView2": "[1.0.3800.47, )",
"WinQuickLook.CsWin32": "[1.0.0, )"
}
},
Expand Down
4 changes: 2 additions & 2 deletions WinQuickLook.Core/WinQuickLook.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<ItemGroup>
<PackageReference Include="AvalonEdit" Version="6.3.1.120" />
<PackageReference Include="Cylinder.WPF" Version="1.0.0-preview.2" />
<PackageReference Include="Markdig" Version="0.44.0" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3719.77" />
<PackageReference Include="Markdig" Version="0.45.0" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3800.47" />
</ItemGroup>

<ItemGroup>
Expand Down
12 changes: 6 additions & 6 deletions WinQuickLook.Core/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
},
"Markdig": {
"type": "Direct",
"requested": "[0.44.0, )",
"resolved": "0.44.0",
"contentHash": "X+CYMjcUnh/yO24wOSQxVFLiGqWrrtXJ5M7toHiM1Zk4Fg9UMLN5fkaq6FSOWH+mIprsHHgDMlq3MJhmrXalhg=="
"requested": "[0.45.0, )",
"resolved": "0.45.0",
"contentHash": "ObNLcA1b+0lpNNoEg256g9faMeJZi35wZW0AnKJ4nGPJe+5qkwnV26kUvQTHuanFnSX9SdvPzOO41BVJ6XarAg=="
},
"Microsoft.Web.WebView2": {
"type": "Direct",
"requested": "[1.0.3719.77, )",
"resolved": "1.0.3719.77",
"contentHash": "t+ucyKw5NTwMjsUrDF6R9Lk40lpcKQD1/HgyGFxl49tdA4h9dKlsj6FYGEmDRpFNfnTpENuTypMcdbrlkqBdDA=="
"requested": "[1.0.3800.47, )",
"resolved": "1.0.3800.47",
"contentHash": "vluoF9sqb72AB02yYs1UXW/2/VsxOMl2idiFJNvG993sOw3bHJvjHXmd3tqevTd9s3Md/9FgEzkOXoUl2Nb/ww=="
},
"winquicklook.cswin32": {
"type": "Project"
Expand Down
48 changes: 27 additions & 21 deletions WinQuickLook.CsWin32/FriendlyOverloadExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,21 @@ public static HRESULT QueryService<T>(this IServiceProvider serviceProvider, in
return hr;
}

public static HRESULT GetFolder<T>(this IFolderView folderView, out T ppv)
extension(IFolderView folderView)
{
var hr = folderView.GetFolder(typeof(T).GUID, out var o);
ppv = (T)o;
return hr;
}
public HRESULT GetFolder<T>(out T ppv)
{
var hr = folderView.GetFolder(typeof(T).GUID, out var o);
ppv = (T)o;
return hr;
}

public static unsafe void Item(this IFolderView folderView, int iItemIndex, out nint ppidl)
{
fixed (nint* ppidlLocal = &ppidl)
public unsafe void Item(int iItemIndex, out nint ppidl)
{
folderView.Item(iItemIndex, (UI.Shell.Common.ITEMIDLIST**)ppidlLocal);
fixed (nint* ppidlLocal = &ppidl)
{
folderView.Item(iItemIndex, (UI.Shell.Common.ITEMIDLIST**)ppidlLocal);
}
}
}

Expand Down Expand Up @@ -55,21 +58,24 @@ public static unsafe HRESULT get_HWND(this IWebBrowserApp webBrowserApp, out HWN
}
}

public static HRESULT Item<T>(this IShellWindows shellWindows, object index, out T folder)
extension(IShellWindows shellWindows)
{
var hr = shellWindows.Item(index, out var o);
folder = (T)o;
return hr;
}

// ReSharper disable once InconsistentNaming
public static unsafe HRESULT FindWindowSW<T>(this IShellWindows shellWindows, in object pvarLoc, in object pvarLocRoot, int swClass, out HWND phwnd, int swfwOptions, out T ppdispOut)
{
fixed (HWND* phwndLocal = &phwnd)
public HRESULT Item<T>(object index, out T folder)
{
var hr = shellWindows.FindWindowSW(pvarLoc, pvarLocRoot, swClass, (int*)phwndLocal, swfwOptions, out var o);
ppdispOut = (T)o;
var hr = shellWindows.Item(index, out var o);
folder = (T)o;
return hr;
}

// ReSharper disable once InconsistentNaming
public unsafe HRESULT FindWindowSW<T>(in object pvarLoc, in object pvarLocRoot, int swClass, out HWND phwnd, int swfwOptions, out T ppdispOut)
{
fixed (HWND* phwndLocal = &phwnd)
{
var hr = shellWindows.FindWindowSW(pvarLoc, pvarLocRoot, swClass, (int*)phwndLocal, swfwOptions, out var o);
ppdispOut = (T)o;
return hr;
}
}
}
}