Ok im sugishly building a chat program and everytime i try to get my client to connect and it gives me an error, but after calling WSAGetLastError how do you get the independent error code into something like a messagebox? I mean you cant go: invoke MessageBox,hWnd,WSAGetLastError,addr title, MB_OK that doesnt work, so i cant find a way, any ideas, i want to be able to see there error code so i can see whats wrong. thanx. -Rage9
Once you get the error code use wsprintf to put it into a message box.... psuedo code: ;do this in the .data section StrCtl db "WSAGetLastError code is %ld",0 ------------------------------------------ ;do this in the function LOCAL dwCode:DWORD LOCAL szString:BYTE invoke WSAGetLastError mov dwCode,eax invoke wsprint(Addr szString, Addr StrCtl, dwCode) invoke MessageBox,hWnd,Addr szString,addr title, MB_OK this will give you the error code.....sometimes the Win32 help file will give specific codes and meanings. You can use this to futher explain the error.... just one way to do it.... HTH
in asm, u can't give a function as an argument instead of invoke function1, function2 u have to do invoke function2 invoke function1, eax to answer your question : look Raeldin post
That is assembly format, You can't use the compiler to parse arguments to a function, you do have to use return values. e.g. invoke GetStockObject ,BLACK_BRUSH invoke SetBkColor ,eax But beware, most function change registers (eax, ebx, ecx etc). except are ebx for some functions and esi, edi.