You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
StackTrace:
at System.Runtime.InteropServices.Marshal.ReleaseComObject(Object o)
at Vanara.Windows.Shell.ShellFolder.<EnumerateChildIds>d__23.<>m__Finally1()
at Vanara.Windows.Shell.ShellFolder.<EnumerateChildIds>d__23.MoveNext()
at Vanara.Windows.Shell.ShellFolder.<EnumerateChildren>d__22.MoveNext()
The root cause should be if iShellFolder.EnumObjects(parentWindow, (SHCONTF)filter, out var eo).Failed == true then it would not yield break.
Corrent one should be:
publicIEnumerable<PIDL>EnumerateChildIds(FolderItemFilterfilter/*= FolderItemFilter.Folders | FolderItemFilter.IncludeHidden | FolderItemFilter.NonFolders | FolderItemFilter.IncludeSuperHidden */,HWNDparentWindow=default,intfetchSize=20){if(iShellFolder.EnumObjects(parentWindow,(SHCONTF)filter,outvar eo).Failed){
Debug.WriteLine($"Unable to enum children in folder.");yieldbreak;}try{foreach(PIDL p ineo!.Enumerate(fetchSize))yieldreturnp;}finally{ Marshal.ReleaseComObject(eo!);}// Maybe should not call ReleaseComObject in case RCW exception}
The text was updated successfully, but these errors were encountered:
Vanara/Windows.Shell.Common/ShellObjects/ShellFolder.cs
Line 213 in 3da05fe
The root cause should be if
iShellFolder.EnumObjects(parentWindow, (SHCONTF)filter, out var eo).Failed == true
then it would not yield break.Corrent one should be:
The text was updated successfully, but these errors were encountered: