NativeMethods versus SafeNativeMethods versus UnsafeNativeMethods? (reflector)

K

kilik3000

I've been using reflector to look into some of the core MS .NET
assemblies. I have noticed this pattern in the naming of classes that
wrap p-Invoked Win32 api functions.

I like this pattern.

I'm just curious why are some API functions considered "Safe" and
others "Unsafe"?

Shouldn't any call into unmanaged code be considered "unsafe"?

-Thx
 

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