On line 3396 of the definition module SHLOBJ.def, the procedure SHBrowseForFolderW is defined as:
PROCEDURE SHBrowseForFolderW(lpbi : LPBROWSEINFOA) : LPITEMIDLIST;
This should be corrected as follows:
PROCEDURE SHBrowseForFolderW(lpbi : LPBROWSEINFOW) : LPITEMIDLIST;
This correction is only important if you are using UNICODE.