DirectPlay Interface Overviews
DirectPlay is composed of objects and interfaces based on the component object model (COM). COM is a foundation for an object-based system that focuses on the reuse of interfaces, and it is the model at the heart of OLE programming. It is also an interface specification from which any number of interfaces can be built.
New methods and functionality are exposed in COM through the use of new interfaces that are sequentially numbered. The current DirectPlay interface is called IDirectPlay4. The old interfaces, IDirectPlay and IDirectPlay2, still exist for backward compatibility with applications written to those interfaces.
This section contains general information about the following DirectPlay COM interfaces:
- Unicode vs. ANSI Interfaces
- IDirectPlay and IDirectPlay2 Interfaces
- IDirectPlay3 Interface
- IDirectPlay4 Interface
- IDirectPlayLobby and IDirectPlayLobby2 Interfaces
- IDirectPlayLobby3 Interface
Unicode vs. ANSI Interfaces
DirectPlay supports both Unicode and ANSI strings by defining string pointers in a structure as the union of a Unicode string pointer (LPWSTR) and an ANSI string pointer (LPSTR). The two string pointers have different names. Typically, the ANSI member ends with the letter "A". Depending on which IDirectPlay interface is chosen (IDirectPlay4 Interface for Unicode or IDirectPlay4A for ANSI), or which IDirectPlayLobby3 interface is chosen (IDirectPlayLobby3 Interface for Unicode or IDirectPlayLobby3A for ANSI), the application should read and write the appropriate strings from the structure and ignore the other one.
IDirectPlay and IDirectPlay2 Interfaces
The IDirectPlay and IDirectPlay2 COM interfaces remain part of DirectPlay version 6. IDirectPlay contains the methods required to run applications that were written for the DirectX SDK versions 1 and 2. IDirectPlay2 contains the methods required to run applications that were written for the DirectX SDK version 3. Although you could use this interface to create new applications, it is recommended that you use the newer DirectPlay interfaces, IDirectPlay4 Interface and IDirectPlay4A, to take advantage of their increased functionality.
IDirectPlay3 Interface
The IDirectPlay3 COM interface remains part of DirectPlay version 6. It contains the methods required to run applications that were written for the DirectX SDK version 5. Although you could use this interface to create new applications, it is recommended that you use the newer DirectPlay interfaces, IDirectPlay4 Interface and IDirectPlay4A, to take advantage of their increased functionality.
IDirectPlay4 Interface
IDirectPlay4 is the latest interface. It directly inherits from IDirectPlay3, so any code written for IDirectPlay3 will work with IDirectPlay4 with no modification.
The new methods in IDirectPlay4 are:
IDirectPlayLobby and IDirectPlayLobby2 Interfaces
The IDirectPlayLobby and IDirectPlayLobby2 COM interfaces remain part of DirectPlay version 6. IDirectPlayLobby contains the methods required to run applications that were written for the DirectX SDK versions 1, 2, and 3. IDirectPlayLobby2 contains the methods required to run applications that were written for the DirectX SDK version 5. Although you could use these interfaces to create new applications, it is recommended that you use the newer DirectPlay interface, IDirectPlayLobby3 Interface, to take advantage of its increased functionality.
IDirectPlayLobby3 Interface
The IDirectPlayLobby3 Interface interface lets game developers launch external applications, enable communication between an application and a lobby client, and manipulate DirectPlay Addresses.
IDirectPlayLobby3 supports all the methods of IDirectPlayLobby and IDirectPlayLobby2. See Building Lobby-Aware Applications for information about detecting a launch by an external lobby and registering lobby-aware applications. See DirectPlay Lobby Overview for general information about lobby sessions.
The new methods in IDirectPlayLobby3 are:
Top of Page
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.