SHBrowseForFolder function broken in Win7

I use the SHBrowseForFolder function with .ulFlags =3D =
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
=46OS_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
0
Mike
3/31/2010 9:03:27 PM
vb.general.discussion 1016 articles. 0 followers. Follow

3 Replies
2616 Views

Similar Articles

[PageSpeed] 12

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


0
Karl
3/31/2010 9:57:12 PM
Karl E. Peterson <karl@exmvps.org> wrote:

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

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

Public Const CSIDL_NETWORK =3D &H12
BROWSEINFO.pidlRoot =3D CSIDL_NETWORK

-mike
0
Mike
3/31/2010 10:40:49 PM

"Mike" <diespam@not.com> wrote in message 
news:eed7r5ttoouoggderb0trceddegu1vrltt@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

 

0
MikeD
3/31/2010 10:44:27 PM
Reply:

Similar Artilces:

Having a cell with '<' sign included within a function?
If there is a '<' sign in a cell, can the cell be included in a function? Not when the function expects a numeric value. You could use MID(A30,2,LEN(A30)-1) in place of just A3 which has <5. For example SQRT(MID(A30,2,LEN(A30)-1)) or 2*MID(A30,2,LEN(A30)-1) which is not a function but a formula. best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "Michelle" <Michelle@discussions.microsoft.com> wrote in message news:46BBCC6F-BB0C-442B-81C9-57775C9F327E@microsoft.com... > If there is a '<' sign in a cell, can the ...

About ON Mobile functionality
I've used ON on my desktop for a long time at work. I just got a phone running Windows Mobile with ON mobile on it. I wanted to try using ON at home for synching with my phone, so I downloaded a trial version of it. It's useless. Many of the menu options are disabled. I can't get it to synch with ON on my phone, another post suggested installing it into the phone from ON desktop (even though it's already there), but I can't since that menu item is disabled (there's an option on some of the menus which reads, "explain choices on this menu" wh...

How to add function to ie to parse html of current web page??
He there, i am looking for a way to add a function to ie7 or ie8 which parses the html code of the current web page and then copies parts of it to the clipboard so the data can be used via copy & paste. Any hints on how to add this kind of functionality would be highly appreciated. thx. Leon wrote: > He there, > > i am looking for a way to add a function to ie7 or ie8 which parses the > html code of the current web page and then copies parts of it to the > clipboard so the data can be used via copy & paste. > > Any hints on how to add ...

IF Function with Dates
Hello, I hope someone can help me. I would like to create an IF function for dates in my worksheet. I have a Start Date column and End Date column. If the date in the Start Date and End Date falls within the Fiscal Year(06), then I want to display a 1, otherwise a 0(zero). A1=7/01/06 (Start Date); B1=6/30/10 (End Date) FY06 is from 7/1/2005 to 6/30/2006 What I have in C1 is =IF(AND(A1>=7/1/2005,B1<=6/30/2006),1,0) My result for FY06 is 0, but that's not correct because the End Date is not until 12/31/2010, so it falls within the FY06. I want this formula to...

functional currency
I set up a new company, and copied some data over. When I try opeining an item its asks me to set the functional currency. I went into setup and tried to set it, it saves doesnt give me any messages but it is still asking me to set the functional currency. This is a new company that was just set up, any direction on this would be great. Thanks! If you go back to your window after you saved can you see the change you made, or it's back the original value? "Dave" <Dave@discussions.microsoft.com> wrote in message news:19DF177D-168D-4C7A-B1EF-38CB7244C939@microsoft.com....

SHBrowseForFolder
I want to set the pidlRoot member of the BROWSEINFO structure to a default location. How do I get a PIDL from a path represented by a text string like this: _T("C:\Program Files")? Thanks I'm not certain about the pidl for an arbitrarily named folder, but if your real interest is the "Program Files" folder, then you shouldn't use a text string anyway, since the text is user-selectable and in fact changes based on language locales. For "Program Files" and other special folders, you can get the pidl using the SHGetFolderLocation function, passing in a CS...

IS functions
Hello, Sorry to raise this issue again, but I'm still having trouble using the IS functions, here's the latest manifestation (running Excel 97) This formula works perfectly fine in my spreadsheet: =IF( ISNA(MATCH(0,A1:H1,0)),"Zero NOT found","Zero found") However, a similar statement in VBA code generates an error message if '0' is not present (e.g., N/A), but works if '0' is present. Set rng = Range("A1:H1") If WorksheetFunction.IsNA(WorksheetFunction.Match(0, rng, 0)) Then MsgBox "Zero NOT found": Exit Sub Else MsgB...

