66using Vanara . InteropServices ;
77using Vanara . PInvoke ;
88using Vanara . Windows . Shell ;
9+ using Windows . Win32 ;
910
1011namespace Files . App . Utils . Shell
1112{
@@ -43,7 +44,7 @@ private ContextMenu(Shell32.IContextMenu cMenu, User32.SafeHMENU hMenu, IEnumera
4344
4445 public async static Task < bool > InvokeVerb ( string verb , params string [ ] filePaths )
4546 {
46- using var cMenu = await GetContextMenuForFiles ( filePaths , CMF . CMF_DEFAULTONLY ) ;
47+ using var cMenu = await GetContextMenuForFiles ( filePaths , PInvoke . CMF_DEFAULTONLY ) ;
4748
4849 return cMenu is not null && await cMenu . InvokeVerb ( verb ) ;
4950 }
@@ -112,7 +113,7 @@ public async Task<bool> InvokeItem(int itemID)
112113 return false ;
113114 }
114115
115- public async static Task < ContextMenu ? > GetContextMenuForFiles ( string [ ] filePathList , CMF flags , Func < string , bool > ? itemFilter = null )
116+ public async static Task < ContextMenu ? > GetContextMenuForFiles ( string [ ] filePathList , uint flags , Func < string , bool > ? itemFilter = null )
116117 {
117118 var owningThread = new ThreadWithMessageQueue ( ) ;
118119
@@ -140,14 +141,14 @@ public async Task<bool> InvokeItem(int itemID)
140141 } ) ;
141142 }
142143
143- public async static Task < ContextMenu ? > GetContextMenuForFiles ( ShellItem [ ] shellItems , CMF flags , Func < string , bool > ? itemFilter = null )
144+ public async static Task < ContextMenu ? > GetContextMenuForFiles ( ShellItem [ ] shellItems , uint flags , Func < string , bool > ? itemFilter = null )
144145 {
145146 var owningThread = new ThreadWithMessageQueue ( ) ;
146147
147148 return await owningThread . PostMethod < ContextMenu > ( ( ) => GetContextMenuForFiles ( shellItems , flags , owningThread , itemFilter ) ) ;
148149 }
149150
150- private static ContextMenu ? GetContextMenuForFiles ( ShellItem [ ] shellItems , CMF flags , ThreadWithMessageQueue owningThread , Func < string , bool > ? itemFilter = null )
151+ private static ContextMenu ? GetContextMenuForFiles ( ShellItem [ ] shellItems , uint flags , ThreadWithMessageQueue owningThread , Func < string , bool > ? itemFilter = null )
151152 {
152153 if ( ! shellItems . Any ( ) )
153154 return null ;
@@ -174,7 +175,7 @@ public async Task<bool> InvokeItem(int itemID)
174175
175176 public static async Task WarmUpQueryContextMenuAsync ( )
176177 {
177- using var cMenu = await GetContextMenuForFiles ( new string [ ] { $@ "{ Constants . UserEnvironmentPaths . SystemDrivePath } \" } , CMF . CMF_NORMAL ) ;
178+ using var cMenu = await GetContextMenuForFiles ( new string [ ] { $@ "{ Constants . UserEnvironmentPaths . SystemDrivePath } \" } , PInvoke . CMF_NORMAL ) ;
178179 }
179180
180181 private void EnumMenuItems ( HMENU hMenu , List < Win32ContextMenuItem > menuItemsResult , bool loadSubenus = false )
0 commit comments