Platform SDK: Interprocess Communications

NDdeShareAdd

The NDdeShareAdd function creates and adds a new DDE share to the DDE share database manager (DSDM).

UINT NDdeShareAdd(
  LPTSTR lpszServer,         // server name
  UINT nLevel,               // information level
  PSECURITY_DESCRIPTOR pSD,  // initial security descriptor
  LPBYTE lpBuffer,           // address of NDDESHAREINFO
  DWORD cBufSize             // size of supplied buffer
);

Parameters

lpszServer
[in] Pointer to a string that specifies the name of the server whose DSDM is to be modified.
nLevel
[in] Specifies the information level. This parameter must be 2.
pSD
[in] Pointer to a SECURITY_DESCRIPTOR structure to be associated with this share and against which access checks will be performed on subsequent initiates to this share. This parameter can be NULL, in which case the DSDM creates a default security descriptor that grants "Full Control" to the owner and "Read and Link" to everyone.
lpBuffer
[in] Pointer to the NDDESHAREINFO structure that defines the ApplicationTopic list associated with the DDE share being created as well as other parameters. This parameter cannot be NULL.
cBufSize
[in] Specifies the size of the lpBuffer structure, in bytes. This parameter cannot 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.

Remarks

Before a client can connect to the DDE share, it must be trusted with NDdeSetTrustedShare.

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, NDdeSetTrustedShare