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: 2 additions & 0 deletions Files.Launcher/Files.Launcher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<WarningLevel>4</WarningLevel>
<LangVersion>8.0</LangVersion>
<UseVSHostingProcess>false</UseVSHostingProcess>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -37,6 +38,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>8.0</LangVersion>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
Expand Down
6 changes: 6 additions & 0 deletions Files.Launcher/Win32API_ContextMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,12 @@ private static void EnumMenuItems(

private static string GetCommandString(Shell32.IContextMenu cMenu, uint offset, Shell32.GCS flags = Shell32.GCS.GCS_VERBW)
{
if (offset > 5000)
{
// Hackish workaround to avoid an AccessViolationException on some items,
// notably the "Run with graphic processor" menu item of NVidia cards
return null;
}
SafeCoTaskMemString commandString = null;
try
{
Expand Down