# DefineProduct

### Description

The DefineProduct method initializes basic information required to validate license keys. You must call this function prior to calling any other function.

```csharp
bool DefineProduct ( int ProductID, string ProductName, 
                    int MajorVersion, int MinorVersion, 
                    string EncryptionKey, string PersistenceKey )
```

### Arguments

| Name           | Data Type | Description                                                                                                                                                                                                     |
| -------------- | :-------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ProductID      |    int    | ID of the product as generated by Quick License Manager                                                                                                                                                         |
| ProductName    |   string  | Name of the product                                                                                                                                                                                             |
| MajorVersion   |    int    | Major version of the product (maximum 2 digits)                                                                                                                                                                 |
| MinorVersion   |    int    | Minor version of the product (maximum 2 digits)                                                                                                                                                                 |
| EncryptionKey  |   string  | string used to encrypt the license key (obsolete)                                                                                                                                                               |
| PersistenceKey |   string  | GUID associated with the product and automatically generated by Quick License Manager for each product. The evaluation information of the product is stored at runtime in the registry under HKCR\CLSID\<GUID>. |

### Return

| Type | Description                          |
| ---- | ------------------------------------ |
| bool | true if successful; otherwise false. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.soraco.co/docs/api-reference/.net-api/qlmlicense/client-side-methods/defineproduct.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
