Jump to content
  • Advertisement


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


DirectPlay8 , DPClient.Send method in Visual Basic

This topic is 5710 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

Hello, My first trials into DP8 have been somewhat stalled by this development. I''ve got a Host running, and when the host starts the DirectPlay8Event_CreatePlayer event fires properly. I''ve got a client running, and when the client connects to the host the DirectPlay8Event_CreatePlayer event fires properly. Now I''m trying to use the .Send method of the DirectPlay8Client object like so:
    Dim bByteBuffer() As Byte, lngOffset As Long
    Dim lngResult As Long
    ''//Check if there''s anything usefull in the chat message
    If Len(strMessage & "") = 0 Then Exit Sub
    ''//New packet
    lngOffset = NewBuffer(bByteBuffer)
    ''//Add packet header
    Call AddDataToBuffer(bByteBuffer, bPacketChat, SIZE_BYTE, lngOffset)
    ''//Add chat message
    Call AddStringToBuffer(bByteBuffer, strMessage, lngOffset)

    ''//Send the chat message
    lngResult = dxDPClient.Send(bByteBuffer, 0, DPNSEND_GUARANTEED Or DPNSEND_NOLOOPBACK)


The Receive event on my server is not firing, and lngresult equals some random number each time (3 once, 33554433 another time, 16777517 another)..

Anyone know enough to possible sort this one out?



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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!