Nesting Address function within Index function
I'm trying to use a nested Address function within an Index function, but I'm getting errors. Here's a sample of my function which is giving me an error I cannot figure out: =INDEX(address(20,1,1,true):address(30,4,1,true),1,2) With this function, I'm trying to get the contents of the first row, second column from an array that begins in cell A20 and ends in cell D30. I want to use the address function because I will not know the beginning and ending cell of the array. mserber Wrote: > I'm trying to use a nested Address function within an Index function >...

Flawed scatter plot function
I always use scatter plots to visualize my data and after I upgraded to Excel 2007, something weird started to happen. What I do to is to Insert --> Scatter --> "Scatter with only markers", then I get a blank chart. Now I select the chart and type in "Series(, x range, y rang, 1)" and hit enter, now it gives me a chart with both markers and lines, so I have to go back to Insert --> scatter --> "Scatter with only markers" again and get rid of the connecting line. I'd love to hear suggestions on how to fix this, this is really annoying. I don...

If function using cell format as the condition
I would like to create an "If" logical function formula, where the "true" condition is based on the format of the cell. For instance, if cell b3 is formatting with a fill color, then add that number; if not, then add zero. Can anyone help? That will need VBA, unless the fill colour is derived from conditional formatting (in which case you could impose an equivalent condition). -- David Biddulph "Janie" <Janie@discussions.microsoft.com> wrote in message news:25499DED-25B8-4E7D-8CA2-A22788839E56@microsoft.com... >I would like to create...

functional currency #3
Hi their i entered the functional curreny then GP says check links for Multycurrency setup file to update currency field !!!!!!!!!!!! i went to made a purchase order entry , GP says order processing setup is missing or dameged !!!!!!!!!!!!!!! Thanks It seems Purchase Order Processing never setup, go to Tools --> Setup --> Purchasing --> Purchase Order Processing, and click on OK. Regards, -- Regards, -- Mohammad R. Daoud MCP, MCBMSP, MCTS, MCBMSS Mob: +962 - 79 -999 65 85 Great Package For Business Solutions daoudm@greatpbs.com http://www.greatpbs.com http://mohdaoud.blogspot.c...

SHBrowseForFolder Subclassing.
I would like to change the name of the "cancel" button. Is that possible with Subclassing, Superclassing, etc.? ....Bruce Maybe this article can help you: http://www.codeproject.com/dialog/browse_for_folder_dialog.asp -- Mav Rossi "Bruce Arnold" <b_a_r_n_o_l_d@b_l_a_s_t.n_e_t> ha scritto nel messaggio news:cka5tv4rf6mq086b1nf6t6gom5rgds0a33@4ax.com... > I would like to change the name of the "cancel" button. Is that > possible with Subclassing, Superclassing, etc.? > ...Bruce > > And this too: http://www.codeproject.com/dialog/browse...

