In my project I currently use the following variable:
.data?
buffer_memory dd 40960 dup (?)
Would it be better to use the heap api commands and allocate memory like that, or is this method fine?
It's fine, shorter and faster. Watch out for a bug in Masm (http://www.masmforum.com/board/index.php?topic=10435.0) (2. Assembly gets slow...)
Thanks for the info :t
Do yourself a favour, get used to using allocated memory, its a lot more flexible and you can start and end it on the basis of need. Either initialised or uninitialised data sections are useful for relatively small amounts of memory when you need GLOBAL scope with the data or space enclosed in either but dynamic allocation can do a lot more in a much more flexible way.
what about reading file ?
i use like that
invoke GlobalAlloc,GMEM_MOVEABLE or GMEM_ZEROINIT,(1024*1024* 8 )
if i use like that
invoke GlobalAlloc,GMEM_MOVEABLE or GMEM_ZEROINIT,nFileSize
after deleting any item from file my project crashes :dazzled: