Q&A

Q1:What does it mean when a data type is “blittable” or “non-blittable”?
A1: A blittable type is a managed data type that has a common layout in memory in managed and unmanaged environments. In contrast, a non-blittable type has a different representation in memory when it's managed than it does when it is unmanaged.
Q2:Some WIN32 API functions expect a pointer to a callback function. Can I create a callback function within my managed application?
A2: Yes, you can, although the process is slightly different from creating a regular callback. Create the callback definition with managed types and prefix that definition with the __delegate keyword. You can then pass an instance of that delegate function as the function pointer to the WIN32 API ...

Get Sams Teach Yourself Visual C++® .NET in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.