ここで MASM でメモリを動的に割り当てる方法を尋ねましたが、さらに 2 つの質問がありました。
バイトにメモリを割り当てるにはどうすればよいですか?
.data
tab DB ?
result DB ?
.code
invoke GetProcessHeap
; error here
mov tab, eax ; I cannot do this because of wrong sizes, AL and AH are equal 0
INVOKE HeapAlloc, tab, 0, <size>
invoke GetProcessHeap
mov result, eax ; same here
INVOKE HeapAlloc, result, 0, <size>
2 番目の質問です。マルチスレッド アプリケーションでメモリを割り当てるこの方法を使用できますか、それとも GlobalAlloc を使用する必要がありますか?