Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IEnumFromCom throw exception: System.Reflection.TargetParameterCountException: Parameter count mismatch. #400

Closed
zhuxb711 opened this issue May 16, 2023 · 0 comments

Comments

@zhuxb711
Copy link

I'm trying to enum a Shell32.IEnumObjects retrieved from Shell32.IApplicationDocumentLists.GetList() but got System.Reflection.TargetParameterCountException: Parameter count mismatch.

var hr = (HRESULT)ComInvoke("Next", para);

at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)   
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)  
at Vanara.Collections.IEnumFromCom`1.ComEnumWrapper`1.ComInvoke(String meth, Object[] p)   
at Vanara.Collections.IEnumFromCom`1.ComEnumWrapper`1.ComObjTryGetNext(UInt32 celt, TItem[] rgelt, UInt32& celtFetched)  
at Vanara.Collections.IEnumFromCom`1.TryGet(TItem& item)   
at Vanara.Collections.IEnumFromNext`1.Enumerator.System.Collections.IEnumerator.MoveNext()
at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)  
at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
@dahall dahall closed this as completed in 736c4f6 May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant