## Virtual Device Driver Reference for OS/2

[prev][next][parent][TOC]

### VDHAllocHook - Purpose

Context Issues: This function can be called in the initialization or DOS session-task context. However, VDH_RETURN_HOOK and VDH_BP_HOOK require the DOS session-task context.

DOS Session Terminations: During initialization time, hooks are allocated globally; that is, they are not associated with a DOS session process. These hooks are not automatically freed when a DOS session terminates. During DOS session creation time or thereafter, allocated hooks are associated with the current DOS session, and are freed when that DOS session terminates.

Notes: Use VDHQueryHookData to get a pointer to any reference data allocated.