DirectPlayCreate

HRESULT DirectPlayCreate(LPGUID lpGUID,

LPDIRECTPLAY FAR * lplpDP, IUnknown FAR * pUnkOuter);

Creates an instance of a DirectPlay object.

·Returns DP_OK if successful, or one of the following error values otherwise:

DPERR_EXCEPTION DPERR_INVALIDPARAMS

DPERR_UNAVAILABLE

lpGUID

Address for the GUID that represents the driver to be created.

lplpDP

Address for a pointer to initialize with a valid DirectPlay pointer.

pUnkOuter

Address for the IUnknown interface. This parameter is provided for future compatibility with COM aggregation features. Presently, however, the DirectPlayCreate function will return an error if this parameter is anything but NULL.

This function attempts to initialize a DirectPlay object and sets a pointer to it if successful. It is a good idea to call the DirectPlayEnumerate function immediately before initialization in order to determine what types of service providers are available.