InitializeCriticalSection throws ... something ?
-
In the MSDN-documentation for the InitializeCriticalSection-function it says :
In low memory situations, InitializeCriticalSection can raise a STATUS_NO_MEMORY exception.
Now, what exactly do i have to catch here ?! Couldn't find any hint anywhere.
-
In the MSDN-documentation for the InitializeCriticalSection-function it says :
In low memory situations, InitializeCriticalSection can raise a STATUS_NO_MEMORY exception.
Now, what exactly do i have to catch here ?! Couldn't find any hint anywhere.
Mr.Brainley wrote:
Now, what exactly do i have to catch here ?!
There's nothing to catch.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
Mr.Brainley wrote:
Now, what exactly do i have to catch here ?!
There's nothing to catch.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
Ok, rephrasing the question : What should i do ? Current strategy : nothing. But what exactly happens in such a low memory situation ? Does it crash the program ?
-
Ok, rephrasing the question : What should i do ? Current strategy : nothing. But what exactly happens in such a low memory situation ? Does it crash the program ?
Mr.Brainley wrote:
What should i do ?
Based on what I read, nothing (can be done).
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
Mr.Brainley wrote:
What should i do ?
Based on what I read, nothing (can be done).
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
In the MSDN-documentation for the InitializeCriticalSection-function it says :
In low memory situations, InitializeCriticalSection can raise a STATUS_NO_MEMORY exception.
Now, what exactly do i have to catch here ?! Couldn't find any hint anywhere.
Just a guess... __try { ::InitializeCriticalSection(...); } __except (GetExceptionCode() == STATUS_NO_MEMORY ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) { ...STATUS_NO_MEMORY exception }
-
DavidCrow wrote:
nothing (can be done).
you mean besides stopping an unhandled exception from closing your app?
led mike
led mike wrote:
you mean besides stopping an unhandled exception from closing your app?
Since the exception is not raised in an exception-safe manner, I'm not sure. Don't try and catch it is the only thing I know to do.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb