Platform SDK: Interprocess Communications

NDdeSetTrustedShare

The NDdeSetTrustedShare function grants the specified DDE share trusted status within the current user's context.

UINT NDdeSetTrustedShare(
  LPTSTR lpszServer,     // server name
  LPTSTR lpszShareName,  // share name
  DWORD dwTrustOptions   // trust options
);

Parameters

lpszServer
[in] Pointer to a string that specifies the name of the server whose DSDM is to be modified.
lpszShareName
[in] Pointer to a string that specifies the name of the share to be granted trusted status. This parameter cannot be NULL.
dwTrustOptions
[in] Specifies the options affecting the trusted status of the DDE share. The following trust options are available.
Option Meaning
NDDE_TRUST_SHARE_START Allow the application to be started in the user's context.
NDDE_TRUST_SHARE_INIT Allow a client to initiate to the application if it is already running in the user's context.
NDDE_TRUST_SHARE_DEL Remove the share's trusted status.
NDDE_TRUST_CMD_SHOW Override the show state specified in the DDE share DSDM.
NDDE_CMD_SHOW_MASK Mask used to obtain the value used to override the DDE share show state, if NDDE_TRUST_CMD_SHOW is set.

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

The DDE share must first be created with NDdeShareAdd.

If NDdeSetTrustedShare is called with dwTrustOptions set to zero, the trusted share loses its trusted status.

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