INFO: Polyline() Function Causes Windows 95/98 to Fault

ID: Q201212


The information in this article applies to:


SUMMARY

When you use the Polyline function in the Windows SDK, the system faults if the following is true:


MORE INFORMATION

The Polyline function in the Windows SDK is used to draw a set of lines on the display. If the difference between the x coordinates or the y coordinates of the end points of a line is more than 32767, Windows 95 and Windows 98 generate a General Protection Fault. For example, the following call generates a fault in Windows 95 or Windows 98:


POINT points[] =
{

   { -25000, 25000},
   { 30000, -25000},
   { 32000,  32000},
   {-32000, -32000}

};


Polyline(hDC, &points[0], (sizeof(point) / sizeof(POINT))); 


This fault only occurs if the display driver on the system is using DIBENG. To ensure that the applications run consistently on all Windows 95 or Windows 98 computers, you need to make sure that the difference between any set of x coordinates and any set of y coordinates is less than 32767 when calling the Polyline function, even if the fault does not occur your computer.


REFERENCES

For additional information on the Polyline() function, please refer to the Windows Software Development Kit (SDK).

Additional query words:


Keywords          : 
Version           : WINDOWS:95
Platform          : WINDOWS 
Issue type        : kbinfo 

Last Reviewed: January 26, 1999