DatePart Function in Reverse!...
Hi All I have a problem in that I have inherited a database that holds the date value as a dayofyear number. So December 25 would be = 360 I know that DatePart will find the dayofyear (eg datepart("y",#25/12/2008#) would return 360) Does anyone know how I can use the value 360 to find the date? many thanks for your help. John Using DateAdd or DateSerial functions. DateAdd("d",TheNumber-1,#1/1/2007#) The base date is the first day of the year - whichever year you are using DateSerial(2007,1,TheNumber) -- John Spencer Access MVP 2002-2005, 2007-2008 Center for...

ERM should have a "cleared difference" functionality like GP BR
Like normal GP Bank Rec - within ERM you should be able to enter differences within ERM (Match Transactions window) whereas currently if the amounts do not match in this window you end up having to delete the statement line in the Match Transactions window, entering an additional transaction and then going into the CBM Transaction Reconcile window to reconcile these 2. Not ideal!! ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. ...

Logic Function
I am attempting to create an IF function which test whether or not a cell is empty. If the cell contains data, it will contain a text entry. The form I need it to take is if(A1 is empty, "--", C1*0.005). I am not sure how to specify the IS EMPTY test of the contents of A1. Thanks for any help. Paul, IF(A1="", "--", C1*0.005) John "Paul Axelrod" <bergencoop@yahoo.com> wrote in message news:6a24e441.0312280825.5c52c5e9@posting.google.com... > I am attempting to create an IF function which test whether or not a > cell is empty. If the cel...

How can I use engineering functions in Excel 2003
How can I use engineering functions in Excel 2003 in my package (excel 2003) they are absent. You mean the functions in the Analysis Toolpak? If yes, tools|addins|check analysis toolpak. (You may have to have the installation CD available if you didn't install this.) kolgen wrote: > > How can I use engineering functions in Excel 2003 in my package (excel 2003) > they are absent. -- Dave Peterson ...

Can I call built-in functions from my add-in function?
I have a new add-in module (test.xlam) in Excel 2007. One of the functions it contains is: Function Circum(radius As Variant) Circum = 2 * Pi() * radius End Function If I put "=circum(3)" in a cell in a worksheet, I get the Compile error: "Sub or Function not defined" with the Pi() highlighted. What's odd is that wjen I coded it as "pi()", it corrected it to "Pi()", so it seems to know about the function. If I code "=pi()" in a cell in the same workbook, I get the value of pi. What do I have to do to be able to call built-i...

If Function #18
I want to put a sum in the "value if true". What i want to achieve is that i add 10% to the value of th neighbouring cell if another cell contains yes and to copy the amoun form the first cell if the second cell says no. I hope this make sense. You were all very helpful last time i posted a question so hope it works. Got to impress the boss!! -- Till ----------------------------------------------------------------------- Tilly's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2180 View this thread: http://www.excelforum.com/showthread.php?threadid=383...

Lookup Function #9
When using a lookup function, it is referencing the text of the formulas in the table array cells instead of the result of the formulas. How do I correct this? Josh Either you are in Formula View or the formula cells are formatted as text. Changing the Format alone won't do the trick. For the first, hit CTRL + `(back quote above TAB key) to toggle View Formulas on/off. For the second, Format the cells to General then F2 and ENTER to see results. If you have already done a great whack of these formulas, select all and Edit>Replace what: = with: = Replace All and OK. Gord D...

now function
I got a cell A1 with a now function =now() which gives the current time. Cell A2 has a time that is entered, and cell A3 has an if function that compared if(A1>A2,"","Do Something"). However, the if statement is true all the time even if the time is cell A2 is a later time than A1. I changed the format in cell A1 from a time format to a general and it turn out to be a big number. Otherwise, I changed the time format in cell A2 into general and it is a very small decimal number. How do I get around this, may with a mod function or something? NOW gives both ...

Function help please.
I am a teacher and have an excel spreadsheet (2003) with student's marks in various columns. Each column represents a quiz/exam/OP or assignment and they are all out of different totals. I need to know how to: 1) reduce each column to it's percentage value (example to follow) and, 2) to sum up totals from each row into a percentage final mark. Assume we are using A1 as the first 5% piece of information, so the marks in the columns would go from: A4:A34, B4:B34, etc Thanks in advance, Andrew 5% 5% 15% 30% 30% 15% 26 marks 20 marks 40 marks 60 marks 55 marks Qu...

Win7 Virtual WiFi
Hi, This is regarding the following NDISTest requirement in Win7 premium logo certification of WLAN miniport driver VWiFi: Two concurrent STA connections A) Since the wdk documentation states that virtual wifi is not possible without a hosted network Does the above requirement means that there should be three ports created in the miniport driver in the following manner PORT 0 -àDefault port in client, [OP STATE] PORT 1 -àFor Hosted network(Soft-AP) , [INIT STATE] PORT 2 -àVSTA operating in client mode , [OP STATE] B) 1) Can the VS...

Syntax for IF function
I would like to average the values in column B that lie between 2 value in column A. What I have so far is =average(if($A3:$A100, ...value i column A is less than 46 and greater than 34..., "" ""). I have bee unable to express the second term with the correct syntax. I assume that it would be ,<46>34. So what is it? Thank you in advance -- Sarah this idea? =AVERAGE(IF((C1:C21>2)*(C1:C21<5),C1:C21)) of course you realize that this is an array formula that must be entered using ctrl+shift+enter -- Don Guillett SalesAid Software dguillett1@austin.rr.com &qu...

Another Len function not working
Thanks for your time I have this code: Private Sub txtUser1_AfterUpdate() On Error GoTo txtUser1_AfterUpdate_Error If Len(Nz(Me!txtUser1, "")) = 0 Then MsgBox "does it work" Me.txtUser1.SetFocus End If On Error GoTo 0 Exit Sub txtUser1_AfterUpdate_Error: Err.Description = Err.Description & " In Procedure " & "txtUser1_AfterUpdate of VBA Document Form_LoginTest" Call LogError(Err.Number, Err.Description, "txtUser1_AfterUpdate") End Sub It will work if there is a space entered in the text bo...

Logic Function Help�
Hello: I am trying to incorporate an IF Logic function into my worksheet bu it doesn�t seem to work. I am working on a body fat calculator, and one of the components o this calculator is the gender of the individual. I have a drop dow menu in a cell, with Male and Female for choices. This is in cell B2. In cell B9, I have the formulas for Body Density and Body fa incorporated together. They are as follows: 1. Body Density (BD): 1.109380 - [0.0008267 x (SKF)] + [0.0000016 (SKF)2] - (0.0002574 x Age) 2. Body Fat (in percent): [(4.95/Db) - 4.5] x 100 (From Jackson & Pollock (1978))...