Share via


ICluster.SetJobCredentialsFromCache Method

Sets the credentials for the specified job using credentials from the credential cache.

Namespace: Microsoft.ComputeCluster
Assembly: CcpAPI (in ccpapi.dll)

Usage

Syntax

'Declaration
Sub SetJobCredentialsFromCache ( _
    jobId As Integer, _
    userName As String, _
    isConsole As Boolean, _
    hwndParent As Integer _
)
void SetJobCredentialsFromCache (
    int jobId,
    string userName,
    bool isConsole,
    int hwndParent
)
void SetJobCredentialsFromCache (
    int jobId, 
    String^ userName, 
    bool isConsole, 
    int hwndParent
)
void SetJobCredentialsFromCache (
    int jobId, 
    String userName, 
    boolean isConsole, 
    int hwndParent
)
function SetJobCredentialsFromCache (
    jobId : int, 
    userName : String, 
    isConsole : boolean, 
    hwndParent : int
)

Parameters

  • jobId
    The job identifier. The ICluster.AddJob method returns this value. If you have an instance of the job that has already been added to the cluster, you can access the IJob.Id property to get the identifier.
  • userName
    The name of the RunAs user, in the form domain\username. The user name is limited to 80 Unicode characters.

    If userName is NULL, empty, or not valid, the service searches the credential cache for the credentials to use. If the cache contains only one credential, that credential is used. However, if multiple credentials exist in the cache, the user is prompted for the credentials.

  • isConsole
    Set the value to true if the application is a console-mode application. Set the value to false if the application is a GUI application.

    If the credentials are not cached, the user is prompted for the credentials. If the isConsole parameter is true, the user is prompted in the console window; otherwise, the standard credentials dialog box is used.

  • hwndParent
    The handle to use as the parent window for the modal credentials dialog box. If 0, HWND_DESKTOP is used. The handle is ignored if isConsole is true.

Remarks

You would call this method after submitting a job to change the credentials that the job uses.

To add credentials to the cache, use the ICluster.SetCachedCredentials method.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Microsoft Windows Compute Cluster Server 2003, Windows Server 2003, Windows XP

Target Platforms

Microsoft Windows Compute Cluster Server 2003, Windows Server 2003 with Compute Cluster Pack Client Utilities, Windows XP with Compute Cluster Pack Client Utilities

See Also

Reference

ICluster Interface
ICluster Members
Microsoft.ComputeCluster Namespace
ICluster.SetCachedCredentials Method
ICluster.SetJobCredentials Method