# WM_StartKeySharing

## C Specification

      #include <nitro/wm.h>

      WMErrCode WM_StartKeySharing( WMKeySetBuf* buf, u16 port );

## Arguments

`buf` | Pointer to the buffer that stores key information. The entity is the pointer to the `WMDataSharingInfo` structure.
port | Sets the port number to use. Select a port number between 12 and 15 that is not being used elsewhere.

## Return Values

Returns the results of the `WMErrCode` enumerated type process.

## Description

Enables the key sharing feature. This function is executable when the WM is in either the `MP_PARENT` state or the `MP_CHILD` state. This function was changed from asynchronous to synchronous. WM_StartKeySharing, WM_EndKeySharing, and WM_GetKeySet were left to maintain compatibility, but they will be removed in the future. Use the Data Sharing functions instead.

## See Also

`WM_EndKeySharing`, `WM_GetKeySet`

## Revision History

06/07/2005 Changed argument and made into synchronized function
10/22/2004 Changed return value types
08/02/2004 Standardized structure names.
07/29/2004 Added to Description
07/23/2004 Initial version.