0

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

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.