Querying and updating active directory using c