Traversing Network Neighborhood with AskFileName and w95Resources
Keywords: AskFileName w95Resources
Question:
I am wanting to process data found in directories on other machines in my Network Neighborhood.I have a dialog box which allows mw to browse directories but it only does it in Windows 3.1 fashion. I need to go up to the Desktop level and them come down to the machine/directory of my choice.
The only WIL function that appears to do this is AskFileName but this doesn't allow me to return a directory name only despite using IntControl(4,0,0,0,0).
Can this be done with my NT 4.0 machine?
Answer:
- You can do it with AskFileName, but you have to select a file (Which can then be ignored). NB: Intcontrol(4,...) is just for the DIALOG function.
- Using w95Resources or wntResources you can build an AskItemList of an ItemBox in a dialog to work this out for you.
;Win32 Net Example ResourceRoot="" ScopeConnectted=1 ScopeAll=2 ScopePersistant=3 TypeAll=0 TypeDisk=1 TypePrint=2 TypeDiskAndPrint=3 UsageAll=0 UsageConnectable=1 UsageContainer=2 UsageConnAndCont=4 oncancel="exit" AddExtender(strcat(DirHome(),"WWW9534I.DLL")) aaa=ResourceRoot aaalist=w95Resources(aaa, ScopeAll, TypeAll, UsageAll) level=0 while 1 aaa%level%=aaa if level==0 then ButtonNames("Down","Exit") else ButtonNames("Down","Up") level=level+1 goto downalevel :upalevel if level==0 then exit level=level-1 if level==0 then ButtonNames("Down","Exit") else ButtonNames("Down","Up") aaa=aaa%level% :downalevel oncancel="goto upalevel" aaalist=w95Resources(aaa, ScopeAll, TypeAll, UsageAll) aaa=AskItemList("Resource Viewer",aaalist,@tab,@sorted,@single) endwhile exit :CANCEL %oncancel% exit
Article ID: W13191Filename: Traversing Network Neighborhood using AskFileName.txt