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

C/C++ API Documentation | 2025.2

# ClientApi::SetUi( ClientUser * )

Reset the `ClientUser` object used for this connection.

Virtual? | No |
Class | `ClientApi` |
Arguments | `ClientUser *ui` | a pointer to a `ClientUser` object.
Returns | `void` |

## Notes

Unless you pass the `ClientUser` object to the `Run()` method, you must first call `SetUi()`. The new setting applies to commands executed by calling this `ClientApi` object’s `Run()` method.

## Example

The following example illustrates two ways to run `p4 info`:

    ClientApi client;
    ClientUser ui;

    client.Run( "info", &ui );

    client.SetUi( &ui );
    client.Run( "info" );

Your search for returned results