다음을 통해 공유


RcValidateSiteProxy Function

Topic Last Modified: 2006-06-13

The RcValidateSiteProxy function validates that the Unicode string represents a valid site address for the remote system. This function is called by Microsoft® Exchange to validate proxy addresses that have been created manually.

Applies To

Proxy Generation DLL Entry Points

Syntax

RC RcValidateSiteProxy
(
        HANDLE hProxySession,
        LPWSTR pszProxyAddr,
        BOOL* pIsValid
);

Parameters

  • hProxySession
    Input parameter. Handle to the proxy address generation session as returned by the RcInitProxies Function.
  • pszProxyAddr
    Input parameter. Unicode string containing the proxy address to validate.
  • pIsValid
    Output parameter. When true, this Boolean indicates that the specified site proxy address is valid, that the address has been corrected, or that the validation function is not implemented in this dynamic-link library (DLL). If the function returns RC_ERROR or RC_MEMORY, the returned value of this parameter has no meaning.

Return Value

Return Code, as defined in retcode.h. Only the following return codes are recognized by Exchange.

RC_SUCCESS

Return this code to indicate that the site address was valid, or that it has been corrected.

RC_IMPLEMENTATION

Return this code to indicate that the proxy generation DLL does not perform site address validation. Instead, the system will use the site address as specified, relying on the remote system to inform Exchange if the address is not valid. When returning this code, also set pIsValid true.

RC_MEMORY

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

RC_ERROR

Return this code to indicate that the site proxy address is not valid, or that some other error occurred.

Remarks

The RcValidateSiteProxy function should check that the proxy address supplied in pszProxyAddr is valid. If the DLL does not have the ability to determine the validity of the address, this function should return RC_IMPLEMENTATION. If the function determines that the site proxy address is valid, the function should return RC_SUCCESS. If the function determines that the site proxy address in not valid, then the function may attempt to fix the address, or indicate that the address is not valid by returning RC_ERROR. If the function is able to correct the invalid address, the new site proxy address should be placed into the memory space pointed to by the pszProxyAddr parameter, and the function should return RC_SUCCESS. If the function is unable to correct the invalid address, the function should return RC_ERROR.

Note

If the function chooses to repair an invalid site proxy address, it should be careful to not exceed the space provided in the buffer pointed to by pszProxyAddr.

When this function returns RC_SUCCESS, Exchange retrieves the site proxy address located in pszProxyAddr, and uses that address as the valid one. If the proxy address has previously been stored, that value will be updated by whatever value this function returns.

The RcValidateSiteProxy 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.