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. What is the difference between __cdecl and __stdcall

What is the difference between __cdecl and __stdcall

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
3 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.
  • K Offline
    K Offline
    Kotesh N
    wrote on last edited by
    #1

    hi, I want to know what is the main what is the difference between __cdecl and __stdcall ? Can any one help regarding this. Regards, Chinna

    M E 2 Replies Last reply
    0
    • K Kotesh N

      hi, I want to know what is the main what is the difference between __cdecl and __stdcall ? Can any one help regarding this. Regards, Chinna

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      Inside Calling Conventions[^] Calling Conventions Demystified[^] x86 calling conventions[^]

      --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ Ford, what's this fish doing in my ear?

      1 Reply Last reply
      0
      • K Kotesh N

        hi, I want to know what is the main what is the difference between __cdecl and __stdcall ? Can any one help regarding this. Regards, Chinna

        E Offline
        E Offline
        Eytukan
        wrote on last edited by
        #3

        A point for you from the direction Mike just pointed you, So if you are using a function which is called twenty times, the cleanup code will be placed only once in the function called, if __stdcall is used. But if __cdecl is used, it will be twenty times in the code, i.e., everywhere in main after function is called, and if we have say fifty functions in a file each of which is called twenty times, then the size of the EXE in CDecl will be large. But then what is the advantage of __cdecl... that's something that only C has and not even C++.


        Dario: How is "directory" in French? (I mean a file system directory). John Simmons: "zee file holdaire thingie"

        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