public void testMsiEnumComponents() { char[] componentBuffer = new char[40]; assertTrue( W32Errors.ERROR_SUCCESS == Msi.INSTANCE.MsiEnumComponents(new WinDef.DWORD(0), componentBuffer)); String component = new String(componentBuffer).trim(); assertTrue(component.length() > 0); }
public void testMsiLocateComponentW() { char[] componentBuffer = new char[40]; assertTrue( W32Errors.ERROR_SUCCESS == Msi.INSTANCE.MsiEnumComponents(new WinDef.DWORD(0), componentBuffer)); String component = new String(componentBuffer).trim(); char[] pathBuffer = new char[WinDef.MAX_PATH]; IntByReference pathBufferSize = new IntByReference(pathBuffer.length); Msi.INSTANCE.MsiLocateComponentW(new WString(component), pathBuffer, pathBufferSize); String path = new String(pathBuffer, 0, pathBufferSize.getValue()).trim(); assertTrue(path.length() > 0); }