Skip to content

E_NOTFOUND returns the infotech.h value instead of the Win32 error HRESULT #2251

@jeremy-visionaid

Description

@jeremy-visionaid

Actual behavior

E_NOTFOUND generates:

internal static readonly winmdroot.Foundation.HRESULT E_NOTFOUND = (winmdroot.Foundation.HRESULT)(-2147479539);

This is the value from infotech.h:

./um/infotech.h:#define E_NOTFOUND _HRESULT_TYPEDEF_(0x8000100DL)

Expected behavior

internal static readonly winmdroot.Foundation.HRESULT E_NOTFOUND = (winmdroot.Foundation.HRESULT)(-2147023728);

Which is the HRESULT for ERROR_NOT_FOUND (um/xamlOM.h and um/devicetopology.h and ./um/mmdeviceapi.h)

i.e.

#define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)

Repro steps

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

Context

  • CsWin32 version: 0.3.275
  • Win32Metadata version (if explicitly set by project):
  • Target Framework: net10.0-windows10.0.26100.0
  • LangVersion (if explicitly set by project): [e.g. 9]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions