Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting win95 domain/workgroup name for ANETRESOURCES()
Message
De
19/01/2004 15:30:14
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Getting win95 domain/workgroup name for ANETRESOURCES()
Divers
Thread ID:
00868290
Message ID:
00868290
Vues:
52
How does someone find out the name of the workgroup or domain in windows 95-98-ME, or Windows 2000/XP? I understand that winnt and win9x handle this differently.

When I try to put a "" in the =ANETRESOURCES() domain section I only get fake placeholders of "Microsoft Windows Network" which it does not allow me to drill down into. Maybe if I could get the workgroup or domain name then I think this code will work.

From: Ed Johnson

***********************************************************
SET EXACT ON

searchfor = ""

accept "query what (blank=all - will hang on nonexisting domain!)" to searchfor

DO iteratenet WITH searchfor

WAIT WINDOW "all done!"

PROCEDURE iteratenet
PARAMETERS lookfor

? "searching for:", lookfor

LOCAL myres
DIMENSION myres(1)
myres(1)=""

LOCAL num
num = 0
num = ANETRESOURCES(myres,lookfor,0)

LOCAL i
i = 0

FOR i = 1 TO num
if(myres(i) != lookfor)
iteratenet(myres(i))
endif
ENDFOR

return
Répondre
Fil
Voir

Click here to load this message in the networking platform