I am querying ADSI using a WINNT provider with code like this:
var User : IADSUser; begin User := GetObject('WinNT://'+domainname+'/'+username + ', user') as IADSUser; ... ...
where GetObject is defined as:
function GetObject (const Name : string): IDispatch; var Moniker : IMoniker; Eaten : integer; BindContext : IBindCtx; Dispatch : IDispatch; begin OleCheck( CreateBindCtx( 0, BindContext ) ); OleCheck( MkParseDisplayName( BindContext, PWideChar( WideString( Name ) ), Eaten, Moniker ) ); OleCheck( Moniker.BindToObject( BindContext, NIL, IDispatch, Dispatch ) ); Result := Dispatch; end;
It has been working for several years without problems. I have one installation, although in a particular domain I get the error Network path error when requesting from another domain. This setting has 4 different domains. There is full trust between domains, and the request works fine on a malicious domain when requesting from a domain. It is easy when it is checked from one of the other domains. You can request a domain using a number of other tools, so everything looks fine. Any ideas why this particular domain might give this problem?
source share