this doesn't work (LoadLib return 0):


.data[b]?[/b]
(...)
szPsApi db "PSAPI.DLL",0
(...)
.code
(...)
invoke LoadLibrary,addr szPsApi


but this work:


.data
(...)
szPsApi db "PSAPI.DLL",0
(...)
.code
(...)
invoke LoadLibrary,addr szPsApi


thats strange.. since i normaly put read-only text on ".data?" or ".data" without problems, anyway this should be diffrent :)
btw, i only test this on Win2000.

byez
Posted on 2002-06-08 20:38:24 by coder
I guese anything in the .data? section is initialized to zero since the .data? section isn't intended for ininialised data.
Posted on 2002-06-08 20:51:32 by Kudos
anything in .data? is taken from the stack in the runtime.
so cann't be initialize
anything in data is written in the exe file.
so can be initialized.
Posted on 2002-06-08 23:15:59 by Sa6ry
Sa6ry, I don't think data?'s content is allocated on the stack. It's probably allocated through VirtualAlloc by the EXE file loader.
Posted on 2002-06-08 23:29:08 by C.Z.
thanks bomb01 for correction ,

you are right, it is not stack.
Posted on 2002-06-09 02:14:12 by Sa6ry
i'm assuming that this would only appen on winNT. (right?)
tnkx for the explanation.
Posted on 2002-06-09 09:27:21 by coder
coder7345,
No, on all versions.
Posted on 2002-06-09 09:32:57 by C.Z.