Using tasm32. GetStdHandle returns INVALID_HANDLE_VALUE in eax register.

.model flat

extrn GetStdHandle:PROC
extrn ExitProcess:PROC




push -11
call GetStdHandle

push 0
call ExitProcess

end start

Other APIs work fine. just having problems with GetStdHandle. Any ideas?

added a data declaration under the .data section.


hStdout dd 0

Seems to have fixed it.

Using /ax for the tlink32 param allows td32 to load symbol tables.