![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | /clr:safe Hi I am doing a C++/CLI dll that is supposed to be fully managed code. I was wondering what exactly is the criteria for the DLL to be 100% fully managed and usuable from C#? Do I need to compile using / clr:safe or is /clr enough? The reason I need to know this is that I would like to use pin_ptr<> for some type conversions i.e. bytes to say decimal but /clr:safe doesn't allow me to do much with that pointer. tia ajk |
My System Specs![]() |
| | #2 (permalink) |
| | Re: /clr:safe ajk wrote: Quote: > I am doing a C++/CLI dll that is supposed to be fully managed code. I > was wondering what exactly is the criteria for the DLL to be 100% > fully managed and usuable from C#? not have to be managed at all. Quote: > Do I need to compile using / clr:safe or is /clr enough? wrapping (as unmanaged code would require). Your public interface should be restricted to managed types, manipulating only managed types. What you do internally is then of no concern to the outside world. Quote: > The reason I need to know this is that I would like to use pin_ptr<> > for some type conversions i.e. bytes to say decimal but /clr:safe > doesn't allow me to do much with that pointer. > assembly containing only managed code. There are speed and safety benefits to this, but it is by no means a requirement to be able to use the code from other managed assemblies. In fact, there's really not much point to writing pure managed code in C++/CLI unless you happen to really like C++: the strength of C++/CLI is exactly that it can mix managed and unmanaged constructs and thus glue the two worlds together. If you want pure managed code, you might as well use C#. -- J. http://symbolsprose.blogspot.com |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| 100% Safe ??? | Vista account administration | |||
| Is it safe...now? | Sound & Audio | |||
| How safe am I? | Vista General | |||
| Is it safe? | Vista General | |||
| Is It Safe? | Vista installation & setup | |||