Skip to content

Should the Msi* methods be returning a WIN32_ERROR? #2181

@mjr4077au

Description

@mjr4077au

Actual behavior

This might be one for win32metadata, but reporting here in case it isn't. Most Msi* currently return a uint, however the return value is typically a WIN32_ERROR value. Using MsiExtractPatchXMLData() as an example, you can see it states several WIN32_ERROR values it may return.

Comparing this with something like SetNamedSecurityInfo(), this returns a DWORD (ultimately a uint), however CsWin32 returns this correctly as a WIN32_ERROR value for the caller's convenience.

Expected behavior

That if a method is returning a WIN32_ERROR value, it should be cast as that without the caller having to work it out for themselves.

Repro steps

  1. NativeMethods.txt content:
MsiExtractPatchXMLData
  1. NativeMethods.json content (if present): N/A

  2. Any of your own code that should be shared? N/A

Context

  • CsWin32 version: 0.3.0264
  • Win32Metadata version (if explicitly set by project): N/A
  • Target Framework: net472
  • LangVersion (if explicitly set by project): N/A

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