Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

C/C++ API Documentation | 2025.1

# ClientApi::DefineHost( const char *, Error * )

Sets `P4HOST` in the Windows registry and applies the setting immediately.

Virtual? | No |
Class | `ClientApi` |
Arguments | `const char *c` | the new `P4HOST` setting
| `Error *e` | an `Error` object
Returns | `void` |

## Notes

To make the new `P4HOST` setting apply to the next command executed with `Run()`, `DefineHost()` sets the value in the registry and then calls `SetHost()`.

## Example

The following code illustrates how this method might be used to make a Windows client application start up with a default `P4HOST` setting.

    client.Init( &e );
    client.DefineHost( "default_host", &e );

Your search for returned results