To supply SHBrowseForFolder with a proper start folder, I searched for SHGetIDListFromPath and found no official version but an undocumented reference to ordinal #162 in Shell32.dll
The good news is it works under Win7

The bad news is it's pretty useless, you see the dialog and the folder, but you cannot go anywhere else, it's the only folder available :(
Any ideas? Special flags etc? I attach a test program, curious to see which Windows versions support it. Might produce an exception - who knows what happens inside Shell32 ;)
include \masm32\MasmBasic\
MasmBasic.inc ;
download (version 24 August needed)
.data?
bInfo BROWSEINFO <>
buffer db MAX_PATH dup(?)
Init Dll "Shell32"
; #162 found in some VB forums Declare #162=
SHGetIDListFromPathW, 1
mov bInfo.pidlRoot,
SHGetIDListFromPathW(
wChr$("C:\Masm32\Examples"))
mov
edi, offset buffer
mov bInfo.pszDisplayName,
edi mov bInfo.lpszTitle,
Chr$("Select a folder")
invoke SHBrowseForFolder, addr bInfo
.if eax
invoke SHGetPathFromIDList, eax,
edi .else
mov
edi,
Chr$("Nothing selected")
.endif
Inkey "Selected folder: [",
edi, "]"
Exitend start