PromptForPassword

Prompts the user to enter a password and returns the password.

Library:LibC
Classification:Novell
Service:Screen Support

Syntax

  #include <screen.h> 
   
  char *PromptForPassword (
      scr_t         scr,
      const char   *prompt,
      int           blotOutChar,
      char         *password,
      size_t        maxlen );
  

Parameters

scr

(IN) Specifies the screen that receives the prompt.

prompt

(IN) Points to a null terminated string, which prompts the user to enter a password.

blotOutChar

(IN) Specifies the character to echo to the screen, in place of the actual input.

password

(OUT) Points to the user's response to the prompt.

maxlen

(IN) Specifies the maximum number of bytes that can be in the password.

Return Values

If successful, returns the password. Otherwise, returns a NULL pointer and sets errno:

Decimal

Constant

Description

5

ENOMEM

Screen I/O is being attempted on a screen that doesn't allow input or the password is either too long or too short.

Remarks

The PromptForPassword function is not a NetWare OS function. It is only available from LibC.

See Also