Platform SDK: Interprocess Communications |
The DdeAccessData function provides access to the data in the specified dynamic data exchange (DDE) object. An application must call the DdeUnaccessData function when it has finished accessing the data in the object.
LPBYTE DdeAccessData( HDDEDATA hData, // handle to DDE object LPDWORD pcbDataSize // receives data length );
If the function succeeds, the return value is a pointer to the first byte of data in the DDE object.
If the function fails, the return value is NULL.
The DdeGetLastError function can be used to get the error code, which can be one of the following values:
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 DDE object. If hData has already been passed to a DDEML function, the pointer should be used only for read access to the memory object.
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Ddeml.h; include Windows.h.
Library: Use User32.lib.
Dynamic Data Exchange Management Library Overview, Dynamic Data Exchange Management Functions, DdeAddData, DdeCreateDataHandle, DdeFreeDataHandle, DdeUnaccessData