Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Thu, 31 Jul 2008 11:06:18 +0100,    group: microsoft.public.platformsdk.mapi        back       


MapiSendMail on Vista Fails if Outlook 2007 Running?   
I have some code to send mail from an application via MAPI from managed code 
as follows:


    <DllImport("MAPI32.DLL")> _
     Private Shared Function MAPISendMail(ByVal sess As IntPtr, ByVal hwnd 
As IntPtr, ByVal message As MapiMessage, ByVal flg As Integer, ByVal rsv As 
Integer) As Integer
    End Function

m_lastError = MAPISendMail(New IntPtr(0), New IntPtr(0), msg, how, 0)

this code works fine on XpP and works when outlook is closed, but when 
outlook is running i get

"General MAPI failure [2]        "

any ideas?

Dave Clark
date: Thu, 31 Jul 2008 11:06:18 +0100   author:   Dave Clark

RE: MapiSendMail on Vista Fails if Outlook 2007 Running?   
I am having the same issue.  Any ideas?

"Dave Clark" wrote:

> I have some code to send mail from an application via MAPI from managed code 
> as follows:
> 
> 
>     <DllImport("MAPI32.DLL")> _
>      Private Shared Function MAPISendMail(ByVal sess As IntPtr, ByVal hwnd 
> As IntPtr, ByVal message As MapiMessage, ByVal flg As Integer, ByVal rsv As 
> Integer) As Integer
>     End Function
> 
> m_lastError = MAPISendMail(New IntPtr(0), New IntPtr(0), msg, how, 0)
> 
> this code works fine on XpP and works when outlook is closed, but when 
> outlook is running i get
> 
> "General MAPI failure [2]        "
> 
> any ideas?
> 
> Dave Clark 
>
date: Thu, 28 Aug 2008 19:48:00 -0700   author:   Jon Gross Jon

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us