Jump to content

VDHAllocBlock: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
Ak120 (talk | contribs)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
This function allocates a block from the specified memory block pool. This block is allocated from fixed or swappable memory, depending on the value of the ''OptionFlag'' flag when the block is created with ''VDHCreateBlockPool''.
#REDIRECT[[VDDR/2 - C Language Virtual DevHlp Services#VDHAllocBlock]]
 
==Syntax==
VDHAllocBlock(SourceBlockPool)
 
== Parameters ==
; '''SourceBlockPool''' (HBLOCK) : Handle to the pool of memory blocks from which to allocate a memory block.
 
== Constants ==
None. {list of used constants}
 
== Returns ==
;rc (PVOID):returns
::Success: If the function is successful, it returns the address of the allocated memory block.
::Failure: If the function fails, it returns 0. ''VDHGetError''should be called to determine the nature of the problem. Note that passing an invalid memory block handle causes a system halt to occur.
 
== Remarks ==
'''Context Issues:''' This function can be called in the initialization or task context.
 
'''DOS Session Terminations:''' Any blocks allocated by a virtual device driver for use by the terminating DOS session are freed by using ''VDHFreeBlock''. Any block pools created for the DOS session should also be freed.
 
== Include ==
mvdm.h
 
== Related Functions ==
*''VDHCreateBlockPool''
*''VDHFreeBlock''
 
[[Category:Virtual Device Driver Helps]]

Latest revision as of 19:53, 11 July 2019