C++ exceptions

Is there any way to use C++ exceptions in kernel mode?

Alexey Logachyov
xxxxx@vba.com.by
VirusBlokAda ltd.
http://www.vba.com.by


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Anyway? Sure just port the c++ exception handling runtime support into the
kernel. The code, or a reasonable facsimile thereof is probably found in the
rtl library source code shipped with the VisualStudio 6 complete
distribution. You might want to search this list and the newsgroups (google)
for the various discussions of this topic as it has been covered in
nauseating detail repeatedly. It ought to be in a FAQ somewhere.

Here was one thread in google that popped up:
http://groups.google.com/groups?hl=en&lr=lang_en&threadm=01bc5a6b%246bfe26f0
%245b227392%40glastonbury&rnum=1&prev=/groups%3Fq%3Dc%252B%252B%2Bexception%
2Bkernel%26hl%3Den%26lr%3Dlang_en%26selm%3D01bc5a6b%25246bfe26f0%25245b22739
2%2540glastonbury%26rnum%3D1

-----Original Message-----
From: Alexey Logachyov [mailto:xxxxx@vba.com.by]
Sent: Thursday, January 24, 2002 8:38 AM
To: NT Developers Interest List
Subject: [ntdev] C++ exceptions

Is there any way to use C++ exceptions in kernel mode?

Alexey Logachyov
xxxxx@vba.com.by
VirusBlokAda ltd.
http://www.vba.com.by


You are currently subscribed to ntdev as:
xxxxx@stratus.com To unsubscribe send a blank email to
leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Oh yes. Check Walter Oney’s book, and I believe there are a toolkits that
utilize C++.

Gary G. Little
Broadband Storage, Inc.
xxxxx@broadstor.com
xxxxx@inland.net

-----Original Message-----
From: Alexey Logachyov [mailto:xxxxx@vba.com.by]
Sent: Thursday, January 24, 2002 5:38 AM
To: NT Developers Interest List
Subject: [ntdev] C++ exceptions

Is there any way to use C++ exceptions in kernel mode?

Alexey Logachyov
xxxxx@vba.com.by
VirusBlokAda ltd.
http://www.vba.com.by


You are currently subscribed to ntdev as: xxxxx@broadstor.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

What’s wrong with the built-in and supported Structured Exception Handling?

Greg

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Gary Little
Sent: Thursday, January 24, 2002 10:02 AM
To: NT Developers Interest List
Subject: [ntdev] RE: C++ exceptions

Oh yes. Check Walter Oney’s book, and I believe there are a toolkits that
utilize C++.

Gary G. Little
Broadband Storage, Inc.
xxxxx@broadstor.com
xxxxx@inland.net

-----Original Message-----
From: Alexey Logachyov [mailto:xxxxx@vba.com.by]
Sent: Thursday, January 24, 2002 5:38 AM
To: NT Developers Interest List
Subject: [ntdev] C++ exceptions

Is there any way to use C++ exceptions in kernel mode?

Alexey Logachyov
xxxxx@vba.com.by
VirusBlokAda ltd.
http://www.vba.com.by


You are currently subscribed to ntdev as: xxxxx@broadstor.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@pdq.net
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

There are a couple of things that SEH doesn’t handle and I wish it would.
For example, I’d like to use “self unlocking” mutexes, when I aquire it in
the constructor and release in destructor. This way I don’t have to remember
to release it before every “return” instruction. This technics (and not only
for mutexes) makes my life much easier. Unfortunatelly, with SEH (unlike
regular C++ exc.) it’s not always guaranteed that my destructor will be
called.

Regards,

Vladimir

P.S. Whoever read this: was this message in HTML format?

-----Original Message-----
From: Gregory G. Dyess [mailto:xxxxx@pdq.net]
Sent: Thursday, January 24, 2002 8:07 AM
To: NT Developers Interest List
Subject: [ntdev] RE: C++ exceptions

What’s wrong with the built-in and supported Structured Exception Handling?

Greg

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Gary Little
Sent: Thursday, January 24, 2002 10:02 AM
To: NT Developers Interest List
Subject: [ntdev] RE: C++ exceptions

Oh yes. Check Walter Oney’s book, and I believe there are a toolkits that
utilize C++.

Gary G. Little
Broadband Storage, Inc.
xxxxx@broadstor.com
xxxxx@inland.net

-----Original Message-----
From: Alexey Logachyov [mailto:xxxxx@vba.com.by]
Sent: Thursday, January 24, 2002 5:38 AM
To: NT Developers Interest List
Subject: [ntdev] C++ exceptions

Is there any way to use C++ exceptions in kernel mode?

Alexey Logachyov
xxxxx@vba.com.by
VirusBlokAda ltd.
http://www.vba.com.by


You are currently subscribed to ntdev as: xxxxx@broadstor.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@pdq.net
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@Starbase.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

On Thu, 24 Jan 2002, Chtchetkine, Vladimir wrote:

There are a couple of things that SEH doesn’t handle and I wish it would.
For example, I’d like to use “self unlocking” mutexes, when I aquire it in
the constructor and release in destructor. This way I don’t have to remember
to release it before every “return” instruction. This technics (and not only
for mutexes) makes my life much easier. Unfortunatelly, with SEH (unlike
regular C++ exc.) it’s not always guaranteed that my destructor will be
called.
Isn’t __finally available to use? If it were, it could be used to tidy up
in exceptional exit situations.

