need to allow unsafe code, but don't have a build properties page

G

Guest

I'm using a C++ dll and need to allow unsafe code because the dll function takes char *. I am using Visual Studio.NET 2002. Everything I've seen says to go to the project properties page, then the build properties page and allow it there. For some reason, my project does not have a build properties page, only a configuration properties page. Can I add a build properties page somehow?

Is this because I am not using the command line compiler? Or because my project is an ASP.NET Web Application and they for some reason don't allow this here?

This is supposed to be soooo easy and it's holding me up big time. Any help would be very appreciated.

lesterZ
 
N

Nicholas Paldino [.NET/C# MVP]

lesterZ,

If the C++ dll exports classes, then you won't be able to access them
through .NET. You will have to create a managed wrapper for the C++ classes
using Managed Extensions in C++, or you will have to expose the C++ classes
through COM, and then use COM interop to access the components.

As for your configuration properties, just right click on the project
file, and select "properties" and it should come up. Make sure you are not
right clicking on the solution.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

lester said:
I'm using a C++ dll and need to allow unsafe code because the dll function
takes char *. I am using Visual Studio.NET 2002. Everything I've seen says
to go to the project properties page, then the build properties page and
allow it there. For some reason, my project does not have a build
properties page, only a configuration properties page. Can I add a build
properties page somehow?
Is this because I am not using the command line compiler? Or because my
project is an ASP.NET Web Application and they for some reason don't allow
this here?
This is supposed to be soooo easy and it's holding me up big time. Any
help would be very appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top