Platform SDK: Interprocess Communications

NDdeGetTrustedShare

The NDdeGetTrustedShare function retrieves the options associated with a DDE share that is in the server user's list of trusted shares.

UINT NDdeGetTrustedShare(
  LPTSTR lpszServer,        // server name
  LPTSTR lpszShareName,     // share name
  LPDWORD lpdwTrustOptions, // trust options in effect
  LPDWORD lpdwShareModId0,  // first part of identifier
  LPDWORD lpdwShareModId1   // second part of identifier
);

Parameters

lpszServer
[in] Pointer to a string that specifies the name of the server on which the DSDM resides.
lpszShareName
[in] Pointer to a string that specifies the share name whose trusted status is being queried. This parameter cannot be NULL.
lpdwTrustOptions
[out] Pointer to a variable that receives the trust options. This parameter cannot be NULL. 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.

lpdwShareModId0
[out] Pointer to a variable that receives the first part of the trusted share modify identifier. This parameter cannot be NULL.
lpdwShareModId1
[out] Pointer to a variable that receives the second part of the trusted share modify identifier. This parameter cannot be NULL.

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 trusted share modify identifier reflects the version of the DDE share in the DSDM at the time the DDE share was initially granted trusted status. The trusted share modify identifier is primarily used to purge obsolete trusted shares. However, the user does not need to purge obsolete trusted shares. The network DDE agent purges obsolete shares on the user's behalf.

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