From: Don on
Hi Walter,

Doesn't the suggested value of &H7FFF0000 clear out too many bits? To
preserve at least the low value for the Facility Code, wouldn't we need to
use &H7FF00000 instead? It then works for Facility Codes 0x0 thru 0xF, which
would cover the most common codes including FACILITY_STORAGE (0x3) and
FACILITY_WIN32 (0x7).

Thanks,
Don

"Walter Wang [MSFT]" <wawang(a)online.microsoft.com> wrote in message
news:pGqL7c1PHHA.3604(a)TK2MSFTNGHUB02.phx.gbl...
> After further researching and consulting, I think you could use following
> workaround to get the correct HRESULT, please note this workaround is only
> valid for the Outlook automation interface:
>
> Dim e2 As System.Exception = Marshal.GetExceptionForHR(ce.ErrorCode And
Not
> &H7FFF0000)



From: Walter Wang [MSFT] on
My bad, you are right, we should use:

Dim e2 As System.Exception = Marshal.GetExceptionForHR(ce.ErrorCode And Not
&H7FF00000)

This will keep the highest error bit, the facility code and the last 16-bit
error code.

Sorry for the typo.

Regards,
Walter Wang (wawang(a)online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.