From: SMTP%"guyb@informix.com" 1-DEC-1997 18:59:35.86 To: rsuresh@usa.net CC: ntdev@atria.com Subj: Re: [ntdev] how to trapping no-echo messages in nt? Return-Path: owner-ntdev@atria.com Received: by arisia.gce.com (UCX V4.1-12C, OpenVMS V7.1 VAX); Mon, 1 Dec 1997 18:56:09 -0500 Received: from mv.mv.com (root@mv.mv.com [192.80.84.1]) by mercury.mv.net (8.8.8/mem-971025) with ESMTP id SAA22655 for ; Mon, 1 Dec 1997 18:25:04 -0500 (EST) Received: from gw.atria.com (gw.atria.com [192.88.237.2]) by mv.mv.com (8.8.8/mem-971025) with SMTP id SAA15252 for ; Mon, 1 Dec 1997 18:23:24 -0500 (EST) Received: by gw.atria.com id Mon, 1 Dec 1997 13:35:37 -0500 Received: from kingcrab.informix.com by gw.atria.com id Mon, 1 Dec 1997 13:35:31 -0500 Received: from swift (swift.informix.com [158.58.8.57]) by kingcrab.informix.com (8.8.5/8.7.3) with SMTP id KAA23071; Mon, 1 Dec 1997 10:35:00 -0800 (PST) Received: from informix.com (ripley) by swift (5.x/SMI-SVR4) id AA04421; Mon, 1 Dec 1997 10:34:59 -0800 Message-Id: <34830352.772DDAFB@informix.com> Date: Mon, 01 Dec 1997 10:34:58 -0800 From: Guy Bowerman Organization: Informix X-Mailer: Mozilla 4.03 [en] (X11; I; SunOS 5.5.1 sun4m) Mime-Version: 1.0 To: rsuresh@usa.net Cc: ntdev@atria.com Subject: Re: [ntdev] how to trapping no-echo messages in nt? References: <19971201110027.16170.qmail@www02.netaddress.usa.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-ntdev@atria.com Precedence: bulk Hi, > i'd like to find out what mechanism NT provides for turning off echo while prompting a user for password in a console application. You can do this using SetConsoleMode() and disabling the ENABLE_ECHO_INPUT setting, e.g: hConsole = GetStdHandle(STD_INPUT_HANDLE) GetConsoleMode(hConsole, &oldConsoleMode) // disable echo newConsoleMode = oldConsoleMode & ( ~ ENABLE_ECHO_INPUT ); SetConsoleMode(hConsole, newConsoleMode) // Ask for the password printf("Password:"); (char *) password = (char *) gets(password); // re-enable echo SetConsoleMode(hConsole, oldConsoleMode); CloseHandle(hConsole); Regards Guy rsuresh@usa.net wrote: > > HI, The DOS, for example has BIOS routines (INT21 functions )for handling this kind of requirements. What is the NT equivqlent for this?Basically i'd like to trap this call( for switching off echoing in the console) do some processing of my own in its place. > If u could provide me with pointers to available information for this it woul > d be useful to me > > Thanx in advance > > Suresh Rajaram > > ____________________________________________________________________ > Get free e-mail and a permanent address at http://www.netaddress.com > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > [ To unsubscribe, send email to ntdev-request@atria.com with body > UNSUBSCRIBE (the subject is ignored). ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [ To unsubscribe, send email to ntdev-request@atria.com with body UNSUBSCRIBE (the subject is ignored). ]