---
title: "setReturnValue:"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsinvocation/setreturnvalue:"
---

# setReturnValue:

Sets the receiver’s return value.

## Declaration

```occ
- (void) setReturnValue:(void *) retLoc;
```

## Parameters

- `retLoc`: An untyped buffer whose contents are copied as the receiver’s return value.

## Discussion

Discussion This value is normally set when you send an invoke or invokeWithTarget: message.

## See Also

### Related Documentation

- [methodReturnLength](foundation/nsmethodsignature/methodreturnlength.md)
- [methodReturnType](foundation/nsmethodsignature/methodreturntype.md)

### Configuring an Invocation Object

- [selector](foundation/nsinvocation/selector.md)
- [target](foundation/nsinvocation/target.md)
- [setArgument:atIndex:](foundation/nsinvocation/setargument:atindex:.md)
- [getArgument:atIndex:](foundation/nsinvocation/getargument:atindex:.md)
- [argumentsRetained](foundation/nsinvocation/argumentsretained.md)
- [retainArguments](foundation/nsinvocation/retainarguments.md)
- [getReturnValue:](foundation/nsinvocation/getreturnvalue:.md)
