# SimConnect_MapClientDataNameToID The **SimConnect\_MapClientDataNameToID** function is used to associate an ID with a named client data area.   ##### Syntax ``` cpp HRESULT SimConnect_MapClientDataNameToID( HANDLE hSimConnect, const char* szClientDataName, SIMCONNECT_CLIENT_DATA_ID ClientDataID ); ```   ##### Parameters {{< table-wrapper >}} | Parameter | Description | Type | |--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------| | *hSimConnect* | Handle to a SimConnect object. | Integer | | *szClientDataName* | Null-terminated string containing the client data area name. This is the name that another client will use to specify the data area. The name is not case-sensitive. If the name requested is already in use by another addon, a error will be returned. | Integer | | *ClientDataID* | A unique ID for the client data area, specified by the client. If the ID number is already in use, an error will be returned. | Integer | {{< /table-wrapper >}}   ##### Return Values The function returns an **HRESULT**. Possible values include, but are not limited to, those in the following table. {{< table-wrapper >}} | Return value | Description | |-----------------------------------------|--------------------------------------------------------| | S\_OK | The function succeeded. | | E\_FAIL | The function failed. | | SIMCONNECT\_EXCEPTION\_ALREADY\_CREATED | The name requested is already in use by another addon. | | SIMCONNECT\_EXCEPTION\_DUPLICATE\_ID | The ID number is already in use. | {{< /table-wrapper >}}   ##### Remarks This function should be called once for each client data area: the client setting up the data should call it just before a call to [SimConnect\_CreateClientData](simconnect-createclientdata/), and the clients requesting the data should call it before any calls to [SimConnect\_RequestClientData](simconnect-requestclientdata/) are made. The name given to a client data area must be unique, however by mapping an ID number to the name, calls to the functions to set and request the data are made more efficient.