Click here to Skip to main content
15,919,358 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Convert DWORD_PTR back to my object Pin
Michael Dunn13-Sep-07 10:03
sitebuilderMichael Dunn13-Sep-07 10:03 
GeneralRe: Convert DWORD_PTR back to my object Pin
paresh_joe13-Sep-07 17:22
paresh_joe13-Sep-07 17:22 
QuestionRe: Convert DWORD_PTR back to my object Pin
David Crow13-Sep-07 17:24
David Crow13-Sep-07 17:24 
AnswerRe: Convert DWORD_PTR back to my object Pin
carrivick13-Sep-07 19:29
carrivick13-Sep-07 19:29 
GeneralRe: Convert DWORD_PTR back to my object Pin
Michael Dunn13-Sep-07 22:13
sitebuilderMichael Dunn13-Sep-07 22:13 
AnswerRe: Convert DWORD_PTR back to my object Pin
paresh_joe13-Sep-07 19:41
paresh_joe13-Sep-07 19:41 
QuestionWindows XP Memory allocation questions Pin
Budric B.13-Sep-07 5:34
Budric B.13-Sep-07 5:34 
AnswerRe: Windows XP Memory allocation questions Pin
Mark Salsbery13-Sep-07 6:01
Mark Salsbery13-Sep-07 6:01 
Budric B. wrote:
To my surprise new operator does not return NULL on error. It seems to throw an exception. When did this happen?


I thought it was a lot longer ago, but according to the docs:

"In Visual C++ .NET 2002, the new function in the Standard C++ Library will support
the behavior specified in the C++ standard, which is to throw a std::bad_alloc exception
if the memory allocation fails.

In Visual C++ 2005, the C Runtime Library's new function will also throw a std::bad_alloc
exception if the memory allocation fails.

If you still want the non-throwing version of new for the C Runtime Library, link your program
with nothrownew.obj. However, when you link with nothrownew.obj, new in the Standard C++
Library will no longer function.
"


Budric B. wrote:
2. Is new a thread safe operator?


In the Multithread CRT, Yes.  Any third-party library, well...



Mark



Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

AnswerRe: Windows XP Memory allocation questions Pin
Waldermort13-Sep-07 6:16
Waldermort13-Sep-07 6:16 
AnswerRe: Windows XP Memory allocation questions Pin
Nemanja Trifunovic13-Sep-07 6:34
Nemanja Trifunovic13-Sep-07 6:34 
GeneralRe: Windows XP Memory allocation questions Pin
Budric B.13-Sep-07 7:41
Budric B.13-Sep-07 7:41 
QuestionDatabase Embedding Pin
perrin486913-Sep-07 5:12
perrin486913-Sep-07 5:12 
QuestionRe: Database Embedding Pin
Maximilien13-Sep-07 5:47
Maximilien13-Sep-07 5:47 
AnswerRe: Database Embedding Pin
perrin486913-Sep-07 7:02
perrin486913-Sep-07 7:02 
GeneralRe: Database Embedding [modified] Pin
Nemanja Trifunovic13-Sep-07 7:32
Nemanja Trifunovic13-Sep-07 7:32 
GeneralRe: Database Embedding Pin
perrin486913-Sep-07 8:41
perrin486913-Sep-07 8:41 
Questionget console cursot position Pin
baerten13-Sep-07 4:55
baerten13-Sep-07 4:55 
AnswerRe: get console cursot position Pin
jeron113-Sep-07 5:20
jeron113-Sep-07 5:20 
JokeRe: get console cursot position Pin
baerten13-Sep-07 21:14
baerten13-Sep-07 21:14 
GeneralRe: get console cursot position Pin
jeron114-Sep-07 4:21
jeron114-Sep-07 4:21 
Questionhide/disable MyComputer/drives Pin
H.R13-Sep-07 4:20
H.R13-Sep-07 4:20 
AnswerRe: hide/disable MyComputer/drives Pin
Abdellatif_El_Khlifi23-Sep-07 13:28
Abdellatif_El_Khlifi23-Sep-07 13:28 
QuestionGet file list on a folder Pin
est_dy13-Sep-07 3:33
est_dy13-Sep-07 3:33 
AnswerRe: Get file list on a folder Pin
David Crow13-Sep-07 3:37
David Crow13-Sep-07 3:37 
AnswerRe: Get file list on a folder Pin
nbugalia13-Sep-07 4:10
nbugalia13-Sep-07 4:10 

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.