Тема в разделе "WASM.ENGLISH", создана пользователем dcskm4200, 18 май 2005.
Could you check the code where is some error?
Sorry, but I have not enough time for this. You can post it here. Probably someone...
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.
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. "
hello! try this
also, i forgot to unkomment wm_timer processing - do it by yourself.
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.
do not understand: you still have the error? it works on my pc now...
there was that:
invoke SendARP,dwIpaddr,0,ADDR pulMac,ADDR ulLen
; .IF ulLen != 0
you should depend on result returned by SendARP: if eax=NO_ERROR (=0) then ok.
invoke HeapAlloc,HeapHandle,HEAP_ZERO_MEMORY or HEAP_NO_SERIALIZE,128d
.if eax !=0 ;see if gethost...worked
xmov lpNamebuf,[eax] ;mov the pointer returnt by gethost into eax
xmov lpNamebuf,offset unknown
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!
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
.text:004010B6 call SendARP
.text:004010BB cmp [ebp+var_C], 0
Please post your Lv_15.exe here.
ok, full proj as at my disk
error msg was created now.
used follow files to created lv_15.exe
reboot my pc, running lv_15.exe now,
error msgpart of all)
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!
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!
Имена участников (разделяйте запятой).