The DirectPlaySessionData.SetSessionPassword method sets the password for a session.
object.SetSessionPassword(val As String)
If the method fails, an error is raised and Err.Number will be set.