Hey, I got a chat program that I want to enable the user to enter in what port is used. I'm using a simple edit box to obtain the info. When I GetWindowText it returns the character values, not the decimal values.....so it listens/connects on the wrong port. I posted something like this awhile ago and someone said to use the GetDlgItemInt API. Anyways, ny question is how should I get the info.....and if it's via GetDlgItemInt what should I use for the different parameters (i.e. hDlg and nIDDlgItem). Thanx, *unknown*
Posted on 2001-04-22 22:41:00 by *unknown*
Hi, .Code My_StringDecNrtoHexDD: ;don't forget to save register (pushad/popad) ;============================================================================== ; Converts a DECIMAL NUMBER STRING (OFFSET ESI) with max. Character (EAX) into ; a 32 Bit value in EDI. ;------------------------------------------------------------------------------ mov ecx,eax dec ecx add esi,ecx mov edi,0h mov eax,1 My_StringDecNrtoHexDD_Loop: mov bl, and bl,0Fh je My_StringDecNrtoHexDD_Next My_StringDecNrtoHexDD_Inc: add edi,eax dec bl jne My_StringDecNrtoHexDD_Inc My_StringDecNrtoHexDD_Next: mov edx,10 mul edx dec esi dec ecx cmp ecx,0FFFFFFFFh jne My_StringDecNrtoHexDD_Loop ret
Posted on 2001-04-23 02:44:00 by Test Department
Thanx Test :-) I found out that I can just use MASM's htodw API and it works just fine. Thanx Again, *unknown* This message was edited by *unknown*, on 4/23/2001 4:37:13 PM
Posted on 2001-04-23 11:44:00 by *unknown*