There are 3 ways I can think of: P/Invoke, C++/CLI wrapper and COM wrapper. My impression is that C++/CLI wrapper perform much better than P/Invoke but the it's a pain on the ass to write especially for beginners. If you know COM well, this is another way to go.
【在 k***r 的大作中提到】 : P/Invoke?
P*e
5 楼
__declspec( dllimport ) 这种算com 还是c++/cli wrapper
wrapper.
【在 s******n 的大作中提到】 : There are 3 ways I can think of: P/Invoke, C++/CLI wrapper and COM wrapper. : My impression is that C++/CLI wrapper perform much better than P/Invoke : but the it's a pain on the ass to write especially for beginners. : If you know COM well, this is another way to go.
s*n
6 楼
Not quite understand your question... I was talking aout calling into unmanaged(native) dlls from managed applications (.NET). I believe __ declspec( dllimport ) is a native C++ only attribute.