ICluster::SetEnvironmentVariable method

Sets a cluster-wide environment variable.

Syntax


HRESULT SetEnvironmentVariable(
  [in] BSTR Name,
  [in] BSTR Value
);

Parameters

Name [in]

The name of the environment variable.

Value [in]

The value of the environment variable. If NULL or an empty string, the variable is deleted.

Return value

If the method succeeds, the return value is S_OK. Otherwise, the return value is an error code. To get a description of the error, call the ICluster::get_ErrorMessage method.

Remarks

The sum of all environment variables is limited to 2,048 Unicode characters.

You can use this method to add, delete, or update an environment variable. However, you cannot delete or update the value of a CCP defined environment variables, such as CCP_CLUSTER_NAME. If you try to update the value of a CCP variable, you will get a duplicate entry.

To retrieve the cluster-wide environment variables, call the ICluster::get_EnvironmentVariables method.

To set task-specific environment variables, call the ITask::SetEnvironmentVariable method.

To retrieve the variable from within a task, call the Win32 function GetEnvironmentVariable.

Requirements

Product

Compute Cluster Pack Client Utilities

Type library

Ccpapi.tlb

See also

ICluster
ICluster::get_EnvironmentVariables
ITask::SetEnvironmentVariable

 

 

Show: