Results 1 to 7 of 7

Thread: Password Input "*"

  1. #1

    Thread Starter
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    How to make the input by the user to appear as "*" and not the actual letters (it is a password input). And how to read the entered value.
    Note: This is a 16 bit DOS application.

    Thanks!!
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I don't have a 16-bit compiler so I can't code anything up, but what about just hooking the keyboard?
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    I never programmed in 16 bit enviroments (DOS). SO could you explain how to hook the keyboard.
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  4. #4
    Guest
    I wrote this for a password program.
    Code:
    void GetPass(char *input, int length, char output)
    {
    	char temp;
    	for(int i = 0; i < length;)
    	{
    		temp = getch();
    		if(temp == 13 && i > 0)
    		{
    			input[i] = 0;
    			break;
    		}
    
    		if(i > 0)
    		{
    			if(temp == 8)
    			{
    				putchar(8);
    				putchar(' ');
    				putchar(8);
    				input[--i] = 0;
    			}
    		}
    
    		if(temp != 8 && temp != 13)
    		{
    			putchar(output);
    			input[i] = temp;
    			i++;
    		}
    	}
    }

  5. #5
    Guest
    Vlatko, where did you get your 16b DOS compiler? I would be very interested in it.

  6. #6

    Thread Starter
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    Thanks Chimpface i'll give it a try.

    The compiler is Turbo C++ 3.0. I have it on a CD i bought yesterday along with other 16 and 32 bit compilers.

    I would send it but i am on 33600bps and the TC++ 3.0 is 12MB so..
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  7. #7
    Guest
    TC3 is 16b?

    Cool, I've got that

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width