title image


Smiley Re: Aufzählung aller Computer im Netzwerk?
Lade Dir mal unterhttp://www.ddj.com/ftp/1998/1998_12/wnet.zipdas Beispiel des Remote Registry Blasters aus Dr. Dobbs Journal runter runter und gucke mal, was hiner dem 'Browse'-Button und in der Browse-Form passiert.Ciao,Kayschi(VISIT Kayschima Freeware - www.kayschima.de)----------------------------------------------------------Hier kommt noch ein kleiner Ausschnitt aus dem Sourcecode:----------------------------------------------------------procedure TfmBrowse.lbContainersClick(Sender: TObject);var hEnum :THandle; aBUf :array[0..63] of TNetResource; iBufSize :dword; i, iEntries :dword; rNetRez :tnetresource;begin if lbContainers.ItemIndex > -1 then begin { enumerate computers within this container } lbMachines.clear; try screen.cursor := crHourGlass; with rNetRez do begin dwScope := RESOURCE_GLOBALNET; dwType := RESOURCETYPE_ANY; dwDisplayType := RESOURCEDISPLAYTYPE_GENERIC; dwUsage := RESOURCEUSAGE_CONNECTABLE; lpLocalName := nil; lpRemoteName := pchar(lbContainers.items[lbContainers.itemindex]); lpComment := nil; lpProvider := nil; end; if WNetOpenEnum(RESOURCE_GLOBALNET, RESOURCETYPE_ANY, 0, @rNetRez, hEnum) NO_ERROR then begin ShowMessage('Could not open container: ' + string(rNetRez.lpRemoteName) + ' Error was: 0x' + inttohex(GetLastError(), 8)); exit; end; iBufsize := sizeof(abuf); iEntries := 64; while WNetEnumResource(hEnum, iEntries, @aBuf[0], iBufSize) = NO_ERROR do begin for i := 0 to (iEntries -1) do lbMachines.items.add(string(aBuf[i].lpRemoteName)); iEntries := 64; end; finally WnetCloseEnum(hEnum); screen.cursor := crDefault; end; end;end;

geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: