Jump to content
  • Advertisement

Archived

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

mark-c

DirectPlay8 Groups in VB

This topic is 6064 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement

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
It certainly would be a lot easier if the CreateGroup call would return the groupid and not the Async handle...

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!