api for hosts / lmhosts

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John A Grandy

    api for hosts / lmhosts

    Does Windows API or .NET API offer any methods related to querying the
    mappings present in HOSTS or LMHOSTS file ?


  • Pavel Minaev

    #2
    Re: api for hosts / lmhosts

    On Aug 15, 3:58 am, "John A Grandy" <johnagrandy-at-gmail-dot-com>
    wrote:
    Does Windows API or .NET API offer any methods related to querying the
    mappings present in HOSTS or LMHOSTS file ?
    You shouldn't ever need to. Any time you do something that results in
    a DNS name resolution (such as WebRequest.Crea te() with a domain
    name), the OS itself will consult the hosts file, and similarly, every
    time there is a NetBIOS name resolution (such as File.Open() with an
    UNC path), the OS will consult lmhosts.

    Comment

    Working...