Author Topic: STD_OUTPUT_HANDLE  (Read 18852 times)

mark allyn

  • Guest
STD_OUTPUT_HANDLE
« on: August 10, 2009, 02:55:43 AM »
Hi everyone -

I am trying to find the header file in which STD_OUTPUT_HANDLE is defined.   I'm using the MINGW distribution.  All I'm trying to do is call GetStdHandle from NASM.

Thanks,
Mark Allyn

nobody

  • Guest
Re: STD_OUTPUT_HANDLE
« Reply #1 on: August 10, 2009, 03:14:33 PM »
Mark -

On my system, I find the header file at:

C:\nasmx\inc\win32\windows.inc

Nathan.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: STD_OUTPUT_HANDLE
« Reply #2 on: August 10, 2009, 04:11:42 PM »
Come to think of it, I do have Mingw on my system - tried to install it as a cross-compiler (didn't succeed). I see a "w32api-3.9.tar.gz", which includes a "winbase.h", which seems to be where STD_OUTPUT_HANDLE is defined. That's a C include file, of course, and would have to be converted to Nasm syntax. Johannes Kroll has written a utility for that. There may be a newer version available - I've lost track of the primary download site - but I've got:

http://home.comcast.net/~fbkotler/h2incn-0.5.tar.gz

I would expect this to be defined in any decent "windows.inc", which may be easier than converting .h files yourself - but the .h files are the "source". I thought it was a joke, but no, STD_OUTPUT_HANDLE is really -11... or 0xFFFFFFF5...

Best,
Frank

mark allyn

  • Guest
Re: STD_OUTPUT_HANDLE
« Reply #3 on: August 10, 2009, 04:33:16 PM »
Hi Nathan and Frank :

Believe it or not, I spent two hours going thru what looked like all the right .h files, starting with the logical choices, io.h, console.h, & stdio.h.  Where it is on my system is:

c:\MinGW\include\winbase.h

Yup.  Anyway, as Frank observes, the values are wierd, but they are what they are.

Thanks folks,
Mark