Does anyone have anything 'official' as it relates to GDI drawing functions needing data aligned on DWORD boundaries? I often run into quirkly lock-up problems when using non-aligned data that seem to magically resolve themselves when the data is subsequently aligned. For example, Polygon() takes a pointer to a set of data points; if the points are non-aligned, the program (sometimes) hangs in the function forever. Can anyone else confirm or deny this behavior, or point me to a reference that does?
TIA
-alan
I couldn't find any information on this problem, and on my system, using the default Windows 2000 drivers for a fairly ancient Matrox G200, the Polygon function has no problems with the array of vertices at any alignment. Perhaps the problem is with later versions of Windows and/or more recent drivers. The attachment is my crude test app.
[attachment deleted by admin]
MichaelW's test runs perfectly on:
Win2k SP5(unofficial) with GF7600GT and okay drivers
redskull, maybe it's your drivers that ruin things for you? Or a part of some OS file is damaged (has happened to me)
Michael's test works on XP SP2 with NVIDIA GeForce 6200 TurboCache
I guess it must just be this particular video card; it's a crappy notebook card that's suspect to begin with (it doesn't change resolution, it just changes screen size), so i'm not inclined to get so upset about it. I would have thought Windows would do some altering of the memory, at least a little bit, before the driver gets hold of it; I guess video cards have some sort of DMA-like thing?
In either case, thanks to everyone for helping out in testing it.
-alan