hello,FOUR-F. sometimes is ok, another times is crash. I'v used all of memAlloc. here is all of the source codes and Error msg(openning with UltraEdit) in running my pc. if someone can't do that, i hope you look it about 10 minutes. regards _388682950__lv_15.zip
Oh,Keeping eye opened for somebody. it maybe as talked as Iczelion " Don't make any mistake, multithreading programs are harder to debug and maintain. This sort of bug seems to happen at random which is very hard to track down. " regards
sorry _1716475105__lv_15.zip also, i forgot to unkomment wm_timer processing - do it by yourself. regards!
Hello,shoo I'm very glad you help me. the important problem is that " HeapFree " can't Free . knew from memory a monitor soft. here is Eorrs msg in my pc. regards _1083782271__ER_MSG2005_05_20__16;58;02.rar
do not understand: you still have the error? it works on my pc now... there was that: 1. Код (Text): invoke SendARP,dwIpaddr,0,ADDR pulMac,ADDR ulLen ; .IF ulLen != 0 .IF !eax you should depend on result returned by SendARP: if eax=NO_ERROR (=0) then ok. 2. Код (Text): invoke HeapAlloc,HeapHandle,HEAP_ZERO_MEMORY or HEAP_NO_SERIALIZE,128d mov lpNamebuf,eax ... .if eax !=0 ;see if gethost...worked xmov lpNamebuf,[eax] ;mov the pointer returnt by gethost into eax .else xmov lpNamebuf,offset unknown .endif ... invoke HeapFree,HeapHandle,HEAP_NO_SERIALIZE,lpNamebuf it looks slightly strange, isn't? you allocate memory block, store handle (offset) into pNamebuf, then replace this value with offset, returned by gethostbyaddr, from structure, allocated to thread by system, and then try to free memory not allocated by you: you no need in that memory block at all in real. all strings i replaced in the source are commented, not deleted, so, you can walk through them. hope, this will help if you ask i can post exe. regards!
Hello,shoo Thanks you. the code sometimes is ok, another times is crashed. I did not modified the source code which you posted here. here is exe. you try use ida to see That it is as same as you created Lv_15.exe
hello,shoo used follow files to created lv_15.exe ;====================================== cd #2 _1498696062__dcskm42001.zip ;====================================== reboot my pc, running lv_15.exe now, error msgpart of all) 2118721895__ER_MSG2005_05_20__20;06;54.rar
they both are empty, only "Error Msg Dump: " present... well, i have two thoughts: 1.may be it is needed to test it by somebody else under xp (i have w2k) 2.another problem could be in the count of the threads: my subnet has 254 ips, your could have 65534 and even more. the way, choosed for this program, is easy, but could be heavy to OS - it produces explosion of threads, but their count is limited by OS. try to limit ip-range and try it again to test fast, and at common, it would be better to check count of currently running threads and limit them to wise quantity (5-10): your thread could fail allocate memory with HeapAlloc, for example, but this is not checking within program! regards!
also it is not checked - was thread created at all: you do not check if it is not zero. well, you have weekend to mess with it regards!