"Bug" Fix: Running x64 bit Crash Reporter with 32 bit mail client

63 views
Skip to first unread message

Daniel Crosby

unread,
Jun 9, 2016, 12:03:19 AM6/9/16
to Crashrpt
If you are running the x64 build and trying to send MAPI mail from a 32-bit mail program (like Outlook), you'll probably find that the MAPI Logon / Logoff calls in CMailMsg::Send()
fail If so, just #ifdef out those calls for your x64 build because the MAPISendMail call will still work fine. e.g.

	LHANDLE hMapiSession = 0;
	#if defined (_M_X64)
	#else
		status = m_lpMapiLogon(NULLNULLNULLMAPI_LOGON_UI|MAPI_PASSWORD_UINULL, &hMapiSession);
		if (status != SUCCESS_SUCCESS)
		{
			m_sErrorMsg.Format(_T("MAPILogon has failed with code %X."), status);
			return FALSE;
		}
	#endif

...

	if (hMapiSession != 0)
	{
		m_lpMapiLogoff(hMapiSessionNULL, 0, 0);
	}
Reply all
Reply to author
Forward
0 new messages