0

Using tasm32. GetStdHandle returns INVALID_HANDLE_VALUE in eax register.

.386
.model flat

extrn GetStdHandle:PROC
extrn ExitProcess:PROC

.data

.code

start:

push -11
call GetStdHandle

push 0
call ExitProcess

end start

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

Edited by hkdani

1
Contributor
1
Reply
10
Views
1 Year
Discussion Span
Last Post by hkdani
0

added a data declaration under the .data section.

.data

hStdout dd 0

Seems to have fixed it.

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

Edited by hkdani

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.