The DirectPlaySessionData.SetGuidInstance method sets the GUID for a session instance.
object.SetGuidInstance(guid As String)
If the method fails, an error is raised and Err.Number will be set.