except_handler3

Hello,

I currently have a windows driver I compile for that runs on windows
2000, xp, xp ia64, 2003, 2003 ia64, and 2003 amd64. I use the windows
2003 ddk in win2k mode to do this (w2k3 for 64bit). I have been asked
what it would take to run on NT 4.0. Running depends, the biggest
problem I see is __except_handler3 is not exported. This ddk doesn’t
support NT 4.0 and I would like to keep 1 binary (though that isn’t set
in stone). All the other functions I can stub (IoIsWdmVersionAvailable)
or not call (PoCallDriver) at runtime, but I am not sure what to do with
this function. I think a possible solution would be to stub it and then
call __except_handler2, however I am not sure of side effects.

Any one have any ideas on how to attack this (including saying “do it
right, use the nt4ddk”)? I would like nt 4.0 x86 and nt 4.0 Dec Alpha,
but the Alpha support is optional.

Thanks,

Rob

Search thru the newsgroups for a solution to the __except_handler3 for NT.
The biggest problem is that the AddDevice() will not be called, but only
DriverEntry() where all device objects and symbolic links must be created.
You may have to use the old 2000 DDK to support NT4, but I wouldn’t try to
support anything except SP6a with NT4. Walter Oney’s WDM 2nd Edition book
has some good stuff about stubs and handling unsupported functions, if you
need any ideas.

HTML in newsgroups is bad. Makes digests and searching harder.

“Rob Green” wrote in message news:xxxxx@ntdev…
Hello,
I currently have a windows driver I compile for that runs on windows
2000, xp, xp ia64, 2003, 2003 ia64, and 2003 amd64. I use the windows 2003
ddk in win2k mode to do this (w2k3 for 64bit). I have been asked what it
would take to run on NT 4.0. Running depends, the biggest problem I see is
__except_handler3 is not exported. This ddk doesn’t support NT 4.0 and I
would like to keep 1 binary (though that isn’t set in stone). All the other
functions I can stub (IoIsWdmVersionAvailable) or not call (PoCallDriver) at
runtime, but I am not sure what to do with this function. I think a
possible solution would be to stub it and then call__except_handler2,
however I am not sure of side effects.

Any one have any ideas on how to attack this (including saying “do it right,
use the nt4ddk”)? I would like nt 4.0 x86 and nt 4.0 Dec Alpha, but the
Alpha support is optional.

Thanks,
Rob

I think that the single binary approach is simply too risky and
complicated and that the simpler approach is to have a separate nt4
binary. You can organize the source code so into platform independent and
platform dependent modules to reduce the maintenance issues. Why is
distribution of one binary image so important?

===========================
Mark Roddy
Consultant, Microsoft DDK MVP
Hollis Technology Solutions
xxxxx@hollistech.com
www.hollistech.com
603-321-1032

-----Original Message-----
From: “David J. Craig”
To: “Windows System Software Devs Interest List”
Date: Sat, 13 Sep 2003 01:47:37 -0400
Subject: [ntdev] Re: except_handler3

> Search thru the newsgroups for a solution to the __except_handler3 for
> NT.
> The biggest problem is that the AddDevice() will not be called, but
> only
> DriverEntry() where all device objects and symbolic links must be
> created.
> You may have to use the old 2000 DDK to support NT4, but I wouldn’t try
> to
> support anything except SP6a with NT4. Walter Oney’s WDM 2nd Edition
> book
> has some good stuff about stubs and handling unsupported functions, if
> you
> need any ideas.
>
> HTML in newsgroups is bad. Makes digests and searching harder.
>
>
> “Rob Green” wrote in message news:xxxxx@ntdev…
> Hello,
> I currently have a windows driver I compile for that runs on windows
> 2000, xp, xp ia64, 2003, 2003 ia64, and 2003 amd64. I use the windows
> 2003
> ddk in win2k mode to do this (w2k3 for 64bit). I have been asked what
> it
> would take to run on NT 4.0. Running depends, the biggest problem I
> see is
>__except_handler3 is not exported. This ddk doesn’t support NT 4.0 and
> I
> would like to keep 1 binary (though that isn’t set in stone). All the
> other
> functions I can stub (IoIsWdmVersionAvailable) or not call
> (PoCallDriver) at
> runtime, but I am not sure what to do with this function. I think a
> possible solution would be to stub it and then call __except_handler2,
> however I am not sure of side effects.
>
> Any one have any ideas on how to attack this (including saying “do it
> right,
> use the nt4ddk”)? I would like nt 4.0 x86 and nt 4.0 Dec Alpha, but
> the
> Alpha support is optional.
>
> Thanks,
> Rob
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@hollistech.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

FWIW, we (Unisys) work *really* hard at having a common HAL for all of our
hardware platforms. But even though it is a common HAL and common source,
we have a separate Razzle environment for every OS that we release against,
and we build new versions of the HAL and related drivers using the
appropriate build environment for the OS in question.

Which means we have to do 4-5 sets of builds and build appropriate release
media for any change that we make. But this turned out to be a lot more
reliable than trying to build HALs for various versions off a single build
environment.

Loren

http://support.microsoft.com/default.aspx?scid=kb;en-us;316315

--

-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.

"Rob Green" wrote in message news:xxxxx@ntdev...
Hello,

I currently have a windows driver I compile for that runs on windows 2000, xp, xp ia64, 2003, 2003 ia64, and 2003 amd64. I use the windows 2003 ddk in win2k mode to do this (w2k3 for 64bit). I have been asked what it would take to run on NT 4.0. Running depends, the biggest problem I see is __except_handler3 is not exported. This ddk doesn't support NT 4.0 and I would like to keep 1 binary (though that isn't set in stone). All the other functions I can stub (IoIsWdmVersionAvailable) or not call (PoCallDriver) at runtime, but I am not sure what to do with this function. I think a possible solution would be to stub it and then call__except_handler2, however I am not sure of side effects.

Any one have any ideas on how to attack this (including saying "do it right, use the nt4ddk")? I would like nt 4.0 x86 and nt 4.0 Dec Alpha, but the Alpha support is optional.

Thanks,

Rob