Category: winapi

Raster Operator to use for MaskBlt

I’m trying to use the GDI MaskBlt command to draw an image with transparency: http://msdn.microsoft.com/en-us/library/dd145047(VS.85).aspx I can’t seem to find anything in the documentation about what raster operator to use for the obvious use case: a sort of MAKEROP4(SRCCOPY, DSTCOPY) – blitting where the mask is 1, and leaving the destination untouched where the mask […]

Executable sections marked as “execute” AND “read”?

I’ve noticed (on Win32 at least) that in executables, code sections (.text) have the “read” access bit set, as well as the “execute” access bit. Are there any bonafide legit reasons for code to be reading itself instead of executing itself? I thought this was what other sections were for (such as .rdata). (Specifically, I’m […]