Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 C++ 托管(参考)类中有以下函数:
public static void Transform(Bitmap^ img);
我想从 C# 托管代码中调用它。我要做的是:
Bitmap image = new Bitmap(100, 100); MyClass.Transform(image);
这是正确的,还是我需要使用固定语句?如果是这样,那怎么办?
谢谢你。
您需要锁定位图的后备内存,如此处所示。