From: Mike on
I use the SHBrowseForFolder function with .ulFlags = BIF_RETURNONLYFSDIRS to get a pick
folder dialog (network Shared folders). It works fine in XP but in Win7 and I assume Vista
it opens a dialog with no entries, no errors. I wasted a lot of time establishing there
were truly some shared folders with full rights on the Win7 machine and also on a
networked XP machine.

The XP machine can see and does allow selecting the shared folder on the Win7 machine
using SHBrowseForFolder.

Win7 PC doesn't see any shared folders at all. It shows a top level item called Network
Shortcuts with no sub entries.

I have been able to find info indicating I should use the IFileDialog with the
FOS_PICKFOLDERS option rather than the SHBrowseForFolder function on Vista and higher
systems but I cannot find any VB6 code examples.

Does anyone have any experience with this or got SHBrowseForFolder to work on Vista and
higher for displaying networked shared folders in a dialog?

-mike
From: Karl E. Peterson on
Mike wrote:
> I use the SHBrowseForFolder function with .ulFlags = BIF_RETURNONLYFSDIRS to
> get a pick folder dialog (network Shared folders).

You lost me right there.

BIF_RETURNONLYFSDIRS (0x00000001)
0x00000001. Only return file system directories. If the user
selects folders that are not part of the file system, the OK button is
grayed.

What, in that definition, implies anthing about /shared/ folders,
specifically?

--
..NET: It's About Trust!
http://vfred.mvps.org


From: Mike on
Karl E. Peterson <karl(a)exmvps.org> wrote:

>Mike wrote:
>> I use the SHBrowseForFolder function with .ulFlags = BIF_RETURNONLYFSDIRS to
>> get a pick folder dialog (network Shared folders).
>
>You lost me right there.
>
>BIF_RETURNONLYFSDIRS (0x00000001)
> 0x00000001. Only return file system directories. If the user
>selects folders that are not part of the file system, the OK button is
>grayed.
>
>What, in that definition, implies anthing about /shared/ folders,
>specifically?

Sorry I forgot to mention the member of BROWSEINFO which uses a constant for special
folders.

Public Const CSIDL_NETWORK = &H12
BROWSEINFO.pidlRoot = CSIDL_NETWORK

-mike
From: MikeD on


"Mike" <diespam(a)not.com> wrote in message
news:eed7r5ttoouoggderb0trceddegu1vrltt(a)4ax.com...
> I use the SHBrowseForFolder function with .ulFlags = BIF_RETURNONLYFSDIRS
> to get a pick
> folder dialog (network Shared folders). It works fine in XP but in Win7
> and I assume Vista
> it opens a dialog with no entries, no errors. I wasted a lot of time
> establishing there
> were truly some shared folders with full rights on the Win7 machine and
> also on a
> networked XP machine.
>
> The XP machine can see and does allow selecting the shared folder on the
> Win7 machine
> using SHBrowseForFolder.
>
> Win7 PC doesn't see any shared folders at all. It shows a top level item
> called Network
> Shortcuts with no sub entries.
>
> I have been able to find info indicating I should use the IFileDialog with
> the
> FOS_PICKFOLDERS option rather than the SHBrowseForFolder function on Vista
> and higher
> systems but I cannot find any VB6 code examples.
>
> Does anyone have any experience with this or got SHBrowseForFolder to work
> on Vista and
> higher for displaying networked shared folders in a dialog?


Post your code. FWIW, I've had no problems with SHBrowseForFolder in Vista
and Win7.

But as Karl mentioned, specifying BIF_RETURNONLYFSDIRS might not apply to
shared folders. This could be a difference between XP and later versions of
Windows. I don't know because as best I can remember, I've never had to be
concerned about shared folders for that dialog box (no one's ever reported
anything to me anyway).

--
Mike