I need to declare that both data and code segments can not be swaped to disk.
How to do it in MFC based app.
Thanking in anticipation.
Adam
Printable View
I need to declare that both data and code segments can not be swaped to disk.
How to do it in MFC based app.
Thanking in anticipation.
Adam
Make .DEF file and write entry:
CODE PRELOAD
Do not ......... never mind
I've done what you suggested and it seems to be a good way, but had a linker warning:
CODE statement not supported for the target platform; ignored.
I'm using VC++ 6.0 and Win98 or NT.
Unfortunately MSDN does not explain clerly which statements are supported and which are not.
Adam
Thanks
IMHO PRELOAD only preloads code (as the name implies). NONDISCARDABLE is the "right" keyword for avoiding discarding of segments.
Unfortunately, CODE NONDISCARDABLE flag is ignored by windows (as you found out) for applications. However, this is not true for DLLS. Thus, the code you want to prevent from being swapped out, put that in a DLL. Then use the NONDISCARDABLE flag.
Hope this helps.
Vali