Help with NetServerEnum functionality 
Author Message
 Help with NetServerEnum functionality

I'm using the NetServerEnum code from Randy Birch's web site to verify
that my program can "see" a certain computer on my LAN. A problem I've
run into however, is that the computer I want to "see" is in a
different workgroup than the one where my program is running.

For example: I have 3 workgroups: Engineering, Office and Sales. I
need to be able to detect a computer in the Engineering group from a
computer in the Office group.

Can anyone here tell if this it's possible to have NetServerEnum
search ALL workgroups? Or, at least, be able to search in a specified
workgroup?

Thanks.



Mon, 09 Jan 2012 07:35:46 GMT  
 Help with NetServerEnum functionality


Quote:
> I'm using the NetServerEnum code from Randy Birch's web site to verify
> that my program can "see" a certain computer on my LAN.

That seems like an odd way to do it... why not just try to access the
server?

Quote:
> A problem I've
> run into however, is that the computer I want to "see" is in a
> different workgroup than the one where my program is running.

The NetServerEnum function has a parameter to specify the domain to
search...
http://msdn.microsoft.com/en-us/library/aa370623(VS.85).aspx


Mon, 09 Jan 2012 08:10:53 GMT  
 Help with NetServerEnum functionality


Quote:



>> I'm using the NetServerEnum code from Randy Birch's web site to verify
>> that my program can "see" a certain computer on my LAN.

>That seems like an odd way to do it... why not just try to access the
>server?

>> A problem I've
>> run into however, is that the computer I want to "see" is in a
>> different workgroup than the one where my program is running.

>The NetServerEnum function has a parameter to specify the domain to
>search...
>http://msdn.microsoft.com/en-us/library/aa370623(VS.85).aspx

This is on a LAN - there's no domain name involved. I want to search
in all workgroups or at least in a different "workgroup" than where
I'm running.


Mon, 09 Jan 2012 09:05:50 GMT  
 Help with NetServerEnum functionality


Quote:




>>> I'm using the NetServerEnum code from Randy Birch's web site to verify
>>> that my program can "see" a certain computer on my LAN.

>>That seems like an odd way to do it... why not just try to access the
>>server?

>>> A problem I've
>>> run into however, is that the computer I want to "see" is in a
>>> different workgroup than the one where my program is running.

>>The NetServerEnum function has a parameter to specify the domain to
>>search...
>>http://msdn.microsoft.com/en-us/library/aa370623(VS.85).aspx

>This is on a LAN - there's no domain name involved. I want to search
>in all workgroups or at least in a different "workgroup" than where
>I'm running.

OK - got it working. I didn't realize that "workgroup name" is
synonymous with "domain name".


Mon, 09 Jan 2012 12:03:39 GMT  
 Help with NetServerEnum functionality


Quote:






>>>> I'm using the NetServerEnum code from Randy Birch's web site to verify
>>>> that my program can "see" a certain computer on my LAN.

>>>That seems like an odd way to do it... why not just try to access the
>>>server?

>>>> A problem I've
>>>> run into however, is that the computer I want to "see" is in a
>>>> different workgroup than the one where my program is running.

>>>The NetServerEnum function has a parameter to specify the domain to
>>>search...
>>>http://msdn.microsoft.com/en-us/library/aa370623(VS.85).aspx

>>This is on a LAN - there's no domain name involved. I want to search
>>in all workgroups or at least in a different "workgroup" than where
>>I'm running.

>OK - got it working. I didn't realize that "workgroup name" is
>synonymous with "domain name".

Well, I did get it working but I've just now learned that this
function does a very poor job of actually detecting whether a computer
is on the LAN and functioning or not. I've found that, with the target
computer physically turned off, the NetServerEnum function still
reports it as being there.

Can someone suggest a function that I can use that will enable my
program to know if a given computer is not only on the LAN but is up
and running?



Tue, 17 Jan 2012 05:53:35 GMT  
 Help with NetServerEnum functionality

Quote:

> Can someone suggest a function that I can use that will enable my
> program to know if a given computer is not only on the LAN but is up
> and running?

After you enumerate, ping each address found.

This assumes that blocking pings isn't part of the local policy.

You can find code to ping wherever you found the enum code.

--
   Jim Mack
   Twisted tees at http://www.cafepress.com/2050inc
   "We sew confusion"



Tue, 17 Jan 2012 07:03:24 GMT  
 Help with NetServerEnum functionality


<cut>

Quote:
> Can someone suggest a function that I can use that will enable my
> program to know if a given computer is not only on the LAN but is up
> and running?

What do you need to do with/to the given computer if you find it is running?


Tue, 17 Jan 2012 07:14:46 GMT  
 Help with NetServerEnum functionality


Quote:

>> Can someone suggest a function that I can use that will enable my
>> program to know if a given computer is not only on the LAN but is up
>> and running?

>After you enumerate, ping each address found.

>This assumes that blocking pings isn't part of the local policy.

>You can find code to ping wherever you found the enum code.

Thanks Jim - that's what I'll do.

I'll use a routine I found on Randy's website that pings by computer
name.



Tue, 17 Jan 2012 22:20:43 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Help Converting C# NetServerEnum code

2. NetServerEnum api help

3. Help with NetServerEnum API???

4. Help !!!!!----------NetServerEnum

5. NetServerEnum-help needed

6. HELP -- Printing functionality in VB -- HELP

7. help on functionality similar to an e-mail's flag to follow-up

8. HELP: How to use the backup functionality in VB

9. Help: How to change the Alt + F4 functionality

10. Help Exposing Functionality of Objects Referenced by my DLL

11. HELP. Error 429 (License to use functionality)

12. Help Needed: MDI Functionality

 

 
Powered by phpBB® Forum Software