That's what i thought. Even spinning of the DLL call into another thread
will still crash the code right?
Threads won't/can't isolate the main managed code app from the unmanaged
code - Am i correct?
I'm trying to get printer status with winspool.drv.
Can winspool.drv be interopted for a Windows Forms application.
The WMI is not bringing back accurate info on status so....
I've got API declares but the API call is very unstable and crashes and
brings down the call app. Try catches just don't work.
Help!
Harry
"Tom Shelton" <to*@YOUKNOWTHEDRILLmtogden.com> wrote in message
news:Oc*************@TK2MSFTNGP12.phx.gbl...
In article <OA**************@TK2MSFTNGP10.phx.gbl>, Harry Simpson wrote: I've got a call within my .NET code to a function which uses an API call
to get printer settings. When there's an error in the API call code, it
crashes the .NET app. Try Catch doesn't prevent the crash - it's like
it crashes before the catch catches.....
Any ideas how to error handle this type of function so it doesn't crash
the application??
TIA
Harry
Examples? If the unmanaged code does something stupid that cause's the
application to crash - there isn't much you'll be able to do about it.
That's why it's called unmanaged code - the runtime has no control over
what it can/can't do.
--
Tom Shelton [MVP]