### void PASCAL RARSetCallback(HANDLE hArcData, int PASCAL (*Callback)(UINT msg,LPARAM UserData,LPARAM P1,LPARAM P2), LPARAM UserData)

### Description

Set a user defined callback function to process UnRAR events.

RARSetCallback is obsolete and less preferable way to specify the callback function. Recommended approach is to set Callback and UserData fields in RAROpenArchiveDataEx structure, when calling RAROpenArchiveEx. If you use RARSetCallback, you will not be able to read the archive comment in archives with encrypted headers. If you do not need the archive comment, you can continue to use RARSetCallback.

### Parameters

hArcData

> This parameter should contain the archive handle obtained from RAROpenArchive or RAROpenArchiveEx function call.

Callback

> Address of user defined callback function to process UnRAR events.

> Set it to NULL if you do not want to define the callback function. Callback function is required to process multivolume and encrypted archives properly.

UserData

> User defined value, which will be passed to callback function.

### Return values

> None.

### See also

> User defined callback function