AllocSelector

Version 3.0

Syntax

WORD AllocSelector(wSelector)

This function allocates a new selector. If the wSelector parameter is a valid selector, AllocSelector returns a new selector which is an exact copy of the one specified by wSelector. If wSelector is NULL, AllocSelector returns a new, uninitialized selector.

The application must free the new selector by calling the FreeSelector function.

Parameter Type/Description  

wSelector WORD Specifies the selector to be copied, or NULL if AllocSelector is to allocate a new, uninitialized selector.  

Return Value

The return value is either a selector that is a copy of an existing selector, or a new, un-initialized selector. If the function could not allocate a new selector, the return value is zero.

Comments

An application can call AllocSelector to allocate a selector that it can pass to the
ChangeSelector
function.

An application should not use this function unless it is absolutely necessary. Use of this function violates preferred Windows programming practices.