There is a way of doing this, first download the DNS OCX component from ww.dart.com,install it. Next open a new project add the DNS component, there is example code on the site on how to use it. Hope this helps.
A quick keyword search in this forum would find most of the drawbacks, but here's a summary: the environment variables, which are what are returned by Environ, can be easily modified by the user and/or other applications. They are therefore not guaranteed to contain correct information.
Have a look at thread222-542981 for a discussion on Environ
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'People who live in windowed environments shouldn't cast pointers.'
Strongm - don't want to get into a pissing contest with you,but....I think your blanket dismissal of Environ is a bit of an overkill. I believe Environ has its uses.
I work as a developer on production support of a large scale, thin-client intranet based app used by thousands of employees on a daily basis. We use Environ in selected circumstances with no problem. If an end user did change some of their environment settings then they risk losing access to the app. They would learn pretty quickly after a call to the help desk not to do that again.
A lot of people read and trust your statements (including me!), so I would be more hesitant before issuing a pronouncement like that without at least mentioning a reason.
Perhaps it is just a personal foible, but given two function calls that supposedly return the same result, one of which I know is not guaranteed to give 100% reliable results, and another that is...well, I prefer the reliable one and would always recommend it over the unreliable one.
> They would learn pretty quickly after a call to the help desk not to do that again
Bearing in mind it may have nothing to do with the user. The setting may have been modified by an external application. I think I would tend to go for a more reliable solution as well.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.