Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #89532

Re: Functions and Global Variables defined in Libraries

From "Alf P. Steinbach" <alf.p.steinbach@gmail.com>
Newsgroups comp.lang.c++
Subject Re: Functions and Global Variables defined in Libraries
Date 2023-03-08 18:17 +0100
Organization A noiseless patient Spider
Message-ID <tuafvn$10ei5$2@dont-email.me> (permalink)
References <018b2deb-f52f-4c26-8505-17a836dbe473n@googlegroups.com> <07adcaef-e974-4eae-b421-792377d5fb83n@googlegroups.com> <0fcdee44-67ea-4055-a2c7-ed2f812946b5n@googlegroups.com>

Show all headers | View raw


On 2023-03-08 5:34 PM, Frederick Virchanza Gotham wrote:
> 
> [snip]
>  differentiate between GUI mode and console mode depending upon the value of 'argc':
> 
> [snip]
> So the part of the Linux operating system that loads executable files
> is not even going into the entry point for my program
So, you were not talking about Windows' console and GUI subsystems, but 
about general application behavior.

Still the solution with two separate executables, perhaps with one 
invoking the other, seems very much preferable to mucking about with 
entry points and whatever, except if you're doing that for the joy of 
hacking?

I believe in Linux the average user will have no problem relating to 
separate executables.

---

In Windows you can check the executable's subsystem by inspecting the 
bytes of the loaded image of the executable.

The start address of that image is available from `GetModuleHandle(0)`.

Happy hacking! :)

- Alf

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Functions and Global Variables defined in Libraries Frederick Virchanza Gotham <cauldwell.thomas@gmail.com> - 2023-03-07 03:49 -0800
  Re: Functions and Global Variables defined in Libraries Öö Tiib <ootiib@hot.ee> - 2023-03-07 04:46 -0800
    Re: Functions and Global Variables defined in Libraries Frederick Virchanza Gotham <cauldwell.thomas@gmail.com> - 2023-03-08 08:34 -0800
      Re: Functions and Global Variables defined in Libraries "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-03-08 18:17 +0100
        Re: Functions and Global Variables defined in Libraries Frederick Virchanza Gotham <cauldwell.thomas@gmail.com> - 2023-03-08 14:46 -0800
          Re: Functions and Global Variables defined in Libraries Frederick Virchanza Gotham <cauldwell.thomas@gmail.com> - 2023-03-09 03:18 -0800

csiph-web