bug in Mapi

bug in Mapi

Postby ukservice » Tue Feb 23, 2010 3:14 pm

Hi,

When you close the Mail client, a GPF occurs.

This is the test code:

#include "FiveWin.ch"
#include "Mail.ch"
static oWnd
//----------------------------------------------------------------------------//
function Main()
local oBar
DEFINE WINDOW oWnd TITLE "Using Windows MAIL Services"

SET MESSAGE OF oWnd TO "FiveWin - Windows MAIL support" CENTERED
ACTIVATE WINDOW oWnd ON INIT Test() ;
VALID MsgYesNo( "Want to end ?" )
return nil
//----------------------------------------------------------------------------//

function Test()
local oMail
DEFINE MAIL oMail ;
SUBJECT "Testing..." ;
TEXT "This is real xBase power at your fingertips!" ;
FROM USER ;
RECEIPT
ACTIVATE MAIL oMail
MsgInfo( oMail:nRetCode )
return nil
//----------------------------------------------------------------------------//


Thanks
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
ukservice
 
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: bug in Mapi

Postby driessen » Tue Feb 23, 2010 3:59 pm

Hello Ukservice,

I tried your example but I got no problem at all. Everything is running just fine.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: bug in Mapi

Postby Antonio Linares » Tue Feb 23, 2010 5:06 pm

UkService,

What FWH version are you using ? Harbour or xHarbour ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: bug in Mapi

Postby ukservice » Tue Feb 23, 2010 7:07 pm

Hi,

FWH August 2009 and Harbour 2.0.

GPF happens AFTER closing Mail client.

Thanks
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
ukservice
 
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: bug in Mapi

Postby toninhofwi » Tue Feb 23, 2010 7:30 pm

Hi.

Harbour have built-in MAPI, please look at this sample:

---cut---
#include "hbwin.ch"

PROCEDURE Main()

LOCAL cSubject := "Test subject"
LOCAL cBody := "Test body"
LOCAL lMailConf := .F.
LOCAL lFromUser := .T.
LOCAL aSender := { "test from", "from@test.com" }
LOCAL aDest := { { "test to", "to@test.com", WIN_MAPI_TO } }
LOCAL aFiles := { { "testmapi.prg", "testmapi" } }

? win_MAPISendMail( cSubject, ; // subject
cBody, ; // menssage
NIL, ; // type of message
DToS( Date() ) + " " + Time(), ; // send date
"", ; // conversation ID
lMailConf, ; // acknowledgment
lFromUser, ; // user intervention
aSender, ; // sender
aDest, ; // destinators
aFiles ; // attach
)

// simple format

? win_MAPISendMail( cSubject, ; // subject
cBody, ; // menssage
NIL, ; // type of message
DToS( Date() ) + " " + Time(), ; // send date
"", ; // conversation ID
lMailConf, ; // acknowledgment
lFromUser, ; // user intervention
"from@test.com", ; // sender
{ "to@test.com" }, ; // destinators
{ "testmapi.prg" } ; // attach
)

RETURN
---cut---


Regards,

Toninho.
toninhofwi
 
Posts: 172
Joined: Tue Oct 18, 2005 10:01 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 40 guests