public void testSHGetDesktopFolder() { PointerByReference ppshf = new PointerByReference(); WinNT.HRESULT hr = Shell32.INSTANCE.SHGetDesktopFolder(ppshf); assertTrue(W32Errors.SUCCEEDED(hr.intValue())); assertTrue(ppshf.getValue() != null); // should release the interface, but we need Com4JNA to do that. }
public void testSHGetFolderPath() { char[] pszPath = new char[WinDef.MAX_PATH]; assertEquals( W32Errors.S_OK, Shell32.INSTANCE.SHGetFolderPath( null, ShlObj.CSIDL_PROGRAM_FILES, null, ShlObj.SHGFP_TYPE_CURRENT, pszPath)); assertTrue(Native.toString(pszPath).length() > 0); }
public final void testSHGetSpecialFolderPath() { final char[] pszPath = new char[WinDef.MAX_PATH]; assertTrue(Shell32.INSTANCE.SHGetSpecialFolderPath(null, pszPath, ShlObj.CSIDL_APPDATA, false)); assertFalse(Native.toString(pszPath).isEmpty()); }