Top Fields Methods
com.sun.jna.platform.win32

public Interface Shlwapi

extends StdCallLibrary
Imports
com.sun.jna.Native, .Pointer, com.sun.jna.platform.win32.ShTypes.STRRET, com.sun.jna.platform.win32.WinNT.*, com.sun.jna.ptr.PointerByReference, com.sun.jna.win32.StdCallLibrary, .W32APIOptions

Field Summary

Modifier and TypeField and Description
public static final Shlwapi
Inherited from com.sun.jna.win32.StdCallLibrary:
FUNCTION_MAPPERSTDCALL_CONVENTION

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

TRUE if the string is a valid UNC path; otherwise, FALSE.
PathIsUNC
(String
A string containing the path to validate.
path
)

Determines if a path string is a valid Universal Naming Convention (UNC) path, as opposed to a path based on a drive letter.

public WinNT.HRESULT

Returns:

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
StrRetToStr
(ShTypes.STRRET
A pointer to the STRRET structure. When the function returns, this pointer will no longer be valid.
pstr
,
Pointer
A pointer to the item's ITEMIDLIST structure. This value can be NULL.
pidl
,
PointerByReference
A pointer to an allocated string containing the result. StrRetToStr allocates memory for this string with CoTaskMemAlloc. You should free the string with CoTaskMemFree when it is no longer needed.
ppszName
)

Takes an STRRET structure returned by IShellFolder::GetDisplayNameOf and returns a pointer to an allocated string containing the display name.

Field Detail

INSTANCEback to summary
public static final Shlwapi INSTANCE

Method Detail

PathIsUNCback to summary
public boolean PathIsUNC(String path)

Determines if a path string is a valid Universal Naming Convention (UNC) path, as opposed to a path based on a drive letter.

Parameters
path:String

A string containing the path to validate.

Returns:boolean

TRUE if the string is a valid UNC path; otherwise, FALSE.

StrRetToStrback to summary
public WinNT.HRESULT StrRetToStr(ShTypes.STRRET pstr, Pointer pidl, PointerByReference ppszName)

Takes an STRRET structure returned by IShellFolder::GetDisplayNameOf and returns a pointer to an allocated string containing the display name.

Parameters
pstr:ShTypes.STRRET

A pointer to the STRRET structure. When the function returns, this pointer will no longer be valid.

pidl:Pointer

A pointer to the item's ITEMIDLIST structure. This value can be NULL.

ppszName:PointerByReference

A pointer to an allocated string containing the result. StrRetToStr allocates memory for this string with CoTaskMemAlloc. You should free the string with CoTaskMemFree when it is no longer needed.

Returns:WinNT.HRESULT

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.