DWORD DdeGetData(hData, lpbDest, cbMax, offSrc) | |||||
HDDEDATA hData; | /* handle of global memory object | */ | |||
LPBYTE lpbDest; | /* address of destination buffer | */ | |||
DWORD cbMax; | /* amount of data to copy | */ | |||
DWORD offSrc; | /* offset to beginning of data | */ |
The DdeGetData function copies data from the given global memory object to the specified local buffer.
hData
Identifies the global memory object that contains the data to copy.
lpbDest
Points to the buffer that receives the data. If this parameter is NULL, the DdeGetData function returns the amount, in bytes, of data that would be copied to the buffer.
cbMax
Specifies the maximum amount, in bytes, of data to copy to the buffer pointed to by the lpbDest parameter. Typically, this parameter specifies the length of the buffer pointed to by lpbDest.
offSrc
Specifies an offset within the global memory object. Data is copied from the object beginning at this offset.
If the lpbDest parameter points to a buffer, the return value is the size, in bytes, of the memory object associated with the data handle or the size specified in the cbMax parameter, whichever is lower.
If the lpbDest parameter is NULL, the return value is the size, in bytes, of the memory object associated with the data handle.
Use the DdeGetLastError function to retrieve the error value, which may be one of the following:
DMLERR_DLL_NOT_INITIALIZED
DMLERR_INVALID_HDDEDATA
DMLERR_INVALIDPARAMETER
DMLERR_NO_ERROR
DdeAccessData, DdeCreateDataHandle, DdeFreeDataHandle