Jump to content

DrgAllocDragtransfer: Difference between revisions

From EDM2
Created page with "This function allocates a specified number of DRAGTRANSFER structures from a single segment. ==Syntax== DrgAllocDragtransfer(cdxfer) ==Parameters== ;cdxfer (ULONG) - input: Number of DRAGTRANSFER structures to be allocated. :: This number must be greater than 0. ==Returns== ;pDragtransfer (PDRAGTRANSFER) - returns: Pointer to an array of DRAGTRANSFER structures. :: NULL - Error occurred. :: Other - The array of DRAGTRANSFER structures. ==Remarks== This function..."
 
 
Line 9: Line 9:


==Returns==
==Returns==
;pDragtransfer (PDRAGTRANSFER) - returns: Pointer to an array of DRAGTRANSFER structures.
;pDragtransfer (P[[DRAGTRANSFER]]) - returns: Pointer to an array of DRAGTRANSFER structures.
:: NULL - Error occurred.
:: NULL - Error occurred.
:: Other - The array of DRAGTRANSFER structures.
:: Other - The array of DRAGTRANSFER structures.

Latest revision as of 23:59, 14 May 2025

This function allocates a specified number of DRAGTRANSFER structures from a single segment.

Syntax

DrgAllocDragtransfer(cdxfer)

Parameters

cdxfer (ULONG) - input
Number of DRAGTRANSFER structures to be allocated.
This number must be greater than 0.

Returns

pDragtransfer (PDRAGTRANSFER) - returns
Pointer to an array of DRAGTRANSFER structures.
NULL - Error occurred.
Other - The array of DRAGTRANSFER structures.

Remarks

This function must be called before sending a DM_RENDER message.

Errors

Possible returns from WinGetLastError:

PMERR_MEMORY_ALLOCATION_ERR (0x1112)
An error occurred during memory management.
PMERR_INSUFFICIENT_MEMORY (0x203E)
The operation terminated through insufficient memory.
PMERR_PARAMETER_OUT_OF_RANGE (0x1003)
The value of a parameter was not within the defined valid range for that parameter.

Example Code

#define INCL_WINSTDDRAG /* Direct Manipulation (Drag) Functions*/
#include <os2.h>

PDRAGTRANSFER pResult; /* Pointer to DRAGTRANSFER structure */
PDRAGITEM pDragitem; /* Pointer to DRAGITEM structure */

pResult = DrgAllocDragtransfer(1);
if (pResult != NULL) /* Indicate DRAGITEM to be transferred */
   pResult->pditem = pDragitem;

Related Functions