# ChangeServiceConfigA

```csharp
[DllImport("ADVAPI32.dll", ExactSpelling = true, SetLastError = true)]
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
public static extern unsafe BOOL ChangeServiceConfigA(
    SC_HANDLE hService,
    ENUM_SERVICE_TYPE dwServiceType,
    SERVICE_START_TYPE dwStartType,
    SERVICE_ERROR dwErrorControl,
    PCSTR lpBinaryPathName,
    PCSTR lpLoadOrderGroup,
    [Optional] uint* lpdwTagId,
    PCSTR lpDependencies,
    PCSTR lpServiceStartName,
    PCSTR lpPassword,
    PCSTR lpDisplayName);
```

[sc\_handle](https://www.pinvoke.dev/security/sc_handle "mention")

[enum\_service\_type](https://www.pinvoke.dev/services/enum_service_type "mention")

[service\_start\_type](https://www.pinvoke.dev/services/service_start_type "mention")

[service\_error](https://www.pinvoke.dev/services/service_error "mention")
