Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting win95 domain/workgroup name for ANETRESOURCES()
Message
From
19/01/2004 15:30:14
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Getting win95 domain/workgroup name for ANETRESOURCES()
Miscellaneous
Thread ID:
00868290
Message ID:
00868290
Views:
54
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
Reply
Map
View

Click here to load this message in the networking platform