Skip to content

HINSTANCE is missing #924

Closed
Closed

Description

Actual behavior

IUIFramework.LoadUI() first parameter "instance" now has the type "HMODULE".
CsWin32 version 0.2.223-beta had for the first parameter the type "HINSTANCE".

Expected behavior

The documentation and also the header file UiRibbon.h say that the first parameter type is a HINSTANCE

Repro steps

IUIFramework Framework;
private void Method(HINSTANCE hInstance, string resourceIdent)
{
    Framework = new UIRibbonFramework() as IUIFramework;
    Framework.LoadUI(hInstance, resourceIdent);
}
  1. NativeMethods.txt content:
UIRibbonFramework
IUIFramework

  1. NativeMethods.json content (if present):
  1. Any of your own code that should be shared?

Context

  • CsWin32 version: [0.2.229-beta]
  • Win32Metadata version (if explicitly set by project):
  • Target Framework: [e.g. netstandard2.0]
  • LangVersion (if explicitly set by project): [e.g. 9]

Activity

  1. added
    bug
    on Apr 29, 2023
  2. mikebattista commented on May 1, 2023

    @mikebattista
    Contributor

    Once microsoft/win32metadata#1517 is fixed this will be resolved, but that fix is dependent on CsWin32 supporting implicit conversions between HMODULE and HINSTANCE. That's tracked by #199.

  3. harborsiem commented on May 10, 2023

    @harborsiem
    Author

    It does not work in CsWin32 version 0.2.240-beta.

  4. AArnott commented on May 10, 2023

    @AArnott
    Member

    harborsiem (@harborsiem), the fix requires a combination of CsWin32 changes (which you have) and the fix in the metadata (which has merged but has not yet shipped). Once those two things are available, CsWin32 will have to update to consume that metadata (or you could try referencing the latest metadata directly and you might get lucky).

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions