DirectPlay Animated Header -- IDirectPlay3::GetPlayerAccount DirectPlay Animated Header -- IDirectPlay3::GetPlayerAccount* Microsoft DirectPlay SDK
*Index  *Topic Contents
*Previous Topic: IDirectPlay3::GetMessageCount
*Next Topic: IDirectPlay3::GetPlayerAddress


IDirectPlay3::GetPlayerAccount


IDirectPlay3 Interface

In a secure session, can be called by the session host to obtain account information about the specified player.

HRESULT GetPlayerAccount(
  DPID idPlayer,
  DWORD dwFlags,
  LPVOID lpData,
  LPDWORD lpdwDataSize
  );

Parameters
idPlayer
The DPID of the player whose account information is to be retrieved.
dwFlags
Not used. Must be zero.
lpData
A pointer to a buffer (allocated by the application) where the account data is to be written. A DPACCOUNTDESC structure will be copied as well as any data referenced by the members of the structure; therefore, the number of bytes copied is variable. Cast the lpData parameter to LPDPACCOUNTDESC in order to read the name. By passing NULL, the application can request the number of bytes required be put in the lpdwDataSize parameter. The application can then allocate the space and call this method again.
lpdwDataSize
A pointer to a DWORD that is initialized with the size of the buffer. After the method returns, lpdwDataSize will be set to the number of bytes that were actually copied into the buffer. If the buffer was too small the method returns DPERR_BUFFERTOOSMALL, and lpdwDataSize is set to the minimum required buffer size.
Return Values

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

DPERR_ACCESSDENIED
DPERR_BUFFERTOOSMALL
DPERR_INVALIDFLAGS
DPERR_INVALIDPARAMS
DPERR_INVALIDPLAYER
Remarks

The information returned by GetPlayerAccount uniquely identifies an account. This information can be used to record the transactions or other activities of a logged-in player.

See Also

IDirectPlay3::SecureOpen

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.

*Top of Page