Hi Jet:
I'm afraid I don't have any experience with SharePoint at this time,
but I doubt you can cast an SPUser to an IADsUser. You probably want
to extract information about the user to build the path parameter for
the DirectoryEntry.
--
Scott
http://www.OdeToCode.com/blogs/scott/
On Fri, 15 Oct 2004 00:13:16 -0700, Jet Leung <xivi@tom.com> wrote:
[color=blue]
>Thank you !
>But I still don't know how to make the IADsUser link the DirectoryEntry
>object
>this is my code
>========
> Microsoft.SharePoint.SPWeb
>_spweb=Microsoft.SharePoint.WebControls.SPControl .GetContextWeb(this.Con
>text);
> Microsoft.SharePoint.SPUser _spuser=_spweb.CurrentUser;
> m_sCurrentLoginUser=_spuser.LoginName;
> ActiveDs.IADsUser _user=(ActiveDs.IADsUser)_spuser;
>
>
> DirectoryEntry de=new DirectoryEntry(Path);
> de.Invoke("_user.ChangePassword",new object[]{m_txtOldPwd.Text
>,m_txtNewPwd.Text});
> de.CommitChanges();
>
>please tell me the right way and the real sample code
>
>
>*** Sent via Developersdex
http://www.developersdex.com ***
>Don't just participate in USENET...get rewarded for it![/color]