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. Use something other than WinMain as entry point

Use something other than WinMain as entry point

Scheduled Pinned Locked Moved C / C++ / MFC
question
4 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.
  • P Offline
    P Offline
    Paul Farry
    wrote on last edited by
    #1

    How does one make another function the actual entry point into a Win32 app? I've seen it on Codewarrior on the Macintosh that you specify what function is your entry point.. How do you do it in VC 6?

    B 1 Reply Last reply
    0
    • P Paul Farry

      How does one make another function the actual entry point into a Win32 app? I've seen it on Codewarrior on the Macintosh that you specify what function is your entry point.. How do you do it in VC 6?

      B Offline
      B Offline
      Baris Kurtlutepe
      wrote on last edited by
      #2

      Select Project/Settings, go to the Link tab, select Category: Output and there you should see the "Entry-point symbol" editbox. From there you can change the entry-point of your application, which when left empty defaults to "WinMain" for win32 applications and "main" for console applications.

      V 1 Reply Last reply
      0
      • B Baris Kurtlutepe

        Select Project/Settings, go to the Link tab, select Category: Output and there you should see the "Entry-point symbol" editbox. From there you can change the entry-point of your application, which when left empty defaults to "WinMain" for win32 applications and "main" for console applications.

        V Offline
        V Offline
        Vikram A Punathambekar
        wrote on last edited by
        #3

        Yes, you can do that. But just out of curiosity, would it be a standard program then? I mean, doesn't the standard specify that main() should be the starting point? In fact, Turbo C++ X| X| X| has a pragma option called startup that will let you start from another function, but after that, main() will be called.
        Vikram. ----------------------------- My site due for a massive update 1. Don't ask unnecessary questions. You know what I mean? 2. Avoid redundancy at all costs. 3. Avoid redundancy at all costs. "Do not give redundant error messages again and again." - A classmate of mine, while giving a class talk on error detection in compiler design.

        B 1 Reply Last reply
        0
        • V Vikram A Punathambekar

          Yes, you can do that. But just out of curiosity, would it be a standard program then? I mean, doesn't the standard specify that main() should be the starting point? In fact, Turbo C++ X| X| X| has a pragma option called startup that will let you start from another function, but after that, main() will be called.
          Vikram. ----------------------------- My site due for a massive update 1. Don't ask unnecessary questions. You know what I mean? 2. Avoid redundancy at all costs. 3. Avoid redundancy at all costs. "Do not give redundant error messages again and again." - A classmate of mine, while giving a class talk on error detection in compiler design.

          B Offline
          B Offline
          Baris Kurtlutepe
          wrote on last edited by
          #4

          I don't see any use in changing the entry point neither, except wWinMain and wmain of course. Anyway it's just a function and called only once (as long as you're not recursing :~ in main) I guess people have different tastes and different ways to obfuscate their code. You never know ;P

          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