473,399 Members | 4,192 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,399 software developers and data experts.

SuppressUnmanagedCodeSecurity

I'm having trouble using the SuppressUnmanagedCodeSecurity attribute.

When I try to compile, I get an error saying that the namespace is not
known.

Any ideas please ?

--
Michael Tissington
http://www.oaklodge.com
http://www.tabtag.com
Dec 4 '05 #1
2 2135
Seems odd, Michael. The following compiles fine, so I'm guessing some
other problem exists.
using System.Security;

[SuppressUnmanagedCodeSecurity]
public class NativeMethods
{
// ...
}
--
Scott
http://www.OdeToCode.com/blogs/scott/

On Sat, 3 Dec 2005 22:08:15 -0800, "Michael Tissington"
<mt*********@newsgroups.nospam> wrote:
I'm having trouble using the SuppressUnmanagedCodeSecurity attribute.

When I try to compile, I get an error saying that the namespace is not
known.

Any ideas please ?


Dec 4 '05 #2
Hi Michael,

As for the "namespace not known..." error when you try using the
SuppressUnmanagedCodeSecurity Attribute , I think it may be caused by the
namespace of the SuppressUnmanagedCodeSecurity class is not imported in
your code file. Have you add the folloing line in your code file:

using System.Security;

or Imports System.Security for VB.NET

The SuppressUnmanagedCodeSecurity class is under the "System.Security
namespace" so we have to import the namspace if we don't specify the full
class name like:

System.Security.SuppressUnmanagedCodeSecurity

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| From: "Michael Tissington" <mt*********@newsgroups.nospam>
| Subject: SuppressUnmanagedCodeSecurity
| Date: Sat, 3 Dec 2005 22:08:15 -0800
| Lines: 13
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
| Message-ID: <e9**************@TK2MSFTNGP14.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 65.249.55.7
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:362561
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| I'm having trouble using the SuppressUnmanagedCodeSecurity attribute.
|
| When I try to compile, I get an error saying that the namespace is not
| known.
|
| Any ideas please ?
|
| --
| Michael Tissington
| http://www.oaklodge.com
| http://www.tabtag.com
|
|
|

Dec 5 '05 #3

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

Similar topics

2
by: Lloyd Dupont | last post by:
I'm not exactly sur in which context it is valid / usefull. For example will it suppres the stack in the following sample below when using the ScreenGraphics class? (i.e. I wonder if it will...
7
by: John.NET | last post by:
Hi, First please forgive that this is a repost as the first time I didn't have my proper nospam email configured... I'm writing a web service where one method will launch another .NET program...
4
by: Can | last post by:
From the MSN documentation; "By default, /CLRUNMANAGEDCODECHECK is in effect, which means SuppressUnmanagedCodeSecurityAttribute is applied to linker-generated PInvoke calls. Specify...
2
by: Jon Slaughter | last post by:
How difficult is it for one to integrate unmanaged C++ into C#? I know for functions one can use DLLimport but how does one go about doing it for classes? Do I have to completely reimplement the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
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
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
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.