Hello,

I am developing and maintaining a Windows 2000 driver.
In order to keep my development environment and tools up to date, I just
switched from Win 2003 Server DDK to Win 2003 Server DDK SP1.

Since this change, when I want to rebuild my Windows 2000 driver (using W2K
inc and libs of the DDK), I get the following error :

wdm.lib(NTOSKRNL.EXE) : error LNK2026: module unsafe for SAFESEH image

Does anyone experienced the same?
Can someone tell me the way to get out of this problem?

Thanks,

Olivier

Re: Linker error LNK2026 by Eliyas

Eliyas
Thu Mar 09 16:50:10 CST 2006

Open your build log file and see if /safeseh link option is set. My guess
is that you are getting this link error because of that. When I build in the
win2k build environment of SP1, I don't see this option set.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vclrfsafesehimagehassafeexceptionhandlers.asp

--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.
http://www.microsoft.com/whdc/driver/kernel/KB-drv.mspx



Re: Linker error LNK2026 by o

o
Fri Mar 10 01:07:26 CST 2006

Yes I knew it was from the /safeseh linker option, but I do not see it set in
the build log.
Do you know if it could be implicitely set when setting another linker option?

Thanks,

Olivier

"Eliyas Yakub [MSFT]" wrote:

> Open your build log file and see if /safeseh link option is set. My guess
> is that you are getting this link error because of that. When I build in the
> win2k build environment of SP1, I don't see this option set.
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vclrfsafesehimagehassafeexceptionhandlers.asp
>
> --
> -Eliyas
> This posting is provided "AS IS" with no warranties, and confers no rights.
> http://www.microsoft.com/whdc/driver/kernel/KB-drv.mspx
>
>
>

Re: Linker error LNK2026 by Jeff

Jeff
Fri Mar 10 06:39:11 CST 2006

"Olivier Antoine" <o.antoine@discussions.microsoft.com> wrote in message
news:6FB1A7B9-F1F3-4E70-A1AA-7267CA92C334@microsoft.com...
> Hello,
>
> I am developing and maintaining a Windows 2000 driver.
> In order to keep my development environment and tools up to date, I just
> switched from Win 2003 Server DDK to Win 2003 Server DDK SP1.
>
> Since this change, when I want to rebuild my Windows 2000 driver (using
> W2K
> inc and libs of the DDK), I get the following error :
>
> wdm.lib(NTOSKRNL.EXE) : error LNK2026: module unsafe for SAFESEH image
>
> Does anyone experienced the same?
> Can someone tell me the way to get out of this problem?

Probably the easiest way is to set NO_SAFESEH = 1 in your sources file.
That'll turn off the safeseh check.