In unsafe code, an object must be pinned before it can be referred to by an unmanaged pointer.
在不安全代码中,必须先将对象固定,然后非托管指针才可引用该对象。
Unmanaged APIs that take functions Pointers as arguments can be called from managed code with a managed delegate in place of the native function pointer.
可以使用托管委托取代本机函数指针来从托管代码中调用以函数指针作为参数的非托管api。
The unmanaged structure is declared as a class, instead of as a managed structure, to show how a class can be used when the unmanaged function expects a pointer to a structure.
非托管结构被声明为类而不是托管结构,以显示当非托管函数需要一个指向结构的指针时可以如何使用类。
应用推荐