import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'

The **GW2LicenceDetails** function returns the details of a licence loaded in for a **session**, including the number of days remaining and what entitlements are enabled.


<Tabs>

<TabItem value="C++" label="C++" default>

```cpp

#include "glasswall.core2.api.h"

const char * GW2LicenceDetails(Session session);
```
**Parameters**

&emsp; **session** The ID of the session as returned by `GW2OpenSession`

**Returns**

&emsp; A pointer to a constant string describing the details of the licence for the session, or  the string `"Unknown Session ID"` if `session` is invalid or the licence details could not be retrieved. The memory of the returned string does not need to be freed by the user, however further calls to `GW2LicenceDetails` will invalidate the returned string.

</TabItem>

<TabItem value="C#" label="C#">

**Synopsis**

The **GW2LicenceDetails** method returns a pointer to a constant string describing the details of the licence.

```csharp
    /// <param name="session">Current open Glasswall session</param>
    public string LicenceDetails(int session)
```

**Returns**

Returns a string describing the details of the licence loaded for the session.

</TabItem>

<TabItem value="Java" label="Java">

**Synopsis**

```java
import com.glasswall.core2javabridge.*;

public String GW2LicenceDetails(int session) throws GlasswallException
```

**Returns**

The **GW2LicenceDetails** function returns a `String` containing the licence details for the session specified by `session`.

A **GlasswallException** exception will be thrown if `session` is invalid, or the licence details could not be retrieved.

</TabItem>

<TabItem value="Python" label="Python">

**Synopsis**

Returns a string containing details of the licence.

```py
def licence_details(self):
    """ Returns a string containing details of the licence.

    Returns:
        result (str): A string containing details of the licence.
    """
```

**Returns**

A string containing details of the licence, for example:

```
Unlimited Licence
Entitlements:
        Engine_Main
        Engine_Protect
        Engine_Analysis
        Engine_ExportImport
```

</TabItem>

<TabItem value="JavaScript" label="JavaScript">

**Synopsis**

The **GW2LicenceDetails** function returns a pointer to a constant string describing the details of the licence.

```javascript
     * @param {number} session The ID of the session. 
     * @returns {string} The details of the licence currently associated with this session.
    GW2LicenceDetails(session) 
```
</TabItem>

</Tabs>