473,397 Members | 2,033 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,397 software developers and data experts.

ManagedC++ security: How to avoid the stack walk?

In C# I could remove security check on an C DLL call by tagging my function
as follow:
[System::Security::SuppressUnmanagedCodeSecurityAtt ribute]
[DllImport("SomeDll.dll")]
static extern void SomeMethod();

In Managed C++ I don't declare the function I just #include the headers.

How could I avoid security stack walk?
Jul 26 '06 #1
2 1701
"Lloyd Dupont" <net.galador@ldwrote in message
news:uW**************@TK2MSFTNGP05.phx.gbl...
In C# I could remove security check on an C DLL call by tagging my
function as follow:
[System::Security::SuppressUnmanagedCodeSecurityAtt ribute]
[DllImport("SomeDll.dll")]
static extern void SomeMethod();

In Managed C++ I don't declare the function I just #include the headers.

How could I avoid security stack walk?
I would assume that you would apply it to the managed function that's
calling the native function. Attributes can't really be attached to native
functions - the C# declaration really attaches the attribute to the P/Invoke
thunk that's automatically generated and not to the native function itself.

-cd
Jul 26 '06 #2
Thanks Daniel!

Mmh.. it looks like I'm stuck in a wall...
Anyway.....

--
Regards,
Lloyd Dupont

NovaMind development team
NovaMind Software
Mind Mapping Software
<www.nova-mind.com>
"Carl Daniel [VC++ MVP]" <cp*****************************@mvps.org.nospam >
wrote in message news:OS**************@TK2MSFTNGP03.phx.gbl...
"Lloyd Dupont" <net.galador@ldwrote in message
news:uW**************@TK2MSFTNGP05.phx.gbl...
>In C# I could remove security check on an C DLL call by tagging my
function as follow:
[System::Security::SuppressUnmanagedCodeSecurityAtt ribute]
[DllImport("SomeDll.dll")]
static extern void SomeMethod();

In Managed C++ I don't declare the function I just #include the headers.

How could I avoid security stack walk?

I would assume that you would apply it to the managed function that's
calling the native function. Attributes can't really be attached to
native functions - the C# declaration really attaches the attribute to the
P/Invoke thunk that's automatically generated and not to the native
function itself.

-cd


Jul 26 '06 #3

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

Similar topics

15
by: Andrew | last post by:
Last night I was reading about implementing my own stack. The example given pushes items on and off the stack at the start and end of each procedure (ie. in a std module). What's not so clear is...
6
by: Olaf Baeyens | last post by:
Can someone out there point me to a URL or other reference how to use these security stuff in .NET? I know everything can be found online on the msdn but since I am new to this security stuff, I...
9
by: Thom Little | last post by:
I seem to (once again) be missing something pretty basic. I am running under Windows XP Professional Service Pack 1 with all Hotfixes installed and Visual Studio .NET 2003 in Debug mode. The...
1
by: Jason Coyne | last post by:
I am trying to use the StackTrace class to get my current stack trace for some logging. Everything is working fine, except when I am using threading (specifically WaitCallBack and...
3
by: James Radke | last post by:
Hello, I have an asp.net application (using vb.net codebehind), that is calling some older c++ dlls. These dlls require the use of the c++ Runtime which is in the windows/System32 directories. ...
16
by: Marina | last post by:
Hi, I am trying to find the minimum security settings to allow a windows control embedded in IE have full trust. If I give the entire Intranet zone full trust, this works. However, this is...
19
by: Diego F. | last post by:
I think I'll never come across that error. It happens when running code from a DLL that tries to write to disk. I added permissions in the project folder, the wwwroot and in IIS to NETWORK_SERVICE...
2
by: Lloyd Dupont | last post by:
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: extern static void...
4
by: Joe Ardent | last post by:
Good day, everybody! From what I can tell from the archives, this is everyone's favorite method from the standard lib, and everyone loves answering questions about it. Right? :) Anyway, my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.