Prior to initiating a Pickup and Drop operation (via DrgLazyDrag), DrgAllocDraginfo must be called to allocate a DRAGINFO data structure. As additional objects are added to the Pickup set, the DRAGINFO and DRAGITEM data structures must be reallocated using DrgReallocDraginfo. This function unconditionally frees the existing DRAGINFO data structure passed to it, reallocates a new DRAGINFO data structure, and returns the pointer to the new data structure. The Pickup and Drop operation is then re-inititiated by another DrgLazyDrag call.
The DRAGIMAGE array is passed to DrgLazyDrag, so that compatibility with the drag operation is maintained. This allows the application to support Pickup and Drop, and standard drag operation with the same code. However, the drag images in the data structure are not used for display during Pickup and Drop, as the mouse pointer is augmented with a Pickup icon during the operation. As soon as DrgLazyDrag returns, the DRAGIMAGE array can be freed.