bitmaps and com interop
C#
1
Posts
1
Posters
0
Views
1
Watching
-
I am working in the compact framework. I have an ATL/COM library that creates a bitmap. I need to pass the bitmap to a C# program and display it. We have tried creating the bitmap in C# with GDI methods then used the APIs for CompatibleDCs, selectobject, getHdc, etc and passed the DC to the ATL object. On returning it from the ATL object I get ExceptionHandling errors relating to memory when I try to get a bitmap I can use in managed code. We have been able to pass the DeviceContext and draw directly on it but I want to retrieve a bitmap that I can cache as a member variable in my class. Has anyone successfully passed bitmaps back and forth between managed and unmanaged code?