|
-
Oct 13th, 2011, 08:08 AM
#11
Re: [VB6] GDI+ Usage & Samples
Good catch. I don't use that function any longer as I've written a more efficient and much faster routine to create such sourceless GDI+ bitmaps. I won't be updating this project with that routine which can be found in my AlphaImage Control project linked in my signature below.
The problem appears to be writing memory beyond intended bounds. That offending line should be changed to:
CopyMemory BHI.bmiColors(0), pal(8), .biClrImportant - 8
What was happening is that by copying 8 more bytes of data to the .bmiColors memory location than that location could hold, corruption of the following 8 bytes of memory on the stack occurs. This could be where the Depth variable resided? Anyway, I think you'll find the above patch suitable.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|