Platform SDK: Interprocess Communications

NDdeShareGetInfo

The NDdeShareGetInfo function retrieves DDE share information. This is usually done for editing.

UINT NDdeShareGetInfo(
  LPTSTR lpszServer,          // server name
  LPTSTR lpszShareName,       // share name
  UINT nLevel,                // information level
  LPBYTE lpBuffer,            // share information buffer
  DWORD cBufSize,             // size of buffer
  LPDWORD lpnTotalAvailable,  // number of bytes available
  LPWORD lpnItems             // selection mask
);

Parameters

lpszServer
[in] Pointer to a string that specifies the name of the server on which the DSDM resides.
lpszShareName
[in] Pointer to the share name whose information is to be retrieved from the DSDM. This parameter must not be NULL.
nLevel
[in] This parameter must be 2.
lpBuffer
[out] Pointer to a buffer that receives the NDDESHAREINFO structure and associated data pointed to by its members. This parameter can be NULL. If lpBuffer is NULL, then the DSDM calculates the number of bytes required to store the requested share information and returns that value in the lpnTotalAvailable field along with the NDDE_BUF_TOO_SMALL error.
cBufSize
[in] Specifies the size of the lpBuffer buffer, in bytes. If lpBuffer is NULL, then cBufSize should be zero.
lpnTotalAvailable
[out] Pointer to a variable that receives the total number of bytes needed to store the requested share information. This parameter cannot be NULL.
lpnItems
[in] Pointer to an item selection mask for partial share information retrieval. For Windows NT version 3.1, the item selection mask must be zero.

Return Values

If the function succeeds, the return value is NDDE_NO_ERROR.

If the function fails, the return value is an error code, which can be translated into a text error message by calling NDdeGetErrorString. If the lpBuffer parameter is NULL, it returns NDDE_BUF_TOO_SMALL.

Requirements

  Windows NT/2000: Requires Windows NT 3.1 or later.
  Header: Declared in Nddeapi.h.
  Library: Use Nddeapi.lib.
  Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.

See Also

Network Dynamic Data Exchange Overview, Network DDE Functions, NDDESHAREINFO, NDdeShareSetInfo