NDdeSetTrustedShare function

[Network DDE is no longer supported. Nddeapi.dll is present on Windows Vista, but all function calls return NDDE_NOT_IMPLEMENTED.]

Grants the specified DDE share trusted status within the current user's context.

Syntax

UINT NDdeSetTrustedShare(
  _In_ LPTSTR lpszServer,
  _In_ LPTSTR lpszShareName,
  _In_ DWORD  dwTrustOptions
);

Parameters

lpszServer [in]

The name of the server whose DSDM is to be modified.

lpszShareName [in]

The name of the share to be granted trusted status. This parameter cannot be NULL.

dwTrustOptions [in]

The options affecting the trusted status of the DDE share. This parameter can be one of the following values.

Option Meaning
NDDE_CMD_SHOW_MASK
0x0000FFFFL
Mask used to obtain the value used to override the DDE share show state, if NDDE_TRUST_CMD_SHOW is set.
NDDE_TRUST_CMD_SHOW
0x10000000L
Override the show state specified in the DDE share DSDM.
NDDE_TRUST_SHARE_DEL
0x20000000L
Remove the share's trusted status.
NDDE_TRUST_SHARE_INIT
0x40000000L
Allow a client to initiate to the application if it is already running in the user's context.
NDDE_TRUST_SHARE_START
0x80000000L
Allow the application to be started in the user's context.

Return value

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

Requirement Value
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Header
Nddeapi.h
Library
Nddeapi.lib
DLL
Nddeapi.dll
Unicode and ANSI names
NDdeSetTrustedShareW (Unicode) and NDdeSetTrustedShareA (ANSI)

See also

Network Dynamic Data Exchange Overview

Network DDE Functions

NDdeShareAdd