Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

No way to change dwClsContext parameter to CoCreateInstance #192

Description

I got 0x8004_0154 (Class not registered) when trying to create an instance of DesktopWallpaper with CLSID C2CF3110-460E-4FC1-B9D0-8A1C0C9CC4BD, where the interface is IDesktopWallpaper (https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nn-shobjidl_core-idesktopwallpaper).
Upon experimenting in C++, I found that creating such instance requires dwClsContext of CLSCTX_LOCAL_SERVER instead of CLSCTX_INPROC_SERVER. I am wondering whether it is possible to customize how we want to create an instance, or can we use CLSCTX_ALL for better compatibility.

Relevant code:
https://github.com/microsoft/com-rs/blob/master/src/runtime.rs#L124-L138

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions