473,387 Members | 3,684 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

ManagedC++ and [System::Security::SuppressUnmanagedCodeSecurityAtt ribute] and stack walk

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::SuppressUnmanagedCodeSecurityAtt ribute]
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?
Jul 26 '06 #1
2 1444
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@ldwrote in message
news:eS*************@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::SuppressUnmanagedCodeSecurityAtt ribute]
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?


Jul 26 '06 #2
ok.
thanks!

"G Himangi" <in**@ssware.comwrote in message
news:e9**************@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@ldwrote in message
news:eS*************@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::SuppressUnmanagedCodeSecurityAtt ribute]
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?



Jul 26 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mark Rodrigues | last post by:
Hi everyone, Today we hit a problem when we rolled a new web-site are were presented with a error on our page that looked like: Security Exception Description: The application attempted to...
0
by: James B | last post by:
OMA (Outlook Mobile Access) under Exchange is giving me a System.Security.SecurityException error. From what I gather this is a problem with the security level under which the OMA application is...
5
by: Ankit Aneja | last post by:
This is my problem. I am using Visual 2003, .Net framework 1.1 and the Application Block I configured the DAAB using the Enterprise Library Configuration now this is the error which is coming ...
2
by: Lloyd Dupont | last post by:
In C# I could remove security check on an C DLL call by tagging my function as follow: static extern void SomeMethod(); In Managed C++ I don't declare the function I just #include the...
4
by: stephen | last post by:
Hi, I am getting an error while trying to create an excel file. "Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the...
1
by: Eric Simmons | last post by:
Hello, I am trying to run a .NET 2.0 application that I developed and I am getting the following error: Key not valid for use in specified state I am attempting to retrieve the...
3
by: Mike | last post by:
Hi I have problem as folow: Caught Exception: System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Request for the permission of type...
4
by: confused1234 | last post by:
I get the error at the bottom of this post when i click on a linkbutton, javascript:__doPostBack('ctl00$Main$btnchangeemail','') The problem is intermitant, sometimes it works and sometimes...
5
by: Henry Stock | last post by:
I am trying to understand the following error: Any thing you can tell me about this is appreciated. Security Exception Description: The application attempted to perform an operation not allowed...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.