It would only work if the code was running on a Domain Controller, is that likely to be the case?
If not there are a number of possibilities:
1. If the system running the code belongs to the domain you can use serverless binding ("LDAP://" + _path).
2. Hard-code a directory server to use (the domain name would work as a properly configured AD domain should have that resolve to the IP addresses for all domain controllers).
Chris