From: "Morris, Chris" Date: 2002-03-07T06:49:27+09:00 Subject: RE: WIN32OLE and LDAP > In .vbs I can do: > > set ldap = GetObject("LDAP:") > > I tried: > > ldap = WIN32OLE.connect("LDAP:") > > ... but it doesn't like it: After a little research, it would appear that the GetObject call with a moniker (BLAH:) instead of a ProgID (Object.Thing), requires totally different calls behind the scenes. I found this Delphi code to recreate GetObject: function GetObject(UserName: string): IUnknown; var BindCtx: IBindCtx; Mk: IMoniker; chEaten: integer; begin OleCheck(CreateBindCtx(0, BindCtx)); OleCheck(MkParseDisplayName(BindCtx, PWideChar(WideString(UserName)), chEaten, Mk)); OleCheck(Mk.BindToObject(BindCtx, nil, IUnknown, Result)); end; The win32ole.c code calls ClsIdFromProgID -- obviously expecting a ProgID and not a moniker. Chris