Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. stdcall_api & troubles

stdcall_api & troubles

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
15 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Roger Stoltz

    thoru wrote:

    #define stdcall_api __stdcall

    You probably meant the other way around since __stdcall is a reserved word, i.e. you want the identifier stdcall_api to be substituted with __stdcall during the preprocessing phase, right? The errors you got are from the windows header files wherever __stdcall is substituted by stdcall_api which is an unknown identifier. Do it like this:

    #define __stdcall stdcall_api

    Forget that the above ever existed, it's embarrassing.

    "It's supposed to be hard, otherwise anybody could do it!" - selfquote
    "High speed never compensates for wrong direction!" - unknown

    modified on Wednesday, October 8, 2008 8:56 AM

    T Offline
    T Offline
    thoru
    wrote on last edited by
    #5

    Nope, still did not fix my problems, but thank you:)

    R 1 Reply Last reply
    0
    • R Roger Stoltz

      thoru wrote:

      #define stdcall_api __stdcall

      You probably meant the other way around since __stdcall is a reserved word, i.e. you want the identifier stdcall_api to be substituted with __stdcall during the preprocessing phase, right? The errors you got are from the windows header files wherever __stdcall is substituted by stdcall_api which is an unknown identifier. Do it like this:

      #define __stdcall stdcall_api

      Forget that the above ever existed, it's embarrassing.

      "It's supposed to be hard, otherwise anybody could do it!" - selfquote
      "High speed never compensates for wrong direction!" - unknown

      modified on Wednesday, October 8, 2008 8:56 AM

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #6

      Roger Stoltz wrote:

      Do it like this: #define __stdcall stdcall_api

      no Roger, you're going to replace every occurence of __stdcall with stdcall_api (which is not defined, so leading to errors). what the OP wants is the opposite, and remember #define works "the opposite" as typedef ;) so he wrote it well ; the error is elsewhere.

      [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

      T R 2 Replies Last reply
      0
      • T thoru

        Error 1 error C2146: syntax error : missing ';' before identifier 'Int64ShllMod32' c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h 654 Error 2 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h 657 Error 3 error C2146: syntax error : missing ';' before identifier 'Int64ShraMod32' c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h 661 Error 4 error C2371: 'stdcall_api' : redefinition; different basic types c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h 661 Error 5 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h 664 Error 6 error C2146: syntax error : missing ';' before identifier 'Int64ShrlMod32' c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h 668 Error 7 error C2086: 'ULONGLONG stdcall_api' : redefinition c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h 668 OSPI Error 8 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h 671 This kind of errors:D

        T Offline
        T Offline
        toxcct
        wrote on last edited by
        #7

        just a guess, in what order are you #including your headers, and where do you #define you stdcall_api ?

        [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

        1 Reply Last reply
        0
        • T toxcct

          Roger Stoltz wrote:

          Do it like this: #define __stdcall stdcall_api

          no Roger, you're going to replace every occurence of __stdcall with stdcall_api (which is not defined, so leading to errors). what the OP wants is the opposite, and remember #define works "the opposite" as typedef ;) so he wrote it well ; the error is elsewhere.

          [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

          T Offline
          T Offline
          thoru
          wrote on last edited by
          #8

          Yeah, plus, i do not see why it would affect my other builds or this one, if i take the #define out. I think i have stumbled upon something very strange with this stdcall_api.

          T 1 Reply Last reply
          0
          • T toxcct

            Roger Stoltz wrote:

            Do it like this: #define __stdcall stdcall_api

            no Roger, you're going to replace every occurence of __stdcall with stdcall_api (which is not defined, so leading to errors). what the OP wants is the opposite, and remember #define works "the opposite" as typedef ;) so he wrote it well ; the error is elsewhere.

            [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

            R Offline
            R Offline
            Roger Stoltz
            wrote on last edited by
            #9

            :omg: How embarrassing, it's inexcusable and I'm truly sorry. :-\ Just made myself look like a newbie. If I could I would vote my previous reply as "unhelpful".... *Geeee....*

            "It's supposed to be hard, otherwise anybody could do it!" - selfquote
            "High speed never compensates for wrong direction!" - unknown

            T T 2 Replies Last reply
            0
            • T thoru

              Nope, still did not fix my problems, but thank you:)

              R Offline
              R Offline
              Roger Stoltz
              wrote on last edited by
              #10

              Sorry thoru, disregard from my previous post, I must have been delirious when I wrote it.

              "It's supposed to be hard, otherwise anybody could do it!" - selfquote
              "High speed never compensates for wrong direction!" - unknown

              1 Reply Last reply
              0
              • T thoru

                Yeah, plus, i do not see why it would affect my other builds or this one, if i take the #define out. I think i have stumbled upon something very strange with this stdcall_api.

                T Offline
                T Offline
                toxcct
                wrote on last edited by
                #11

                hum, also, why are you defining such stdcall_api macro ?

                [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

                1 Reply Last reply
                0
                • R Roger Stoltz

                  :omg: How embarrassing, it's inexcusable and I'm truly sorry. :-\ Just made myself look like a newbie. If I could I would vote my previous reply as "unhelpful".... *Geeee....*

                  "It's supposed to be hard, otherwise anybody could do it!" - selfquote
                  "High speed never compensates for wrong direction!" - unknown

                  T Offline
                  T Offline
                  toxcct
                  wrote on last edited by
                  #12

                  ;) Nevermind, I know you're a strong member here. :cool::rose:

                  [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

                  R 1 Reply Last reply
                  0
                  • R Roger Stoltz

                    :omg: How embarrassing, it's inexcusable and I'm truly sorry. :-\ Just made myself look like a newbie. If I could I would vote my previous reply as "unhelpful".... *Geeee....*

                    "It's supposed to be hard, otherwise anybody could do it!" - selfquote
                    "High speed never compensates for wrong direction!" - unknown

                    T Offline
                    T Offline
                    thoru
                    wrote on last edited by
                    #13

                    Roger, believe me or not, your post actually helped me, so it wasn't a complete loss of a post. First of all, thanks to Roger and toxxct for your posts. So this is my fix: I did a compare in the sdk between v5 and v6 in the include folder and looked at winnt.h Where the stdcall_api was mentioned in v6, i changed it back to v5 which strange enough was __stdcall. I have no clue as to how that was changed in there (i mean __stdcall being replaced bye stdcall_api) but this fixed it. They should have a #ifdef NEWBIE_IN_C {code for restricting access to this super sensitive keywords} #endif. -Thoru, a newbie in C++

                    R 1 Reply Last reply
                    0
                    • T toxcct

                      ;) Nevermind, I know you're a strong member here. :cool::rose:

                      [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

                      R Offline
                      R Offline
                      Roger Stoltz
                      wrote on last edited by
                      #14

                      Thanks tox'. :rose:

                      "It's supposed to be hard, otherwise anybody could do it!" - selfquote
                      "High speed never compensates for wrong direction!" - unknown

                      1 Reply Last reply
                      0
                      • T thoru

                        Roger, believe me or not, your post actually helped me, so it wasn't a complete loss of a post. First of all, thanks to Roger and toxxct for your posts. So this is my fix: I did a compare in the sdk between v5 and v6 in the include folder and looked at winnt.h Where the stdcall_api was mentioned in v6, i changed it back to v5 which strange enough was __stdcall. I have no clue as to how that was changed in there (i mean __stdcall being replaced bye stdcall_api) but this fixed it. They should have a #ifdef NEWBIE_IN_C {code for restricting access to this super sensitive keywords} #endif. -Thoru, a newbie in C++

                        R Offline
                        R Offline
                        Roger Stoltz
                        wrote on last edited by
                        #15

                        thoru wrote:

                        Roger, believe me or not, your post actually helped me, so it wasn't a complete loss of a post.

                        I'm glad that it helped you in some strange way. However, right now I feel like I'm standing in the town square with my pants down... :-O Like Al Pacino says in the movie "Donnie Brasco": forget about it.....

                        "It's supposed to be hard, otherwise anybody could do it!" - selfquote
                        "High speed never compensates for wrong direction!" - unknown

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups