In one of my domain we configured SSL and is blocked 389 port.
After that DsGetDcName()
is failing with error code 1355.
When 389 port is enabled in dc DsGetDcName()
is returning the Domain controllers.
But when 389 port is disabled in domain controller ( using windows firewall) DsGetDcName()
is is failing.
Is there any alternative method to get the Domain controller with SSL port?
Following is the sample code.
#include <dsgetdc.h>
DWORD dwRet;
PDOMAIN_CONTROLLER_INFO pdcInfo;
// Get a domain controller for the domain this computer is on.
dwRet = DsGetDcName(NULL, NULL, NULL, NULL, 0, &pdcInfo);