---
title: "DNSServiceGetProperty(_:_:_:)"
framework: dnssd
role: symbol
role_heading: Function
path: "dnssd/dnsservicegetproperty(_:_:_:)"
---

# DNSServiceGetProperty(_:_:_:)

Gets the specified property of a service.

## Declaration

```swift
func DNSServiceGetProperty(_ property: UnsafePointer<CChar>!, _ result: UnsafeMutableRawPointer!, _ size: UnsafeMutablePointer<UInt32>!) -> DNSServiceErrorType
```

## Parameters

- `property`: The requested property. Currently the only property defined is doc://com.apple.dnssd/documentation/dnssd/kDNSServiceProperty_DaemonVersion.
- `result`: Place to store result. For retrieving DaemonVersion, this should be the address of a uint32_t.
- `size`: Pointer to uint32_t containing size of the result location. For retrieving DaemonVersion, this should be sizeof(uint32_t). On return the uint32_t is updated to the size of the data returned. For DaemonVersion, the returned size is always sizeof(uint32_t), but future properties could be defined which return variable-sized results.

## Mentioned in

_DNS_SD_H

## Return Value

Return Value Returns kDNSServiceErr_NoError on success, or kDNSServiceErr_ServiceNotRunning if the daemon (or “system service” on Windows) is not running.
