views:

278

answers:

2

I have the following function in C++ managed (ref) class:

public static void Transform(Bitmap^ img);

I want to call it from C# managed code. What I do is this:

Bitmap image = new Bitmap(100, 100);
MyClass.Transform(image);

Is this correct, or do I need to use fixed statement? If so, then how?

Thank you.

+1  A: 

You need to lock the bitmap's backing memory as shown here.

Eric J.
+1  A: 

see here

ArsenMkrt