Can I use getch from msvcrt.dll?

Blitz3D Forums/Blitz3D Beginners Area/Can I use getch from msvcrt.dll?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hi, thanks for your reply. Waitkey will work for kbhit, just wanted to try that dll thing.

As for getch, I want to use it as it doesn't pauses the loop and I don't know which key the user will press, but I need to know afterwards.

I wrote following .decls:
.lib "msvcrt.dll"
getch#():"_getch"

and for code:


While Not KeyHit (1)
	WaitKey()
	result=getch()
	DebugLog result
Wend


but still not returning valid value (geting -2147483648) . Is there something else I am missing?

Thanks