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