Skip to content

Friendly overload for MsiGetSummaryInformation() can't accept a null hDatabase value. #2177

@mjr4077au

Description

@mjr4077au

Actual behavior

From the docs as it's all I have to go on:

If the database specified by the MsiGetSummaryInformation function is not open, you must specify 0 for hDatabase and specify the path to the database in szDatabasePath. If the database is open, you must set szDatabasePath to 0.

If a value of uiUpdateCount greater than 0 is used to open an existing summary information stream, MsiSummaryInfoPersist must be called before closing the phSummaryInfo handle. Failing to do this will lose the existing stream information.

Expected behavior

That this SafeHandle parameter accepts null on the friendly overload and handles it interally like other SafeHandle types do.

Repro steps

  1. NativeMethods.txt content:
MsiGetSummaryInformation
  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