R
Roger Orr
Hi,
I'm trying to write my own 'safe' exception handler for Microsoft
Visual Studio .NET 2003.
1) It seems that you cannot mark a C++ function as a safe exception
handler.
2) I can't get the .SAFESEH directive to work with ml.
Has anyone tried and succeeded with the /safeseh option and .SAFESEH
directive with ML?
I've stripped my code to the barest minimum, and assembling
'testit.asm' like this:
ml /safeseh /c testit.asm libc.lib /link /dll
I am getting this linker error:
testit.obj : fatal error LNK1279: invalid or corrupt file: file
contains
invalid .sxdata contributions.
The code looks like this:
--------------- testit.asm ---------------
title testit - test safeseh
.586
..model FLAT
testit SEGMENT
fred PROC PUBLIC
push ebp
pop ebp
ret
fred ENDP
..SAFESEH fred
testit ENDS
END
--------------- testit.asm ---------------
Any help, anyone?
Roger Orr
I'm trying to write my own 'safe' exception handler for Microsoft
Visual Studio .NET 2003.
1) It seems that you cannot mark a C++ function as a safe exception
handler.
2) I can't get the .SAFESEH directive to work with ml.
Has anyone tried and succeeded with the /safeseh option and .SAFESEH
directive with ML?
I've stripped my code to the barest minimum, and assembling
'testit.asm' like this:
ml /safeseh /c testit.asm libc.lib /link /dll
I am getting this linker error:
testit.obj : fatal error LNK1279: invalid or corrupt file: file
contains
invalid .sxdata contributions.
The code looks like this:
--------------- testit.asm ---------------
title testit - test safeseh
.586
..model FLAT
testit SEGMENT
fred PROC PUBLIC
push ebp
pop ebp
ret
fred ENDP
..SAFESEH fred
testit ENDS
END
--------------- testit.asm ---------------
Any help, anyone?
Roger Orr