Add MSI database read functions#1537
Add MSI database read functions#1537russellbanks wants to merge 2 commits intojava-native-access:masterfrom
Conversation
matthiasblaesing
left a comment
There was a problem hiding this comment.
Thank you. I made a first pass. Please see the inline comments. Please also see if you can come up with unittests, that only hit the error path. You also need to check your author information, as <74878137+russellbanks@users.noreply.github.com> is not a valid e-mail address.
| * ERROR_INVALID_HANDLE - An invalid handle was passed to the function. | ||
| * ERROR_SUCCESS - The function succeeded. | ||
| */ | ||
| int MsiCloseHandle(Pointer hAny); |
There was a problem hiding this comment.
Where does the definition of hAny come from? I see this in Msi.h:
typedef unsigned long MSIHANDLE;If there is no other definition, it might be worth defining MSIHANDLE as a NativeMapped type and create MSIHandleByReference in the same as IntByReference is defined.
This would need to be updated for all call sites here.
a1859e8 to
5d22632
Compare
dblock
left a comment
There was a problem hiding this comment.
Should we add some tests that actually manipulate a test MSI? https://github.com/dblock/msiext has tons of examples ;)
This pull request adds database read functions to Msi.java:
I've added tests to MsiTest.java that verifies that they are mapped correctly.