Regards,

Vladimir

P.S. Whoever read this: was this message in HTML format?
It appears so.

-----Original Message-----
From: Gregory G. Dyess [mailto:xxxxx@pdq.net]
Sent: Thursday, January 24, 2002 8:07 AM
To: NT Developers Interest List
Subject: [ntdev] RE: C++ exceptions

What’s wrong with the built-in and supported Structured Exception Handling?

Greg

> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com]On Behalf Of Gary Little
> Sent: Thursday, January 24, 2002 10:02 AM
> To: NT Developers Interest List
> Subject: [ntdev] RE: C++ exceptions
>
>
> Oh yes. Check Walter Oney’s book, and I believe there are a toolkits that
> utilize C++.
>
> Gary G. Little
> Broadband Storage, Inc.
> xxxxx@broadstor.com
> xxxxx@inland.net
>
> -----Original Message-----
> From: Alexey Logachyov [mailto:xxxxx@vba.com.by]
> Sent: Thursday, January 24, 2002 5:38 AM
> To: NT Developers Interest List
> Subject: [ntdev] C++ exceptions
>
> Is there any way to use C++ exceptions in kernel mode?
>
> Alexey Logachyov
> xxxxx@vba.com.by
> VirusBlokAda ltd.
> http://www.vba.com.by
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@broadstor.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
> —
> You are currently subscribed to ntdev as: xxxxx@pdq.net
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@Starbase.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@inkvine.fluff.org
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


Peter xxxxx@inkvine.fluff.org
http://www.inkvine.fluff.org/~peter/

logic kicks ass:
(1) Horses have an even number of legs.
(2) They have two legs in back and fore legs in front.
(3) This makes a total of six legs, which certainly is an odd number of
legs for a horse.
(4) But the only number that is both odd and even is infinity.
(5) Therefore, horses must have an infinite number of legs.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Sure, __finally is available! But still you have to do the cleanup
explicitly, “by hands”.

Hmm, Outlook reports, that this message is formatted as a “Plain text”. Why
the heck it appears as HTML?

Regards,

Vladimir

-----Original Message-----
From: PeterB [mailto:xxxxx@inkvine.fluff.org]
Sent: Thursday, January 24, 2002 8:27 AM
To: NT Developers Interest List
Subject: [ntdev] RE: C++ exceptions

On Thu, 24 Jan 2002, Chtchetkine, Vladimir wrote:

There are a couple of things that SEH doesn’t handle and I wish it would.
For example, I’d like to use “self unlocking” mutexes, when I aquire it in
the constructor and release in destructor. This way I don’t have to
remember
to release it before every “return” instruction. This technics (and not
only
for mutexes) makes my life much easier. Unfortunatelly, with SEH (unlike
regular C++ exc.) it’s not always guaranteed that my destructor will be
called.
Isn’t __finally available to use? If it were, it could be used to tidy up
in exceptional exit situations.

Regards,

Vladimir

P.S. Whoever read this: was this message in HTML format?
It appears so.

-----Original Message-----
From: Gregory G. Dyess [mailto:xxxxx@pdq.net]
Sent: Thursday, January 24, 2002 8:07 AM
To: NT Developers Interest List
Subject: [ntdev] RE: C++ exceptions

What’s wrong with the built-in and supported Structured Exception
Handling?

Greg

> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com]On Behalf Of Gary Little
> Sent: Thursday, January 24, 2002 10:02 AM
> To: NT Developers Interest List
> Subject: [ntdev] RE: C++ exceptions
>
>
> Oh yes. Check Walter Oney’s book, and I believe there are a toolkits
that
> utilize C++.
>
> Gary G. Little
> Broadband Storage, Inc.
> xxxxx@broadstor.com
> xxxxx@inland.net
>
> -----Original Message-----
> From: Alexey Logachyov [mailto:xxxxx@vba.com.by]
> Sent: Thursday, January 24, 2002 5:38 AM
> To: NT Developers Interest List
> Subject: [ntdev] C++ exceptions
>
> Is there any way to use C++ exceptions in kernel mode?
>
> Alexey Logachyov
> xxxxx@vba.com.by
> VirusBlokAda ltd.
> http://www.vba.com.by
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@broadstor.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
> —
> You are currently subscribed to ntdev as: xxxxx@pdq.net
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@Starbase.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@inkvine.fluff.org
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


Peter xxxxx@inkvine.fluff.org
http://www.inkvine.fluff.org/~peter/

logic kicks ass:
(1) Horses have an even number of legs.
(2) They have two legs in back and fore legs in front.
(3) This makes a total of six legs, which certainly is an odd number of
legs for a horse.
(4) But the only number that is both odd and even is infinity.
(5) Therefore, horses must have an infinite number of legs.


You are currently subscribed to ntdev as: xxxxx@Starbase.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

>-----Original Message-----

From: Chtchetkine, Vladimir [mailto:xxxxx@Starbase.com]
Sent: Thursday, January 24, 2002 6:11 PM
To: NT Developers Interest List
Subject: [ntdev] RE: C++ exceptions


> P.S. Whoever read this: was this message in HTML format?

Yes, it was.

Regards,
Alex Krol


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com