This function is obsolete and remains for compatibility with applications written using DirectX 3. It is recommended that applications create the desired DirectPlay interface directly using CoCreateInstance. By using CoCreateInstance you can obtain an IDirectPlay3 interface directly rather than getting an IDirectPlay interface, having to use QueryInterface to access an IDirectPlay3 interface, and releasing the IDirectPlay interface.
Creates a new DirectPlay object and obtains an IDirectPlay interface pointer. If the application supplies GUID_NULL for the lpGUIDSP parameter, this function creates a DirectPlay object but does not initialize a service provider. The application can then call the IDirectPlay3::InitializeConnection method to initialize the service provider or lobby provider.
The application can supply a service provider GUID (see DirectPlayEnumerate) to indicate which service provider to bind.
In order to use the latest DirectPlay functionality, the application must obtain an IDirectPlay3 or IDirectPlay3A interface pointer using the QueryInterface method.
HRESULT WINAPI DirectPlayCreate(
LPGUID lpGUIDSP,
LPDIRECTPLAY FAR *lplpDP,
IUnknown *lpUnk
);
Returns DP_OK if successful, or one of the following error values otherwise:
DPERR_UNAVAILABLE is returned if a DirectPlay object could not be created. DPERR_INVALIDPARAMS is returned if the GUID provided is invalid.
This function attempts to initialize a DirectPlay object and sets a pointer to it if successful. Your application should call the DirectPlayEnumerate function immediately before initialization to determine what types of service providers are available (the DirectPlayEnumerate function fills in the lpGUIDSP parameter of DirectPlayCreate).
This function returns a pointer to an IDirectPlay interface. The current interfaces for DirectX 5 are IDirectPlay3 and IDirectPlay3A, which need to be obtained through a call to the QueryInterface method on the IDirectPlay interface returned by DirectPlayCreate.
IDirectPlay3::InitializeConnection, DirectPlayEnumerate
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.