Skip to content

Constants like MSIDBOPEN_PATCHFILE, et al, should be PCWSTR-typed like others are. #2179

@mjr4077au

Description

@mjr4077au

Actual behavior

The raw P/Invoke for MsiOpenDatabase() accepts szPersist as a PCWSTR which matches the header, but the constants that need to be sent through are just integers.

Expected behavior

That constants be typed to the value of the underlying P/Invoke. Other P/Invokes like TaskDialog(), which takes PCWSTR constants has the constants like TD_INFORMATION_ICON properly typed as PCWSTR.

Repro steps

  1. NativeMethods.txt content:
MSIDBOPEN_PATCHFILE
  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.257
  • 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