# Ini_SetDuplicateChecking

int Ini_SetDuplicateChecking (IniText handle, int checkForDuplicates);

## Purpose

By default, when you use one of the Ini_Put functions to add an item to the Ini_Text, a check is made for an existing item with a duplicate name. If there is an existing item with a duplicate name, it is deleted. This check can slow down the Ini_Put functions. You can use this function to disable or reenable the duplicate checks.

When duplicate checking is on (the default setting), putting an item automatically replaces it if it already exists.

When duplicate checking is off, items are put without checking to see if they already exist. This makes it possible for multiple items with the same name to be put into an IniText. If more than one item has the same name, which value is returned by an Ini_Get function is undefined.

The only time this function should be used is when you want to speed up putting a large number of items by bypassing the check for duplicate items. If you turn duplicate checking off, you are responsible for ensuring that no item is put into an IniText which already contains an item with the same name.

| Note The Ini_Merge function relies on the Ini_Put functions and is therefore subject the duplicate checking state of its Destination argument.

## Parameters

Input
Name | Type | Description
handle | IniText | A handle returned from Ini_New. It represents the list of in-memory tag/value pairs.
checkForDuplicates | integer | This parameter specifies whether the Ini_Put functions check for and delete existing items with duplicate names before adding an item to the Ini_Text. Pass 1 to check for duplicates. Pass 0 to disable duplicate checking.

## Return Value

Name | Type | Description
previousSetting | integer | Returns the previous duplicate checking setting for the IniText.