Domain joined

fixed the bug and tested when no internet was available and when no corpnet was available, but internet was working.
IntPtr.Zero is just a constant value that represents a null pointer. making sure to clean up.