List of available servers using .NET as it's intended

  • Thread starter Thread starter Skip Sailors
  • Start date Start date
S

Skip Sailors

I have used dbserverenum and NetServerEnum and SQLDMO and such to
generate lists of servers on a network.

Can somebody point me to an example or a method that only relies on
C#, ADO.NET and the framework? It would be nice to avoid P/Invoke.

TIA
 
Hi William,

This entry also uses platform invoke unfortunately.

I don't believe there is any way to do this currently (ie entirely in
managed code).

HTH,
 
If there is no way to do this all in managed code, do you think I
should consider this as a missing feature not yet implemented or
feature not intended to be in the framework; one that I should expect
to code in the unmanaged space?
 
Hi Skip,

I'd treat it as a feature that isn't available yet and use platform invoke
in the meantime - in a very separate piece of code that you'll replace later
:-)

HTH,
 
This has all been very enlightening. I think I am very close to the
$64k query.

Should every programmable operation on a Windows machine be
programmable in managed code? Is unmanaged code a transition while we
all figure out how garbage collection works, or are there places where
unmanaged code is legitimate? If unmanaged code is legitimate, how
does one decide between appropriate use and compromise?
 
Hi Skip,

I see all unmanaged code as a compromise but one that will be with us for
some time. The framework, by its nature, is somewhat generic and is unlikely
to ever cover all the things you might want to do on a specific platform.
Where I think it will be very interesting is as we start to work more across
other platforms.

HTH,
 
Back
Top