Changeset 347 for branches/guitools-2.0/shared/smbtree.vrs
- Timestamp:
- Nov 15, 2009, 7:02:45 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/guitools-2.0/shared/smbtree.vrs
r346 r347 136 136 end 137 137 end 138 when smbtreeline.sl = "" then nop 138 139 otherwise do 139 say "Workgroup: "smbtreeline.sl140 say 'Workgroup: "'smbtreeline.sl'"' 140 141 if pos("RECEIVING",translate(smbtreeline.sl)) > 0 then do 141 142 Msg.Type = "W" … … 207 208 stat = stream(smbmachine.I,'c','open read') 208 209 if stat = "READY:" then do /* we found a readable output file */ 209 Machine = VRParseFilename(smbmachine.I,'E') 210 /* Machine = VRParseFilename(smbmachine.I,'E') */ 211 Machine = substr(smbmachine.I,pos('.',smbmachine.I)+1) 212 210 213 smbtree.!machine = _GetMachinehandle(Machine) 211 214 say ' Machine (handle) = "'machine'" ('smbtree.!machine')' … … 272 275 end 273 276 277 do until left(line,10) = '09'x||'Workgroup' 278 line = linein(smbmachine.I) 279 end 280 line = linein(smbmachine.I) 281 /* Reading workgroup and master - eventually both empty */ 282 line = linein(smbmachine.I) 283 parse var line '09'x workgroup master 284 master = strip(master) 285 286 /* we use this to set the workgroup for manually added servers */ 287 if workgroup <> "" then do 288 wgh = _GetMachinehandle(workgroup) 289 if wgh = "" then do /* This machine is in a new workgroup - add it as well */ 290 wgh = VRMethod( "CN_smbtree", "AddRecord",,, workgroup,"#62:PMWP.DLL") 291 ok = VRMethod( "CN_smbtree", "SetFieldData", wgh, WorkGroupFH, workgroup) 292 ok = VRMethod( "CN_smbtree", "SetRecordAttr", wgh, "Collapsed", 0) 293 ok = VRMethod( "CN_smbtree", "SetRecordAttr", wgh, "ReadOnly", 1) 294 ok = VRMethod( "CN_smbtree", 'SetRecordAttr', wgh, "UserData", "WORKGROUP|") 295 end 296 if wgh <> "" then ok = VRMethod('CN_smbtree', 'SetRecordAttr', smbtree.!machine, 'Parent', wgh) 297 end 298 274 299 say "_AddSharesDisplay() success and cleanup" 275 300 ok = stream(smbmachine.I,'c','close') … … 279 304 else say ' Got "'stat'" for "'smbmachine.I'"' 280 305 end 281 say "_AddSharesDisplay() loop finished"306 say "_AddSharesDisplay() loop end" 282 307 return 283 308 … … 285 310 */ 286 311 287 _GetMachinehandle: procedure 312 _GetMachinehandle: procedure /* get recordhandle by machine name (also works for workgroups) */ 288 313 Machine = translate(arg(1)) 289 314
Note:
See TracChangeset
for help on using the changeset viewer.