Archived

This topic is now archived and is closed to further replies.

mark-c

DirectPlay8 Groups in VB

Recommended Posts

Hi Could somebody give me an example of how to create a directplay8 group in vb. What I cant quite understand is does directplay give me the GroupID or can I supply it. What I want to do is to have a number of directplay groups related to map locations. So ideally I can create a group referenced to that location. Thanks

Share this post


Link to post
Share on other sites

Private Sub CreateGroups
Dim Info As DPN_GROUP_INFO
With Info
.lInfoFlags = DPNINFO_NAME
.Name = "Groupname"
End With
intCurrentGroup = 0 ''//Create group 1
Call objDPServer.CreateGroup(Info, DPNOP_SYNC)
End Sub

Private Sub DirectPlay8Event_CreateGroup(ByVal lGroupID As Long, ByVal lOwnerID As Long, fRejectMsg As Boolean)
''//If creating the race groups
RaceGroups(intCurrentGroup) = lGroupID ''//Set the groupid to the last created group (done synced)
End Sub



done

Share this post


Link to post
Share on other sites
Ah well since you put it like that..

Thanks

I dont know about other people, but I sometimes struggle with the VB samples that Microsoft uses. Its like they always treat VB as an afterthought.

Mark-c

Share this post


Link to post
Share on other sites