Waits until the desired dos lists are free then gets a lock on them. A handle is returned that can be used for FindDosEntry(). Calls to this function nest, i.e. you must call UnLockDosList() as often as you called LockDosList(). Always lock all lists at once - do not try to get a lock on one of them then on another.
INPUTS
flags
what lists to lock
RESULT
Handle to the dos list. This is not a direct pointer to the first list element but to a pseudo element instead.