---
title: "AERemoveCoercionHandler(_:_:_:_:)"
framework: coreservices
role: symbol
role_heading: Function
path: coreservices/1441907-aeremovecoercionhandler
---

# AERemoveCoercionHandler(_:_:_:_:)

Removes a coercion handler from a coercion handler dispatch table.

## Declaration

```swift
func AERemoveCoercionHandler(_ fromType: DescType, _ toType: DescType, _ handler: AECoercionHandlerUPP!, _ isSysHandler: Bool) -> OSErr
```

## Parameters

- `fromType`: The descriptor type of the data coerced by the handler. For a list of AppleScript’s predefined descriptor types, see doc://com.apple.documentation/documentation/coreservices/apple_events/1542788-descriptor_type_constants. See doc://com.apple.documentation/documentation/coreservices/desctype.
- `toType`: The descriptor type of the resulting data. For a list of AppleScript’s predefined descriptor types, see doc://com.apple.documentation/documentation/coreservices/apple_events/1542788-descriptor_type_constants. See doc://com.apple.documentation/documentation/coreservices/desctype.
- `handler`: A universal procedure pointer to the coercion handler to remove. Although the parameters fromType and toType are sufficient to identify the handler, you can identify the handler explicitly as a safeguard. If you pass NULL for this parameter, the Apple Event Manager relies solely on the event class and event ID to identify the handler. See doc://com.apple.documentation/documentation/coreservices/aecoercionhandlerupp.
- `isSysHandler`: Specifies the coercion table to remove the handler from. Pass TRUE to remove the handler from the system coercion table or FALSE to remove the handler from your application’s coercion table. Use of the system coercion table is not recommended.

## Return Value

Return Value A result code. See Result Codes.

## Discussion

Discussion Thread safe starting in OS X v10.2. Use of system coercion tables is not recommended. For more information, see Writing and Installing Coercion Handlers in Apple Events Programming Guide.

## See Also

### Managing Coercion Handler Dispatch Tables

- [AEGetCoercionHandler(_:_:_:_:_:_:)](coreservices/1445348-aegetcoercionhandler.md)
- [AEInstallCoercionHandler(_:_:_:_:_:_:)](coreservices/1445548-aeinstallcoercionhandler.md)
