Partager via


RcInitProxies Function

Topic Last Modified: 2006-06-13

Microsoft® Exchange calls the RcInitProxies function so that the proxy address generation dynamic-link library (DLL) can perform any required initialization before Exchange calls the RcGenerateProxy Function with individual recipient objects.

Applies To

Proxy Generation DLL Entry Points

Syntax

RC RcInitProxies
(
        LPWSTR pszSiteProxy,
        LPWSTR pszServer,
        HANDLE* phProxySession
);

Parameters

  • pszSiteProxy
    Input parameter. The site proxy for this address type. May be null, if the address type supports that.
  • pszServer
    Input parameter. A Unicode string containing the name of the server where the proxy generation DLL is being used.
  • phProxySession
    Output parameter. Returns a handle to a proxy address generation session.

Return Value

Return Code, as defined in retcode.h. Exchange, recognizes only the following return codes.

RC_SUCCESS

Return this code to indicate success.

RC_IMPLEMENTATION

Return this code to indicate that proxies are not implemented for this address type. No proxy addresses will be stored. This status also implies that the RcGenerateProxy Function and CloseProxies Function entry points are not available, are NULL, or do not exist. This is not an error condition, and no error is reported to the user.

RC_MEMORY

Return this code to indicate that an error occurred while allocating memory.

RC_ERROR

Return this code to indicate some other error condition.

Remarks

The RcInitProxies function is used to make the site-specific information available to the RcGenerateProxy Function and RCValidateProxy Function.

The pszSiteProxy parameter is generally used as part of the recipient proxy address.

RcInitProxies allocates the memory for the phProxySession parameter. Your program must free this memory by calling the FreeProxy Function method.

Both pszSiteProxy and pszServer are guaranteed to stay valid until after the CloseProxies Function is called, so the DLL need only keep a copy of these pointers rather than copy the data.

The RcInitProxies function should not display any user interface, because proxy generation should be performed silently.

Test programs and other applications that use the proxy generation DLL can use the proxyinf.h, retcode.h, and proxygen.h header files that define proxy generation DLL interfaces, structures, and return codes.