I got a problem, when ever I try to release memory using global/local free after doing this (mov esi,hMem) my program crashes, can someone explain this?
Windows expects certain registers to have certain values in them. When you change esi, you confuse it.
Bad boy ;-)
Basically, you are free to use eax, edx, and ecx. If you change any other registers, push first, pop later.
Or if its a PROC use the USES it does it for you, and may be a little easier to read :)
Mirno