When I'm overwriting the first opcodes of a function with the jmp opcode , I'm actually writting 5 bytes (or 2 for jmp short). But what if another thread (from the same proccess) will call this function while I'm changing it? This will cause unexpected behavior. But I didn't find any explaination . The hooking articles igonre it , like there is no problem.
Maybe in win32api you use the fact that there are nops with mov edi,edi . but my question is more theoretical
thanks