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

Windows 11 error: COMError: (-2147467262, 'No such interface supported', (None, None, None, 0, None)) #292

Open
reckoner opened this issue Apr 29, 2022 · 2 comments

Comments

@reckoner
Copy link

     24 )
     25 pObject = POINTER(cls)()
---> 26 pServiceProvider.QueryService(
     27     clsid or cls._iid_,
     28     cls._iid_,
     29     pObject,
     30 )
     31 return pObject

COMError: (-2147467262, 'No such interface supported', (None, None, None, 0, None))

This works fine on my windows 10 machine. Not sure what to do with this on Windows 11.

@vasily-v-ryabov
Copy link
Collaborator

Do you have some minimal reproducing code sample?

@kdschlosser
Copy link
Contributor

kdschlosser commented Dec 12, 2022

The following code in an incorrect way to call QueryService if QueryService is from the IServiceProvider class

pServiceProvider.QueryService(
    clsid or cls._iid_,
    cls._iid_,
    pObject,
)

you need to only pass the IID of the service and also the interface Not a pointer to the interface.

so as follows

pObject = pServiceProvider.QueryService(
    cls._iid_,
    cls
)

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

3 participants