Dangers of Uninitialized Data StructuresLast reviewed: November 2, 1995Article ID: Q74277 |
The information in this article applies to:
In general, all fields in structures passed to functions in the Microsoft Windows graphical environment should be initialized. If a field is not initialized, it may contain random data, which can cause unexpected behavior. For example, before an application registers a window class, it must initialize the cbClsExtra and cbWndExtra fields of the WNDCLASS data structure. Windows allocates cbClsExtra bytes for the class, and cbWndExtra bytes for each window created using the class. If these fields contain large random values, the application may run out of memory quickly.
|
Additional reference words: 3.00 3.10 3.50 4.00 95
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |