IDirectPlay3::GetPlayerAccount
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:
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