Re: Sockets on Windows (and DuplicateHandle, CloseHandle)



(Sorry, resending as e-mail was accidently not sent to the list)

Hello Ryan,

Few of my quick thoughts...
...
What I want to know:

  - are LSPs the only reason that I can't use CloseHandle and
  DuplicateHandle on
    socket handles (ie: if there are no LSPs around, will everything be
    OK)?
I don't think so. Saw this thread with this quick search: http://microsoft.public.win32.programmer.networks.narkive.com/EoNck2gO/does-closesocket-call-closehandle-internally.

The MSDN documentation explicitly states that one should not use CloseHandle/DuplicateHandle on sockets, due to internal resource management issues.

https://msdn.microsoft.com/en-us/library/windows/desktop/ms724211%28v=vs.85%29.aspx https://msdn.microsoft.com/en-us/library/windows/desktop/ms724251%28v=vs.85%29.aspx
  - how common are LSPs in practice?
They could be used in parental control programs (it is done as a LSP Vista's and 7's parental controls) and anti-virus/anti-malware programs as well, such as in older Avira and Sophos, so could be widespread.

https://msdn.microsoft.com/en-us/library/windows/desktop/ms711710%28v=vs.85%29.aspx

For the last 2 questions, need to look further, but this is what I can find out at this point.

With blessings.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]