By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,696 Members | 1,512 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,696 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
"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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.