I had some extra time today, so I put together updates I’ve been working on for the GCReconnect sample/tool which we use to demonstrate/test referrals. The key addition here is an oft requested switch, –k, which requests that we keep the profile that GCReconnect built. I've posted the updated sample here.
C:\>gcreconnect Creates a profile, optionally enabling referral and reconnect logic, and tests name lookup.
Usage: GCReconnect [-?] -m mailbox -s server [-e] [-x] [-n name] [-l] [-r] [-w]
Options: -m mailbox Specifies the mailbox to log on to. -s server Specifies the Exchange server where the mailbox resides. -e Enable referral and reconnect If referral and reconnect are not enabled, MAPI will connect directly to the Exchange server for name lookup -x Enable additional referral and reconnect settings for Exchange 2007 Implies -e -a auth Use specificied auth. Default is 9 (RPC_C_AUTHN_GSS_NEGOTIATE). -n name Specifies a name to resolve with ResolveName If not specified, QueryIdentity will be used instead -l Loop over MAPILogonEx. Will log on and off repeatedly until key is hit -r Loop over ResolveName and OpenMsgStore. Will log on once and do name lookup and message store open repeatedly until key is hit Requires -n, not valid with -l -w Wait for keyboard input before and after creating and configuring profile -k Do not delete the profile when done. -? Displays this usage information.
Anybody think this is worth posting as a project up on Codeplex? Or would I be better off just incorporating all of this into MFCMAPI?
Please incorporate into MFCMapi!
It would be nice to have it all on one place. :)