---
title: "SCDynamicStoreCopyComputerName(_:_:)"
framework: systemconfiguration
role: symbol
role_heading: Function
path: "systemconfiguration/scdynamicstorecopycomputername(_:_:)"
---

# SCDynamicStoreCopyComputerName(_:_:)

Returns the current computer name.

## Declaration

```swift
func SCDynamicStoreCopyComputerName(_ store: SCDynamicStore?, _ nameEncoding: UnsafeMutablePointer<CFStringEncoding>?) -> CFString?
```

## Parameters

- `store`: The dynamic store session that should be used for communication with the server. Pass NULL to use a temporary session.
- `nameEncoding`: A pointer to memory that, on output, is filled with the encoding associated with the computer or host name, if it is non-NULL.

## Return Value

Return Value The current computer name, or NULL if the name has not been set or if an error occurred. You must release the return value.

## See Also

### Group

- [SCDynamicStoreCopyConsoleUser(_:_:_:)](systemconfiguration/scdynamicstorecopyconsoleuser(_:_:_:).md)
- [SCDynamicStoreCopyLocalHostName(_:)](systemconfiguration/scdynamicstorecopylocalhostname(_:).md)
- [SCDynamicStoreCopyLocation(_:)](systemconfiguration/scdynamicstorecopylocation(_:).md)
- [SCDynamicStoreCopyProxies(_:)](systemconfiguration/scdynamicstorecopyproxies(_:).md)
