Click here to Skip to main content
15,892,674 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Is main() a callback function? Pin
k505422-Jan-20 7:38
mvek505422-Jan-20 7:38 
GeneralRe: Is main() a callback function? Pin
Rick York22-Jan-20 8:12
mveRick York22-Jan-20 8:12 
GeneralRe: Is main() a callback function? Pin
PIEBALDconsult22-Jan-20 10:23
mvePIEBALDconsult22-Jan-20 10:23 
GeneralRe: Is main() a callback function? Pin
Richard MacCutchan22-Jan-20 5:24
mveRichard MacCutchan22-Jan-20 5:24 
GeneralRe: Is main() a callback function? Pin
OriginalGriff22-Jan-20 5:25
mveOriginalGriff22-Jan-20 5:25 
GeneralRe: Is main() a callback function? Pin
OriginalGriff22-Jan-20 5:24
mveOriginalGriff22-Jan-20 5:24 
GeneralRe: Is main() a callback function? Pin
Rob Philpott22-Jan-20 5:31
Rob Philpott22-Jan-20 5:31 
GeneralRe: Is main() a callback function? Pin
OriginalGriff22-Jan-20 5:42
mveOriginalGriff22-Jan-20 5:42 
The OS doesn't call your main method at all - there are three places it can start: the MZ Stub (which for Windows apps will just print "this program cannot be run in MSDOS mode" and quit the app), the NE or (for more modern apps) the PE: Portable Executable - Wikipedia[^].

And EXE files (even old MSDOS 16 bit apps) don't call main immediately anyway, they do allocation and static initialisation before they are ready to start running the code you wrote!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!

GeneralRe: Is main() a callback function? Pin
Rob Philpott22-Jan-20 6:12
Rob Philpott22-Jan-20 6:12 
GeneralRe: Is main() a callback function? Pin
Rick York22-Jan-20 14:20
mveRick York22-Jan-20 14:20 
GeneralRe: Is main() a callback function? Pin
DRHuff22-Jan-20 5:39
DRHuff22-Jan-20 5:39 
GeneralRe: Is main() a callback function? Pin
OriginalGriff22-Jan-20 5:43
mveOriginalGriff22-Jan-20 5:43 
GeneralRe: Is main() a callback function? Pin
DRHuff22-Jan-20 6:26
DRHuff22-Jan-20 6:26 
GeneralRe: Is main() a callback function? Pin
OriginalGriff22-Jan-20 8:06
mveOriginalGriff22-Jan-20 8:06 
GeneralRe: Is main() a callback function? Pin
DRHuff22-Jan-20 12:30
DRHuff22-Jan-20 12:30 
GeneralRe: Is main() a callback function? Pin
TheGreatAndPowerfulOz22-Jan-20 11:10
TheGreatAndPowerfulOz22-Jan-20 11:10 
GeneralRe: Is main() a callback function? Pin
PIEBALDconsult22-Jan-20 5:43
mvePIEBALDconsult22-Jan-20 5:43 
GeneralRe: Is main() a callback function? Pin
ZurdoDev22-Jan-20 5:52
professionalZurdoDev22-Jan-20 5:52 
GeneralRe: Is main() a callback function? Pin
Rob Philpott22-Jan-20 6:05
Rob Philpott22-Jan-20 6:05 
GeneralRe: Is main() a callback function? Pin
honey the codewitch22-Jan-20 7:06
mvahoney the codewitch22-Jan-20 7:06 
GeneralRe: Is main() a callback function? Pin
Gerry Schmitz22-Jan-20 7:06
mveGerry Schmitz22-Jan-20 7:06 
GeneralRe: Is main() a callback function? Pin
Gary Wheeler22-Jan-20 7:14
Gary Wheeler22-Jan-20 7:14 
GeneralRe: Is main() a callback function? Pin
Mark_Wallace22-Jan-20 7:22
Mark_Wallace22-Jan-20 7:22 
GeneralRe: Is main() a callback function? Pin
Stefan_Lang23-Jan-20 1:35
Stefan_Lang23-Jan-20 1:35 
GeneralRe: Is main() a callback function? Pin
Slow Eddie23-Jan-20 7:01
professionalSlow Eddie23-Jan-20 7:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.