gpSendBuddyMessage
This function sends a message to a buddy.
- GPResult gpSendBuddyMessage(
- GPConnection * connection,
- GPProfile profile,
- const gsi_char * message );
Routine | Required Header | Distribution |
---|---|---|
gpSendBuddyMessage | <gp.h> | SDKZIP |
Return Value
This function returns GP_NO_ERROR upon success. Otherwise a valid GPResult is returned.
Parameters
- connection
- [in] A GP connection interface.
- profile
- [in] The profile object for the buddy to whom the message is going.
- message
- [in] A user-readable text string containing the message to send to the buddy.
Remarks
If the buddy is not behind a firewall, and a direct connection is possible, the message can be any size. However, if the message needs to be sent through the server (i.e., the buddy is behind a firewall), then the message needs to be sent through the server. In this case, there is a limit of 1024 characters. Any message longer than 1024 characters, that needs to be sent through the server, will be truncated without warning or notice.
Unicode Mappings
Routine | GSI_UNICODE Not Defined | GSI_UNICODE Defined |
---|---|---|
gpSendBuddyMessage | gpSendBuddyMessageA | gpSendBuddyMessageW |
gpSendBuddyMessageW and gpSendBuddyMessageA are UNICODE and ANSI mapped versions of gpSendBuddyMessage. The arguments of gpSendBuddyMessageA are ANSI strings; those of gpSendBuddyMessageW are wide-character strings.
Section Reference: Gamespy Presence SDK