Click here to Skip to main content
15,892,927 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Calculate checksum using ASLR Pin
Randor 9-Jun-12 5:28
professional Randor 9-Jun-12 5:28 
GeneralRe: Calculate checksum using ASLR Pin
Giggsey739-Jun-12 6:51
Giggsey739-Jun-12 6:51 
QuestionRe: Calculate checksum using ASLR Pin
Randor 9-Jun-12 7:04
professional Randor 9-Jun-12 7:04 
QuestionC++ Program without main() Pin
pix_programmer6-Jun-12 22:45
pix_programmer6-Jun-12 22:45 
AnswerRe: C++ Program without main() Pin
Richard MacCutchan6-Jun-12 23:22
mveRichard MacCutchan6-Jun-12 23:22 
GeneralRe: C++ Program without main() Pin
pix_programmer7-Jun-12 0:33
pix_programmer7-Jun-12 0:33 
GeneralRe: C++ Program without main() Pin
Richard MacCutchan7-Jun-12 4:53
mveRichard MacCutchan7-Jun-12 4:53 
AnswerRe: C++ Program without main() Pin
Aescleal7-Jun-12 0:12
Aescleal7-Jun-12 0:12 
In standard C++ it isn't possible.

As Richard mentioned you can specify an entry point for MSVC and other linkers allow you to do the same thing but you'll have a few hurdles to jump:

- The parameters to whatever function you define as the entry point will probably not be argc and argv
- Depending on the start-up code you're avoiding static and global objects may not be initialised (no great loss though)
- The language runtime library, even if linked, probably won't be initialised
- Anything that relies on the OS interacting with the language might go screwy (e.g. if new/delete expects allocations to come out of a heap the runtime allocates on start-up)

About the only place I've used this trick, had it work and be useful was back programming for Windows 3.1 when I was trying to keep the size of code down to a minimum and I was willing to pay the price for having an emasculated language. Basically if you're happy programming in assembler and using the OS and your own code for everything then then it may have some use.
GeneralRe: C++ Program without main() Pin
Aescleal13-Jun-12 16:50
Aescleal13-Jun-12 16:50 
QuestionDump analysis Pin
HungryCPPDev6-Jun-12 21:22
HungryCPPDev6-Jun-12 21:22 
AnswerRe: Dump analysis Pin
«_Superman_»6-Jun-12 22:23
professional«_Superman_»6-Jun-12 22:23 
GeneralRe: Dump analysis Pin
HungryCPPDev11-Jun-12 20:23
HungryCPPDev11-Jun-12 20:23 
AnswerRe: Dump analysis Pin
Erudite_Eric6-Jun-12 22:32
Erudite_Eric6-Jun-12 22:32 
QuestionWhat's problem of my code?( create a random maze) Pin
jiuyejii6-Jun-12 0:45
jiuyejii6-Jun-12 0:45 
AnswerRe: What's problem of my code?( create a random maze) Pin
Chris Losinger6-Jun-12 1:14
professionalChris Losinger6-Jun-12 1:14 
GeneralRe: What's problem of my code?( create a random maze) Pin
jiuyejii6-Jun-12 1:36
jiuyejii6-Jun-12 1:36 
SuggestionRe: What's problem of my code?( create a random maze) Pin
David Crow6-Jun-12 2:36
David Crow6-Jun-12 2:36 
AnswerRe: What's problem of my code?( create a random maze) Pin
Maximilien6-Jun-12 2:46
Maximilien6-Jun-12 2:46 
AnswerRe: What's problem of my code?( create a random maze) Pin
Aescleal6-Jun-12 6:47
Aescleal6-Jun-12 6:47 
GeneralRe: What's problem of my code?( create a random maze) Pin
Peter_in_27806-Jun-12 17:37
professionalPeter_in_27806-Jun-12 17:37 
GeneralRe: What's problem of my code?( create a random maze) Pin
jiuyejii6-Jun-12 18:49
jiuyejii6-Jun-12 18:49 
GeneralRe: What's problem of my code?( create a random maze) Pin
Aescleal6-Jun-12 23:52
Aescleal6-Jun-12 23:52 
AnswerRe: What's problem of my code?( create a random maze) Pin
Stefan_Lang8-Jun-12 4:19
Stefan_Lang8-Jun-12 4:19 
GeneralRe: What's problem of my code?( create a random maze) Pin
jiuyejii8-Jun-12 17:57
jiuyejii8-Jun-12 17:57 
QuestionMFC application being compiled on VS2012 Pin
YaronNir5-Jun-12 23:03
YaronNir5-Jun-12 23:03 

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.