tavor

tavor

  • NA
  • 5
  • 0

How to get password from an application written in c#

Oct 27 2003 9:09 AM
I write an application with c#;I can use it to get password from applications written in .net language. But when i use it try to get password from an application in VC++6.0,but I just get null! Faint! I don't konw why???,who can tell me why! My code is below: [DllImport ("user32.dll")] public static extern long SendMessage(IntPtr childHandle,int msg,int lParam,StringBuilder wParam); private StringBuilder qpass=new StringBuilder (256);//a buffer used for password private const long ES_PASSWORD=0x0020L;//check it a password or not private const int WM_GETTEXT=0x000D;//an system message ,to get text from a control long ispass;//get the property of a control,check it a password or not ispass=GetWindowLong(handle,GWL_STYLE); if((ispass&ES_PASSWORD)==ES_PASSWORD) { SendMessage(handle,WM_GETTEXT,1024, qpass); } That's all my code above,who can help me!!!!!!!!

Answers (4)