VCL RAD DirectX for C++ Builder

Welcome to

www.tdxlibrary.org

Home of the
the TDx_Library...

=- RAD DirectX =-

"RAD DirectX"
for
C++ Builder

...

Welcome to tdxlibrary.org Latest News

Development Tools Demo Applications Step-By-Step Tutorials Component Reference

Register our Tools Available Downloads

Frequently Asked Questions Links to other sites Information about the tdxlibrary.org website


    TDx_Play_Library v2.00 Component Reference

    -= Click to navigate the reference =-
    Go to the Welcome Page

    [ TDx_Play::EnumSessions() ]     [ next: GetCaps() ]     [ prev: EnumPlayers() ]

    public:

         virtual bool __fastcall EnumSessions( TDPSessionDesc* pSD, dword pTimeout, void* pContext, dword pFlags );





    -= Go to the TDx_Play description =-    TDX_PLAY::ENUMSESSIONS()   [ component method ]

    • Description

        The EnumSessions method will enumerate all active and/or lobby sessions for a specified application.

        This method should not be called while a session is open.
        The TDx_Play::OnEnumSessions() event will be called for each session enumerated.

        When enumerating synchronously, the internal session cache is cleared, the enumeration requests sent and the application blocked until all replies have timed out or been enumerated.

        When enumerating asychronously, all sessions in the internal session cache are enumerated through the callback and the method returns. Enumeration requests are then sent automatically, the replies to which are used to update, remove or add to the internal session cache.
        Call EnumSessions asynchronously once more to obtain the most recent session list.
        Enumeration will be performed periodically without further calls until TDx_Play::Open() or this method with DPENUMSESSIONS_STOPASYNC set is called.
        Asychronous enumeration must be halted before changing a sessions description.

        Error values that can be generated are:

        DPERR_CONNECTING
        DPERR_CONNECTIONLOST
        DPERR_EXCEPTION
        DPERR_GENERIC
        DPERR_INVALIDOBJECT
        DPERR_INVALIDPARAMS
        DPERR_NOCONNECTION
        DPERR_UNINITIALIZED
        DPERR_USERCANCEL

    • Parameters

        SD
        The SD parameter references a TDPSessionDesc component defining which sessions are to be enumerated.

        TDPSessionDesc::Application identifies which application sessions should be retrieved. (GUID_NULL for all sessions) and TDPSessionDesc::Password is used to enumerated private sessions.
        All other TDPSessionDesc properties are ignored.

        Timeout
        The Timeout parameter defines the time, in milliseconds, to wait for enumeration request responses (for synchronous) or how long to broadcast enumeration requests (for asynchronous).

        Set zero to use the default time out defined by TDPCaps::Timeout.

        Context
        The Context parameter references application defined data to be passed to the callback function for each session enumerated.

        Flags
        The Flags parameter defines flags indicating which sessions are to be enumerated.
        The described effect applies when the flag is set.

        The default value of zero is equivilent to DPENUMSESSIONS_AVAILABLE.

          DPENUMSESSIONS_ALL
          Enumerate all currently active sessions.

          DPENUMSESSIONS_PASSWORDREQUIRED is still required to enumerate password protected sessions.
          DPENUMSESSIONS_AVAILABLE is assumed if this flag is not set.

          DPENUMSESSIONS_ASYNC
          Enumerate all sessions asychronously into a session cache.

          The session cache will be updated until DPENUMSESSIONS_STOPASYNC is set or TDx_Play::Open() or IUnknown::Release() is called.
          Enumeration is synchronous when this flag is not set.

          DPENUMSESSIONS_AVAILABLE
          Only enumerate those sessions currently accepting new players.

          DPENUMSESSIONS_PASSWORDREQUIRED is still required to enumerate password protected sessions.

          DPENUMSESSIONS_PASSWORDREQUIRED
          Also enumerate password protected sessions.

          DPENUMSESSIONS_RETURNSTATUS
          Do not display any connection status dialog boxes.

          DDERR_CONNECTING will be returned if the connection cannot be made immediately.
          The application should call this method until DP_OK or a different error code is returned.

          DPENUMSESSIONS_STOPASYNC
          Enumerate all the sessions currently in the session cache and halt the asynchronous enumeration process.


    • See Also
    • Top





    If you would like to submit additions or improvements to this page, click: darren_john_dwyer@hotmail.com.



























Top

Welcome |  Latest News |  Tools |  Demos |  Tutorials |  Reference |  Register |  Downloads
FAQ |  Links |  Site Information

This page is Copyright © 2019 Darren John Dwyer, Australia. All Rights Reserved.
Borland C++ Builder, CBuilder, etc are Trademarks of Borland Corporation.
DirectX, DirectDraw, Windows, etc are Trademarks of Microsoft Corporation.