RcUpdateProxy Function
Topic Last Modified: 2006-06-13
The RcUpdateProxy function updates the proxy address for a recipient and returns the new proxy address in a Unicode string.
Applies To
Proxy Generation DLL Entry Points
Syntax
RC RcUpdateProxy
(
HANDLE hProxySession,
PRECIPIENTINFO pRecipientInfo,
LPWSTR pwstrOldSiteProxy,
LPWSTR pwstrNewSiteProxy,
LPWSTR pwstrProxy,
VOID* pUnused
);
Parameters
- hProxySession
Input parameter. Handle to the proxy address generation session as returned by the RcInitProxies Function.
- pRecipientInfo
Input parameter. Pointer to a RECIPIENTINFO Structure containing details about this recipient. The RECIPIENTINFO Structure is defined in the proxyinf.h header file.
- pwstrOldSiteProxy
Input parameter. The old site proxy string. This value will be in the form TYPE:VALUE, where TYPE indicates the address type.
- pwstrNewSiteProxy
Input parameter. The new site proxy string. This value will be in the form TYPE:VALUE, where TYPE indicates the address type.
- pwstrProxy
On input, provides the current site proxy address. When this function returns, this parameter should contain the modified proxy address. This value will be in the form TYPE:VALUE, where TYPE indicates the address type.
- pUnused
This required parameter is unused, and should be set to NULL.
Return Value
Return Code, as defined in retcode.h. Only the following return codes are recognized by Microsoft® Exchange.
RC_SUCCESS |
Return this code to indicate success. |
RC_MEMORY |
Return this code to indicate that an error occurred while allocating memory. |
RC_ERROR |
Return this code to indicate some other error occurred. |
Remarks
This function should examine the recipient proxy address supplied in the pwstrProxy parameter. If the site portion of the proxy address matches the string specified in the pwstrOldSiteProxy parameter, then the function should replace the current site information with the new site proxy information specified in the pwstrNewSiteProxy parameter. The function should then return the updated recipient proxy address in the pwstrProxy return parameter.
If the function determines that pwstrOldSiteProxy is not part of the recipient proxy address, the function should not change pwstrProxy, and should return the error code RC_ERROR.
The RcUpdateProxy function should not display any user interface, because proxy generation should be performed silently.
Test programs and other applications that use the proxy generation dynamic-link library (DLL) can use the proxyinf.h, retcode.h, and proxygen.h header files that define proxy generation DLL interfaces, structures, and return codes.