---
title: "AEPutParamDesc(_:_:_:)"
framework: coreservices
role: symbol
role_heading: Function
path: coreservices/1447576-aeputparamdesc
---

# AEPutParamDesc(_:_:_:)

Inserts a descriptor and a keyword into an Apple event or Apple event record as an Apple event parameter.

## Declaration

```swift
func AEPutParamDesc(_ theAppleEvent: UnsafeMutablePointer<AppleEvent>!, _ theAEKeyword: AEKeyword, _ theAEDesc: UnsafePointer<AEDesc>!) -> OSErr
```

## Parameters

- `theAppleEvent`: A pointer to the Apple event to add a parameter to. See the doc://com.apple.documentation/documentation/coreservices/appleevent data type.
- `theAEKeyword`: The keyword specifying the parameter to add. If the Apple event already has a parameter with this keyword, the parameter is replaced. Some keyword constants are described in doc://com.apple.documentation/documentation/coreservices/apple_events/1527206-keyword_parameter_constants. See doc://com.apple.documentation/documentation/coreservices/aekeyword.
- `theAEDesc`: A pointer to the descriptor for the parameter to add. See doc://com.apple.documentation/documentation/coreservices/aedesc.

## Return Value

Return Value A result code. See Result Codes.

## Discussion

Discussion Thread safe starting in OS X v10.2.

## See Also

### Adding Parameters and Attributes to Apple Events and Apple Event Records

- [AEPutAttributeDesc(_:_:_:)](coreservices/1441790-aeputattributedesc.md)
- [AEPutAttributePtr(_:_:_:_:_:)](coreservices/1445940-aeputattributeptr.md)
- [AEPutParamPtr(_:_:_:_:_:)](coreservices/1449263-aeputparamptr.md)
