I wasn't sure where I should post this since I am not working with managed code per say. If it's in the wrong forum, please move it.

Basically, I have to create several classes and methods for a program I am releasing. What I would like to do is have a set of classes and methods I can compile as a DLL (so it's compiled and it's not as easy to disassemble as .Net. Plus I need speed) and I can reference it from within .Net applications as well as standard C++ applications.

What's the best way to approach this?

EDIT: I don't have much experience creating libraries. Could I create a static library, then make a managed C++ DLL and reference the library so that my code is compiled except for the .Net calls? I'm not sure how to do this.