The information in this article applies to:
SUMMARY
Some problems arise when an application for the Microsoft Windows
graphical environment uses a segment addressed by a selector that is
not allocated by the Windows kernel. This article describes the
correct method of building selectors at run time. While the text below
describes the problems that arise when an application calls the
PrestoChangoSelector() function to alias a selector, it does not
discuss other difficulties involved in building a code segment at run
time. Note that the techniques in this article are specific to the
current implementation of 16-bit Windows.
MORE INFORMATIONIf a callback function, for example, a window procedure, is located in a dynamic code segment, the Windows user module encounters some problems when any application exits because the selector for the segment was not allocated by the kernel. To work around this problem, the application must save the original selector used to access the segment [obtained from the AllocSelector() function] and use the original selector to execute the code in the segment [using PrestoChangoSelector()]. The code fragment below demonstrates this technique. Note that DATA_SELECTOR is a selector obtained from the GlobalAlloc() function.
Additional query words: 3.00 no32bit 3.10
Keywords : kb16bitonly |
Last Reviewed: November 3, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |