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

Error with Activator.CreateInstance() Type.GetTypeFromCLSID(new Guid(ComInterfaceIds.DEVICE_ENUMERATOR_CID)); #61

Open
ZaCkOX opened this issue Jan 4, 2023 · 1 comment

Comments

@ZaCkOX
Copy link

ZaCkOX commented Jan 4, 2023

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MethodAccessException: Method System.__ComObject..ctor()' is inaccessible from method System.__ComObject..ctor()'.

I have tried changing all internals to public, is it possible something else is wrong? This is on a Windows 10. Not sure what else you would need to know...

Thank you

@xenolightning
Copy link
Owner

That's pretty strange. It shouldn't be related to class access modifiers. It looks like it's having an issue creating the underlying com object.

What version of Windows and .NET are you running?

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

2 participants