LPBYTE DdeAccessData(hData, lpcbData) | |||||
HDDEDATA hData; | /* handle of global memory object | */ | |||
LPDWORD lpcbData; | /* pointer to variable that receives data length | */ |
The DdeAccessData function provides access to the data in the given global memory object. An application must call the DdeUnaccessData function when it is finished accessing the data in the object.
hData
Identifies the global memory object to access.
lpcbData
Points to a variable that receives the size, in bytes, of the global memory object identified by the hData parameter. If this parameter is NULL, no size information is returned.
The return value points to the first byte of data in the global memory object if the function is successful. Otherwise, the return value is NULL.
Use the DdeGetLastError function to retrieve the error value, which may be one of the following:
DMLERR_DLL_NOT_INITIALIZED
DMLERR_INVALIDPARAMETER
DMLERR_NO_ERROR
If the hData parameter has not been passed to a Dynamic Data Exchange Management Library (DDEML) function, an application can use the pointer returned by DdeAccessData for read-write access to the global memory object. If hData has already been passed to a DDEML function, the pointer can only be used for read-only access to the memory object.
DdeAddData, DdeCreateDataHandle, DdeFreeDataHandle, DdeGetLastError, DdeUnaccessData