Skip to content

Friendly overload for MsiDatabaseOpenView() is not appropriate #1655

@mjr4077au

Description

@mjr4077au

Actual behavior

The signature for the friendly overload is MsiDatabaseOpenView(SafeHandle hDatabase, string szQuery, ref MSIHANDLE phView), which doesn't match the docs as it's an out parameter, and the ref'd parameter cannot be used with MsiViewExecute() without creating my own SafeHandle or using the bare P/Invoke.

Expected behavior

The phView should be an out parameter and should typed as MsiCloseHandleSafeHandle.

Repro steps

  1. NativeMethods.txt content:
MsiDatabaseOpenView
  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.269
  • 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