typedef

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Merrill & Michele

    #1

    typedef

    typedef struct
    {
    WORD versionNumber;
    WORD offset;
    }
    MENUITEMTEMPLAT EHEADER;

    This is from vol 5 of unnamed platform's programmer's reference. I could
    make this conforming by enclosing everything in a /*...*/ comment and
    appending the 'hail world' code. Is there an easier, and, let's say, more
    efficacious way to make this pass gcc with -ansi tag and no complaints? MPJ


  • dandelion

    #2
    Re: typedef


    "Merrill & Michele" <beckjensen@com cast.net> wrote in message
    news:IfSdnTZiJ-8Bf1vcRVn-ow@comcast.com. ..[color=blue]
    > typedef struct
    > {
    > WORD versionNumber;
    > WORD offset;
    > }
    > MENUITEMTEMPLAT EHEADER;
    >
    > This is from vol 5 of unnamed platform's programmer's reference. I could
    > make this conforming by enclosing everything in a /*...*/ comment and
    > appending the 'hail world' code. Is there an easier, and, let's say, more
    > efficacious way to make this pass gcc with -ansi tag and no complaints?[/color]
    MPJ


    typedef int WORD;

    or

    typedef unsigned int WORD;

    Personally, i think of 'words' as unsigned, but i'm open to corrections.


    Comment

    • Merrill & Michele

      #3
      Re: typedef


      "dandelion" <dandelion@mead ow.net> wrote in message
      news:41c6e878$0 $9611$e4fe514c@ dreader15.news. xs4all.nl...[color=blue]
      >
      > "Merrill & Michele" <beckjensen@com cast.net> wrote in message
      > news:IfSdnTZiJ-8Bf1vcRVn-ow@comcast.com. ..[color=green]
      > > typedef struct
      > > {
      > > WORD versionNumber;
      > > WORD offset;
      > > }
      > > MENUITEMTEMPLAT EHEADER;
      > >
      > > This is from vol 5 of unnamed platform's programmer's reference. I[/color][/color]
      could[color=blue][color=green]
      > > make this conforming by enclosing everything in a /*...*/ comment and
      > > appending the 'hail world' code. Is there an easier, and, let's say,[/color][/color]
      more[color=blue][color=green]
      > > efficacious way to make this pass gcc with -ansi tag and no complaints?[/color]
      > MPJ
      >
      >
      > typedef int WORD;
      >
      > or
      >
      > typedef unsigned int WORD;
      >
      > Personally, i think of 'words' as unsigned, but i'm open to corrections.[/color]

      And where exactly do you put something like this so an OS can talk to ISO C
      and vice versa. They teach different tools for hooking creatures like this
      using Bjarne's paradigm. There has to be a way in C and my guess is that's
      easy. MPJ


      Comment

      • Bryan Bullard

        #4
        Re: typedef [OT]


        "dandelion" <dandelion@mead ow.net> wrote in message
        news:41c6e878$0 $9611$e4fe514c@ dreader15.news. xs4all.nl...[color=blue]
        >
        > "Merrill & Michele" <beckjensen@com cast.net> wrote in message
        > news:IfSdnTZiJ-8Bf1vcRVn-ow@comcast.com. ..[color=green]
        > > typedef struct
        > > {
        > > WORD versionNumber;
        > > WORD offset;
        > > }
        > > MENUITEMTEMPLAT EHEADER;
        > >
        > > This is from vol 5 of unnamed platform's programmer's reference. I[/color][/color]
        could[color=blue][color=green]
        > > make this conforming by enclosing everything in a /*...*/ comment and
        > > appending the 'hail world' code. Is there an easier, and, let's say,[/color][/color]
        more[color=blue][color=green]
        > > efficacious way to make this pass gcc with -ansi tag and no complaints?[/color]
        > MPJ
        >
        >
        > typedef int WORD;
        >
        > or
        >
        > typedef unsigned int WORD;
        >
        > Personally, i think of 'words' as unsigned, but i'm open to corrections.
        >[/color]

        Actually, this is probably what you are looking for:

        typedef unsigned short WORD;


        Comment

        • Alan Balmer

          #5
          Re: typedef

          On Mon, 20 Dec 2004 08:31:03 -0600, "Merrill & Michele"
          <beckjensen@com cast.net> wrote:
          [color=blue]
          >typedef struct
          >{
          > WORD versionNumber;
          > WORD offset;
          >}
          >MENUITEMTEMPLA TEHEADER;
          >
          >This is from vol 5 of unnamed platform's programmer's reference. I could
          >make this conforming by enclosing everything in a /*...*/ comment and
          >appending the 'hail world' code. Is there an easier, and, let's say, more
          >efficacious way to make this pass gcc with -ansi tag and no complaints? MPJ
          >[/color]
          The best way is to include the headers, presumably supplied by the
          unnamed platform's implementation, which define WORD.

          --
          Al Balmer
          Balmer Consulting
          removebalmercon sultingthis@att .net

          Comment

          • Merrill & Michele

            #6
            Re: typedef


            "Alan Balmer" <albalmer@att.n et> wrote in message
            news:l6vds010ht hvph1ocf7vqac87 aavc2nqro@4ax.c om...[color=blue]
            > On Mon, 20 Dec 2004 08:31:03 -0600, "Merrill & Michele"
            > <beckjensen@com cast.net> wrote:
            >[color=green]
            > >typedef struct
            > >{
            > > WORD versionNumber;
            > > WORD offset;
            > >}
            > >MENUITEMTEMPLA TEHEADER;
            > >
            > >This is from vol 5 of unnamed platform's programmer's reference. I could
            > >make this conforming by enclosing everything in a /*...*/ comment and
            > >appending the 'hail world' code. Is there an easier, and, let's say,[/color][/color]
            more[color=blue][color=green]
            > >efficacious way to make this pass gcc with -ansi tag and no complaints?[/color][/color]
            MPJ[color=blue][color=green]
            > >[/color]
            > The best way is to include the headers, presumably supplied by the
            > unnamed platform's implementation, which define WORD.[/color]

            But those are going to include a lot of much less than standard stuff. But
            if I get your meaning, I need to track down WORD. I MEANT to use an example
            with a DWORD. Would that make a difference? MPJ


            Comment

            • Bryan Bullard

              #7
              Re: typedef [OT]


              "Merrill & Michele" <beckjensen@com cast.net> wrote in message
              news:ZOGdnfj_M5 h7iVrcRVn-hA@comcast.com. ..[color=blue]
              >
              > "Alan Balmer" <albalmer@att.n et> wrote in message
              > news:l6vds010ht hvph1ocf7vqac87 aavc2nqro@4ax.c om...[color=green]
              > > On Mon, 20 Dec 2004 08:31:03 -0600, "Merrill & Michele"
              > > <beckjensen@com cast.net> wrote:
              > >[color=darkred]
              > > >typedef struct
              > > >{
              > > > WORD versionNumber;
              > > > WORD offset;
              > > >}
              > > >MENUITEMTEMPLA TEHEADER;
              > > >
              > > >This is from vol 5 of unnamed platform's programmer's reference. I[/color][/color][/color]
              could[color=blue][color=green][color=darkred]
              > > >make this conforming by enclosing everything in a /*...*/ comment and
              > > >appending the 'hail world' code. Is there an easier, and, let's say,[/color][/color]
              > more[color=green][color=darkred]
              > > >efficacious way to make this pass gcc with -ansi tag and no complaints?[/color][/color]
              > MPJ[color=green][color=darkred]
              > > >[/color]
              > > The best way is to include the headers, presumably supplied by the
              > > unnamed platform's implementation, which define WORD.[/color]
              >
              > But those are going to include a lot of much less than standard stuff.[/color]
              But[color=blue]
              > if I get your meaning, I need to track down WORD. I MEANT to use an[/color]
              example[color=blue]
              > with a DWORD. Would that make a difference? MPJ[/color]

              He's given you good advise. See windef.h


              Comment

              • Alan Balmer

                #8
                Re: typedef

                On Mon, 20 Dec 2004 12:05:38 -0600, "Merrill & Michele"
                <beckjensen@com cast.net> wrote:
                [color=blue]
                >
                >"Alan Balmer" <albalmer@att.n et> wrote in message
                >news:l6vds010h thvph1ocf7vqac8 7aavc2nqro@4ax. com...[color=green]
                >> On Mon, 20 Dec 2004 08:31:03 -0600, "Merrill & Michele"
                >> <beckjensen@com cast.net> wrote:
                >>[color=darkred]
                >> >typedef struct
                >> >{
                >> > WORD versionNumber;
                >> > WORD offset;
                >> >}
                >> >MENUITEMTEMPLA TEHEADER;
                >> >
                >> >This is from vol 5 of unnamed platform's programmer's reference. I could
                >> >make this conforming by enclosing everything in a /*...*/ comment and
                >> >appending the 'hail world' code. Is there an easier, and, let's say,[/color][/color]
                >more[color=green][color=darkred]
                >> >efficacious way to make this pass gcc with -ansi tag and no complaints?[/color][/color]
                >MPJ[color=green][color=darkred]
                >> >[/color]
                >> The best way is to include the headers, presumably supplied by the
                >> unnamed platform's implementation, which define WORD.[/color]
                >
                >But those are going to include a lot of much less than standard stuff. But
                >if I get your meaning, I need to track down WORD. I MEANT to use an example
                >with a DWORD. Would that make a difference? MPJ
                >[/color]
                No. But what are you trying to accomplish? If you are trying to
                actually compile a program on this platform, use the platform's
                headers. If you're just trying to read the program, does the exact
                definition of the type WORD really matter?

                The above tells me that the author has invented a type named
                MENUITEMTEMPLAT EHEADER (terrible name, imo, but that's another
                subject.) This type is a struct composed of two variables,
                versionNumber and offset. I see no reason, at this point, to care what
                type those variables are. In fact, there should be no reason even to
                know what type MENUITEMTEMPLAT EHEADER is composed of - it just gets
                used when it's needed, and a good implementation would bury the
                details where you don't need to see them, unless you are the author
                that created it.

                --
                Al Balmer
                Balmer Consulting
                removebalmercon sultingthis@att .net

                Comment

                • Zax

                  #9
                  Re: typedef


                  "Alan Balmer" <albalmer@att.n et> wrote in message
                  news:m8bes0947i 5524piapemg4bs7 4pdf3qn3i@4ax.c om...[color=blue]
                  > On Mon, 20 Dec 2004 12:05:38 -0600, "Merrill & Michele"
                  > <beckjensen@com cast.net> wrote:
                  >[color=green]
                  > >
                  > >"Alan Balmer" <albalmer@att.n et> wrote in message
                  > >news:l6vds010h thvph1ocf7vqac8 7aavc2nqro@4ax. com...[color=darkred]
                  > >> On Mon, 20 Dec 2004 08:31:03 -0600, "Merrill & Michele"
                  > >> <beckjensen@com cast.net> wrote:
                  > >>
                  > >> >typedef struct
                  > >> >{
                  > >> > WORD versionNumber;
                  > >> > WORD offset;
                  > >> >}
                  > >> >MENUITEMTEMPLA TEHEADER;
                  > >> >
                  > >> >This is from vol 5 of unnamed platform's programmer's reference. I[/color][/color][/color]
                  could[color=blue][color=green][color=darkred]
                  > >> >make this conforming by enclosing everything in a /*...*/ comment and
                  > >> >appending the 'hail world' code. Is there an easier, and, let's say,[/color]
                  > >more[color=darkred]
                  > >> >efficacious way to make this pass gcc with -ansi tag and no[/color][/color][/color]
                  complaints?[color=blue][color=green]
                  > >MPJ[color=darkred]
                  > >> >
                  > >> The best way is to include the headers, presumably supplied by the
                  > >> unnamed platform's implementation, which define WORD.[/color]
                  > >
                  > >But those are going to include a lot of much less than standard stuff.[/color][/color]
                  But[color=blue][color=green]
                  > >if I get your meaning, I need to track down WORD. I MEANT to use an[/color][/color]
                  example[color=blue][color=green]
                  > >with a DWORD. Would that make a difference? MPJ
                  > >[/color]
                  > No. But what are you trying to accomplish? If you are trying to
                  > actually compile a program on this platform, use the platform's
                  > headers. If you're just trying to read the program, does the exact
                  > definition of the type WORD really matter?
                  >
                  > The above tells me that the author has invented a type named
                  > MENUITEMTEMPLAT EHEADER (terrible name, imo, but that's another
                  > subject.) This type is a struct composed of two variables,
                  > versionNumber and offset. I see no reason, at this point, to care what
                  > type those variables are. In fact, there should be no reason even to
                  > know what type MENUITEMTEMPLAT EHEADER is composed of - it just gets
                  > used when it's needed, and a good implementation would bury the
                  > details where you don't need to see them, unless you are the author
                  > that created it.[/color]

                  Believe it or not, MENUITEMTEMPLAT EHEADER is a creature that I think ISO C
                  can reach with sufficient elbow grease. I'm gonna look through some
                  headers. MPJ


                  Comment

                  • dandelion

                    #10
                    Re: typedef [OT]


                    "Bryan Bullard" <replay@to.grou p.com> wrote in message
                    news:lWCxd.3318 $iC4.2986@newss vr30.news.prodi gy.com...[color=blue]
                    >
                    > "dandelion" <dandelion@mead ow.net> wrote in message
                    > news:41c6e878$0 $9611$e4fe514c@ dreader15.news. xs4all.nl...[color=green]
                    > >
                    > > "Merrill & Michele" <beckjensen@com cast.net> wrote in message
                    > > news:IfSdnTZiJ-8Bf1vcRVn-ow@comcast.com. ..[color=darkred]
                    > > > typedef struct
                    > > > {
                    > > > WORD versionNumber;
                    > > > WORD offset;
                    > > > }
                    > > > MENUITEMTEMPLAT EHEADER;
                    > > >
                    > > > This is from vol 5 of unnamed platform's programmer's reference. I[/color][/color]
                    > could[color=green][color=darkred]
                    > > > make this conforming by enclosing everything in a /*...*/ comment and
                    > > > appending the 'hail world' code. Is there an easier, and, let's say,[/color][/color]
                    > more[color=green][color=darkred]
                    > > > efficacious way to make this pass gcc with -ansi tag and no[/color][/color][/color]
                    complaints?[color=blue][color=green]
                    > > MPJ
                    > >
                    > >
                    > > typedef int WORD;
                    > >
                    > > or
                    > >
                    > > typedef unsigned int WORD;
                    > >
                    > > Personally, i think of 'words' as unsigned, but i'm open to corrections.
                    > >[/color]
                    >
                    > Actually, this is probably what you are looking for:
                    >
                    > typedef unsigned short WORD;[/color]

                    Maybe. Depends on the definition of a 'word'. On a 80x86 you are right,
                    on a Z80 you are wrong.


                    Comment

                    • dandelion

                      #11
                      Re: typedef


                      "Merrill & Michele" <beckjensen@com cast.net> wrote in message
                      news:mZidnVwcWe jKZ1vcRVn-oQ@comcast.com. ..[color=blue]
                      >
                      > "dandelion" <dandelion@mead ow.net> wrote in message
                      > news:41c6e878$0 $9611$e4fe514c@ dreader15.news. xs4all.nl...[color=green]
                      > >
                      > > "Merrill & Michele" <beckjensen@com cast.net> wrote in message
                      > > news:IfSdnTZiJ-8Bf1vcRVn-ow@comcast.com. ..[color=darkred]
                      > > > typedef struct
                      > > > {
                      > > > WORD versionNumber;
                      > > > WORD offset;
                      > > > }
                      > > > MENUITEMTEMPLAT EHEADER;
                      > > >
                      > > > This is from vol 5 of unnamed platform's programmer's reference. I[/color][/color]
                      > could[color=green][color=darkred]
                      > > > make this conforming by enclosing everything in a /*...*/ comment and
                      > > > appending the 'hail world' code. Is there an easier, and, let's say,[/color][/color]
                      > more[color=green][color=darkred]
                      > > > efficacious way to make this pass gcc with -ansi tag and no[/color][/color][/color]
                      complaints?[color=blue][color=green]
                      > > MPJ
                      > >
                      > >
                      > > typedef int WORD;
                      > >
                      > > or
                      > >
                      > > typedef unsigned int WORD;
                      > >
                      > > Personally, i think of 'words' as unsigned, but i'm open to corrections.[/color]
                      >
                      > And where exactly do you put something like this so an OS can talk to ISO[/color]
                      C[color=blue]
                      > and vice versa.[/color]

                      Given the fact ypu provided only a snippet w/o any OS, i would not know.

                      They teach different tools for hooking creatures like this[color=blue]
                      > using Bjarne's paradigm. There has to be a way in C and my guess is[/color]
                      that's[color=blue]
                      > easy. MPJ
                      >
                      >[/color]


                      Comment

                      • Richard Bos

                        #12
                        Re: typedef [OT]

                        "dandelion" <dandelion@mead ow.net> wrote:
                        [color=blue]
                        > "Bryan Bullard" <replay@to.grou p.com> wrote in message
                        > news:lWCxd.3318 $iC4.2986@newss vr30.news.prodi gy.com...[color=green]
                        > >
                        > > Actually, this is probably what you are looking for:
                        > >
                        > > typedef unsigned short WORD;[/color]
                        >
                        > Maybe. Depends on the definition of a 'word'. On a 80x86 you are right,
                        > on a Z80 you are wrong.[/color]

                        Which is exactly why both the question and your answer to it are
                        off-topic here.

                        A WORD is exactly what your program wants it to be; there is no such
                        thing in ISO C, and a conforming hosted compiler cannot define it.

                        Richard

                        Comment

                        • Zax

                          #13
                          Re: typedef [OT]


                          "Richard Bos" <rlb@hoekstra-uitgeverij.nl> wrote in message
                          news:41c82d21.3 68515399@news.i ndividual.net.. .[color=blue]
                          > "dandelion" <dandelion@mead ow.net> wrote:
                          >[color=green]
                          > > "Bryan Bullard" <replay@to.grou p.com> wrote in message
                          > > news:lWCxd.3318 $iC4.2986@newss vr30.news.prodi gy.com...[color=darkred]
                          > > >
                          > > > Actually, this is probably what you are looking for:
                          > > >
                          > > > typedef unsigned short WORD;[/color]
                          > >
                          > > Maybe. Depends on the definition of a 'word'. On a 80x86 you are right,
                          > > on a Z80 you are wrong.[/color]
                          >
                          > Which is exactly why both the question and your answer to it are
                          > off-topic here.
                          >
                          > A WORD is exactly what your program wants it to be; there is no such
                          > thing in ISO C, and a conforming hosted compiler cannot define it.[/color]

                          Amd same is true for a DWORD? MPJ


                          Comment

                          • Keith Thompson

                            #14
                            Re: typedef [OT]

                            rlb@hoekstra-uitgeverij.nl (Richard Bos) writes:
                            [...][color=blue]
                            > A WORD is exactly what your program wants it to be; there is no such
                            > thing in ISO C, and a conforming hosted compiler cannot define it.[/color]

                            Or a WORD can be what a system-specific library wants it to be.

                            --
                            Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
                            San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
                            We must do something. This is something. Therefore, we must do this.

                            Comment

                            • Carlo

                              #15
                              Re: typedef


                              "dandelion" <dandelion@mead ow.net> wrote in message
                              news:41c8149f$0 $22535$e4fe514c @dreader7.news. xs4all.nl...[color=blue]
                              >
                              > "Merrill & Michele" <beckjensen@com cast.net> wrote in message
                              > news:mZidnVwcWe jKZ1vcRVn-oQ@comcast.com. ..[color=green]
                              > >
                              > > "dandelion" <dandelion@mead ow.net> wrote in message
                              > > news:41c6e878$0 $9611$e4fe514c@ dreader15.news. xs4all.nl...[color=darkred]
                              > > >
                              > > > "Merrill & Michele" <beckjensen@com cast.net> wrote in message
                              > > > news:IfSdnTZiJ-8Bf1vcRVn-ow@comcast.com. ..
                              > > > > typedef struct
                              > > > > {
                              > > > > WORD versionNumber;
                              > > > > WORD offset;
                              > > > > }
                              > > > > MENUITEMTEMPLAT EHEADER;
                              > > > >
                              > > > > This is from vol 5 of unnamed platform's programmer's reference. I[/color]
                              > > could[color=darkred]
                              > > > > make this conforming by enclosing everything in a /*...*/ comment[/color][/color][/color]
                              and[color=blue][color=green][color=darkred]
                              > > > > appending the 'hail world' code. Is there an easier, and, let's[/color][/color][/color]
                              say,[color=blue][color=green]
                              > > more[color=darkred]
                              > > > > efficacious way to make this pass gcc with -ansi tag and no[/color][/color]
                              > complaints?[color=green][color=darkred]
                              > > > MPJ
                              > > >
                              > > >
                              > > > typedef int WORD;
                              > > >
                              > > > or
                              > > >
                              > > > typedef unsigned int WORD;
                              > > >
                              > > > Personally, i think of 'words' as unsigned, but i'm open to[/color][/color][/color]
                              corrections.[color=blue][color=green]
                              > >
                              > > And where exactly do you put something like this so an OS can talk to[/color][/color]
                              ISO[color=blue]
                              > C[color=green]
                              > > and vice versa.[/color]
                              >
                              > Given the fact ypu provided only a snippet w/o any OS, i would not know.
                              >
                              > They teach different tools for hooking creatures like this[color=green]
                              > > using Bjarne's paradigm. There has to be a way in C and my guess is[/color]
                              > that's[color=green]
                              > > easy. MPJ[/color][/color]

                              Posted in the bublic domain my Merrill Jensen; legal copy. These header
                              files confuse me. I notice the first entity is ISO C, which would not be
                              altogether remarkable as it's a remark. I just don't get what isn't kosher
                              here. Carlo

                              /*************** *************** *************** *************** ***************
                              *
                              *
                              *
                              * windef.h -- Basic Windows Type Definitions
                              *
                              *
                              *
                              * Copyright (c) 1985-1995, Microsoft Corp. All rights reserved.
                              *
                              *
                              *
                              *************** *************** *************** *************** *************** *
                              /


                              #ifndef _WINDEF_
                              #define _WINDEF_


                              #ifdef __cplusplus
                              extern "C" {
                              #endif

                              #ifndef WINVER
                              #define WINVER 0x0400
                              #endif


                              /*
                              * BASETYPES is defined in ntdef.h if these types are already defined
                              */

                              #ifndef BASETYPES
                              #define BASETYPES
                              typedef unsigned long ULONG;
                              typedef ULONG *PULONG;
                              typedef unsigned short USHORT;
                              typedef USHORT *PUSHORT;
                              typedef unsigned char UCHAR;
                              typedef UCHAR *PUCHAR;
                              typedef char *PSZ;
                              #endif /* !BASETYPES */

                              #define MAX_PATH 260

                              #ifndef NULL
                              #ifdef __cplusplus
                              #define NULL 0
                              #else
                              #define NULL ((void *)0)
                              #endif
                              #endif

                              #ifndef FALSE
                              #define FALSE 0
                              #endif

                              #ifndef TRUE
                              #define TRUE 1
                              #endif

                              #ifndef IN
                              #define IN
                              #endif

                              #ifndef OUT
                              #define OUT
                              #endif

                              #ifndef OPTIONAL
                              #define OPTIONAL
                              #endif

                              #undef far
                              #undef near
                              #undef pascal

                              #define far
                              #define near
                              #if (_MSC_VER >= 800) || defined(_STDCAL L_SUPPORTED)
                              #define pascal __stdcall
                              #else
                              #define pascal
                              #endif

                              #ifdef DOSWIN32
                              #define cdecl _cdecl
                              #ifndef CDECL
                              #define CDECL _cdecl
                              #endif
                              #else
                              #define cdecl
                              #ifndef CDECL
                              #define CDECL
                              #endif
                              #endif

                              #if (_MSC_VER >= 800) || defined(_STDCAL L_SUPPORTED)
                              #define CALLBACK __stdcall
                              #define WINAPI __stdcall
                              #define WINAPIV __cdecl
                              #define APIENTRY WINAPI
                              #define APIPRIVATE __stdcall
                              #define PASCAL __stdcall
                              #else
                              #define CALLBACK
                              #define WINAPI
                              #define WINAPIV
                              #define APIENTRY WINAPI
                              #define APIPRIVATE
                              #define PASCAL pascal
                              #endif

                              #define FAR far
                              #define NEAR near
                              #ifndef CONST
                              #define CONST const
                              #endif

                              typedef unsigned long DWORD;
                              typedef int BOOL;
                              typedef unsigned char BYTE;
                              typedef unsigned short WORD;
                              typedef float FLOAT;
                              typedef FLOAT *PFLOAT;
                              typedef BOOL near *PBOOL;
                              typedef BOOL far *LPBOOL;
                              typedef BYTE near *PBYTE;
                              typedef BYTE far *LPBYTE;
                              typedef int near *PINT;
                              typedef int far *LPINT;
                              typedef WORD near *PWORD;
                              typedef WORD far *LPWORD;
                              typedef long far *LPLONG;
                              typedef DWORD near *PDWORD;
                              typedef DWORD far *LPDWORD;
                              typedef void far *LPVOID;
                              typedef CONST void far *LPCVOID;

                              typedef int INT;
                              typedef unsigned int UINT;
                              typedef unsigned int *PUINT;

                              #ifndef NT_INCLUDED
                              #include <winnt.h>
                              #endif /* NT_INCLUDED */

                              /* Types use for passing & returning polymorphic values */
                              typedef UINT WPARAM;
                              typedef LONG LPARAM;
                              typedef LONG LRESULT;

                              #ifndef NOMINMAX

                              #ifndef max
                              #define max(a,b) (((a) > (b)) ? (a) : (b))
                              #endif

                              #ifndef min
                              #define min(a,b) (((a) < (b)) ? (a) : (b))
                              #endif

                              #endif /* NOMINMAX */

                              #define MAKEWORD(a, b) ((WORD)(((BYTE) (a)) | ((WORD)((BYTE)( b))) << 8))
                              #define MAKELONG(a, b) ((LONG)(((WORD) (a)) | ((DWORD)((WORD) (b))) <<
                              16))
                              #define LOWORD(l) ((WORD)(l))
                              #define HIWORD(l) ((WORD)(((DWORD )(l) >> 16) & 0xFFFF))
                              #define LOBYTE(w) ((BYTE)(w))
                              #define HIBYTE(w) ((BYTE)(((WORD) (w) >> 8) & 0xFF))


                              #ifndef WIN_INTERNAL
                              DECLARE_HANDLE (HWND);
                              DECLARE_HANDLE (HHOOK);
                              #endif

                              typedef WORD ATOM;

                              typedef HANDLE NEAR *SPHANDLE;
                              typedef HANDLE FAR *LPHANDLE;
                              typedef HANDLE HGLOBAL;
                              typedef HANDLE HLOCAL;
                              typedef HANDLE GLOBALHANDLE;
                              typedef HANDLE LOCALHANDLE;
                              typedef int (FAR WINAPI *FARPROC)();
                              typedef int (NEAR WINAPI *NEARPROC)();
                              typedef int (WINAPI *PROC)();

                              #ifdef STRICT
                              typedef void NEAR* HGDIOBJ;
                              #else
                              DECLARE_HANDLE( HGDIOBJ);
                              #endif

                              DECLARE_HANDLE( HACCEL);
                              DECLARE_HANDLE( HBITMAP);
                              DECLARE_HANDLE( HBRUSH);
                              #if(WINVER >= 0x0400)
                              DECLARE_HANDLE( HCOLORSPACE);
                              #endif /* WINVER >= 0x0400 */
                              DECLARE_HANDLE( HDC);
                              DECLARE_HANDLE( HGLRC); // OpenGL
                              DECLARE_HANDLE( HDESK);
                              DECLARE_HANDLE( HENHMETAFILE);
                              DECLARE_HANDLE( HFONT);
                              DECLARE_HANDLE( HICON);
                              DECLARE_HANDLE( HMENU);
                              DECLARE_HANDLE( HMETAFILE);
                              DECLARE_HANDLE( HINSTANCE);
                              typedef HINSTANCE HMODULE; /* HMODULEs can be used in place of
                              HINSTANCEs */
                              DECLARE_HANDLE( HPALETTE);
                              DECLARE_HANDLE( HPEN);
                              DECLARE_HANDLE( HRGN);
                              DECLARE_HANDLE( HRSRC);
                              DECLARE_HANDLE( HSTR);
                              DECLARE_HANDLE( HTASK);
                              DECLARE_HANDLE( HWINSTA);
                              DECLARE_HANDLE( HKL);

                              typedef int HFILE;
                              typedef HICON HCURSOR; /* HICONs & HCURSORs are polymorphic */

                              typedef DWORD COLORREF;
                              typedef DWORD *LPCOLORREF;

                              #define HFILE_ERROR ((HFILE)-1)

                              typedef struct tagRECT
                              {
                              LONG left;
                              LONG top;
                              LONG right;
                              LONG bottom;
                              } RECT, *PRECT, NEAR *NPRECT, FAR *LPRECT;

                              typedef const RECT FAR* LPCRECT;

                              typedef struct _RECTL /* rcl */
                              {
                              LONG left;
                              LONG top;
                              LONG right;
                              LONG bottom;
                              } RECTL, *PRECTL, *LPRECTL;

                              typedef const RECTL FAR* LPCRECTL;

                              typedef struct tagPOINT
                              {
                              LONG x;
                              LONG y;
                              } POINT, *PPOINT, NEAR *NPPOINT, FAR *LPPOINT;

                              typedef struct _POINTL /* ptl */
                              {
                              LONG x;
                              LONG y;
                              } POINTL, *PPOINTL;

                              typedef struct tagSIZE
                              {
                              LONG cx;
                              LONG cy;
                              } SIZE, *PSIZE, *LPSIZE;

                              typedef SIZE SIZEL;
                              typedef SIZE *PSIZEL, *LPSIZEL;

                              typedef struct tagPOINTS
                              {
                              SHORT x;
                              SHORT y;
                              } POINTS, *PPOINTS, *LPPOINTS;

                              /* mode selections for the device mode function */
                              #define DM_UPDATE 1
                              #define DM_COPY 2
                              #define DM_PROMPT 4
                              #define DM_MODIFY 8

                              #define DM_IN_BUFFER DM_MODIFY
                              #define DM_IN_PROMPT DM_PROMPT
                              #define DM_OUT_BUFFER DM_COPY
                              #define DM_OUT_DEFAULT DM_UPDATE

                              /* device capabilities indices */
                              #define DC_FIELDS 1
                              #define DC_PAPERS 2
                              #define DC_PAPERSIZE 3
                              #define DC_MINEXTENT 4
                              #define DC_MAXEXTENT 5
                              #define DC_BINS 6
                              #define DC_DUPLEX 7
                              #define DC_SIZE 8
                              #define DC_EXTRA 9
                              #define DC_VERSION 10
                              #define DC_DRIVER 11
                              #define DC_BINNAMES 12
                              #define DC_ENUMRESOLUTI ONS 13
                              #define DC_FILEDEPENDEN CIES 14
                              #define DC_TRUETYPE 15
                              #define DC_PAPERNAMES 16
                              #define DC_ORIENTATION 17
                              #define DC_COPIES 18

                              #ifdef __cplusplus
                              }
                              #endif


                              #endif /* _WINDEF_ */


                              Comment

                              Working...