The DirectPlaySessionData.SetGuidApplication method sets the GUID of the application in the session description.
object.SetGuidApplication(guid As String)
If the method fails, an error is raised and Err.Number will be set.