13.07.2015 Views

REFERENCE GUIDE

REFERENCE GUIDE

REFERENCE GUIDE

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

GlobalNotifyThe callback function must use the Pascal calling convention and must bedeclared FAR. The callback function must reside in a fixed code segmentof a DLL.Callbackfunction Bool FAR PASCAL NotifyProc(hMem)NotifyProc is a placeholder for the application-supplied function name.Export the name by including it in an EXPORTS statement in the DLL'smodule-definition statement.Parameters hMem HANDLE Identifies the global memory block beingdiscarded.Return valueCommentsThe function returns a nonzero value if Windows is to discard thememory block, and zero if it should not.The callback function is not necessarily called in the context of theapplication that owns the routine. For this reason, the callback functionshould not assume the stack segment of the application. The callbackfunction should not call any routine that might move memory.GlobalPageLock 3.0SyntaxWORD GlobalPageLock(wSelector)function GlobalPageLock(Selector: THandle): Word;This function increments the page-lock count of the memory associatedwith the specified global selector. As long as its page-lock count isnonzero, the data which the selector references is guaranteed to remain inmemory at the same physical address and to remain paged in.GlobalPageLock increments the page-lock count for the block of memory,and the GlobalPageUnlock function decrements the page-lock count.Page-locking operations can be nested, but each page lock must bebalanced by a corresponding unlock.Parameters wSelector WORD Specifies the selector of the memory to be pagelocked.Return valueCommentsThe return value specifies the page-lock count after the function hasincremented it. If the function fails, the return value is zero.An application should not use this function unless it is absolutelynecessary. Use of this function violates preferred Windows programmingpractices. It is intended to be used for dynamically allocated data that376 Software development kit

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!