The information in this article applies to:
SUMMARY
Applications that will run solely in one of Windows protected modes
(standard mode or enhanced mode) can take advantage of the attributes
of protected mode to reduce the size and improve the speed of the
application.
MORE INFORMATION
To assure compatibility with future versions of Windows, an application
should not make any assumptions about the protection ring of memory
selectors the system provides for memory allocations.
The four steps above may be used for discardable memory. However, Windows cannot discard the memory while it is locked. Therefore, even in protected mode, applications that use discardable memory objects should unlock each object when it is not in use. This makes these memory blocks candidates for discarding should the system run out of memory. Selectors should not be shared between applications unless the rules outlined in the dynamic data exchange (DDE) specification are followed. In particular, the GMEM_DDESHARE or GMEM_SHARE flag must be specified in memory allocation requests. Future versions of Windows may implement separate address spaces; any applications that improperly share memory will not function properly in any such release. An application that uses any of these techniques should specify the Resource Compiler -T switch when resources are added to the application. This will prevent the application from running in real mode. Additional techniques to decrease the size and increase the speed of an application developed for protected mode can be found by searching on the words in this Knowledge Base: streamlined Additional query words: 3.00 3.10
Keywords : kb16bitonly |
Last Reviewed: November 4, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |