ManagedC++ and [System::Security::SuppressUnmanagedCodeSecurityAttribute] and stack walk

L

Lloyd Dupont

I have a managed C++ API which calls extensively into native API.
I would like to remove the security walk above!!

in C# I could tag my declaration like that:

[System::Security::SuppressUnmanagedCodeSecurityAttribute]
extern static void SomeCFunction();

but in managed C++ I don't declare the function, I just import the header
and call the function.
how do I avoid stack walk?
 
G

G Himangi

I maybe wrong, but I think the VC++ compiler (at least 2002/2003)
automatically tags native calls with the
SuppressUnmanagedCodeSecurityAttribute.

You may check this using ILDasm.


---------
- G Himangi, Sky Software http://www.ssware.com
Shell MegaPack : Drop-In Explorer GUI Controls For Your Apps (.Net & ActiveX
Editions Available)
EZNamespaceExtensions.Net : Develop namespace extensions rapidly in .Net
EZShellExtensions.Net : Develop all shell extensions rapidly in .Net
 
L

Lloyd Dupont

ok.
thanks!

G Himangi said:
I maybe wrong, but I think the VC++ compiler (at least 2002/2003)
automatically tags native calls with the
SuppressUnmanagedCodeSecurityAttribute.

You may check this using ILDasm.


---------
- G Himangi, Sky Software http://www.ssware.com
Shell MegaPack : Drop-In Explorer GUI Controls For Your Apps (.Net &
ActiveX Editions Available)
EZNamespaceExtensions.Net : Develop namespace extensions rapidly in .Net
EZShellExtensions.Net : Develop all shell extensions rapidly in .Net
---------



Lloyd Dupont said:
I have a managed C++ API which calls extensively into native API.
I would like to remove the security walk above!!

in C# I could tag my declaration like that:

[System::Security::SuppressUnmanagedCodeSecurityAttribute]
extern static void SomeCFunction();

but in managed C++ I don't declare the function, I just import the header
and call the function.
how do I avoid stack walk?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top