Home All Groups Group Topic Archive Search About

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

Author
26 Jul 2006 12:57 AM
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?

Author
26 Jul 2006 11:28 AM
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
---------



Show quote
"Lloyd Dupont" <net.galador@ld> wrote in message
news:eSEWl4EsGHA.952@TK2MSFTNGP02.phx.gbl...
>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?
>
>
Author
26 Jul 2006 12:15 PM
Lloyd Dupont
ok.
thanks!

Show quote
"G Himangi" <i***@ssware.com> wrote in message
news:e9z$haKsGHA.5044@TK2MSFTNGP05.phx.gbl...
>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" <net.galador@ld> wrote in message
> news:eSEWl4EsGHA.952@TK2MSFTNGP02.phx.gbl...
>>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?
>>
>>
>
>

AddThis Social Bookmark Button