RE: Errors

new topic     » goto parent     » topic index » view thread      » older message » newer message

Bernie,

Perhaps you missed my replies (or chose to ignore them) but 
MAPI_USE_DEFAULT is not a valid flag for MAPILogon.  You might consider 
using MAPILogonEx. (I don't know if this is XP only or what, I'm just 
going by the SDK docs.)

On the other hand, it just might work if you define the parameters 
correctly.  Try this:

mapi_dll = open_dll("mapi32.dll")
MAPILogon = define_c_func(mapi_dll, "MAPILogon",
        {C_ULONG, C_POINTER, C_POINTER, C_UINT, C_ULONG, C_POINTER},
        C_ULONG)

There are no signed inputs...  Same goes for MAPILogonEx, which doesn't 
look like it's any more difficult to use.

MAPILogonEx = define_c_func(mapi_dll,"MAPILogonEx",
              {C_ULONG,C_POINTER,C_POINTER,C_UINT,C_POINTER},C_UINT)

Refer to my last post for a URL with more info on this function.
-- Brian

Bernie wrote:
> I agree, but I am at a loss as to the new scructure, for this script 
> does
> work well under Win98 but not under WinXP.  I now know that it is not a
> Euphoria problem but rather a new format perhaps in mapi32.dll
> 
> here is a snipet of the decalrations
> 
> integer   MAPILogon, MAPILogoff, MAPISendMail, ok, ok1, ok2, ok3, ok4
> atom      mapi_dll, session, error, message, recipient
> 
> constant
> MAPI_TO = 1,
>       MAPI_LOGON_UI = 1,
>       MAPI_FORCE_DOWNLOAD = #1000,
>       MAPI_USE_DEFAULT = #0040,
>       RECIPCLASS = 4,
>       NAME = 8,
>       ADDRESS = 12,
>       SUBJECT = 4,
>       TEXT = 8,
>       RECIPCOUNT = 32,
>       RECIPIENTS = 36
> 
> mapi_dll = open_dll("mapi32.dll")
> MAPILogon = define_c_func(mapi_dll, "MAPILogon",
>         {C_LONG, C_POINTER, C_POINTER, C_LONG, C_LONG, C_POINTER},
>         C_LONG)
> MAPILogoff = define_c_func(mapi_dll, "MAPILogoff",
>   {C_INT, C_INT, C_INT, C_INT},
>   C_LONG)
> MAPISendMail = define_c_func(mapi_dll, "MAPISendMail",
>   {C_INT, C_INT, C_POINTER, C_INT, C_INT},
>   C_LONG)
> 
> -- then the first attempt at use ....
> 
> session = allocate(4)
> error = c_func(MAPILogon, {0, 0, 0, MAPI_USE_DEFAULT, 0, session})
> 
> if error then
>  --printf(1,"<br><br>Error sending Message %d<br><br>",error)
>  printf(1,"<br><br>Error sending Message #%08x<br><br>",error)    --
> 80004005 unspecified error
>  abort(error)
> end if
> 
> 
> At anyrate, I appreciate all of the help on this problem, perhaps it is 
> time
> I move away from windows mapi and into smpt  :)
> 
> Bernie Somes
> 
> ----- Original Message -----
> From: "Matthew Lewis" <matthewwalkerlewis at YAHOO.COM>
> To: "EUforum" <EUforum at topica.com>
> Sent: Friday, February 08, 2002 7:51 AM
> Subject: RE: Errors
> 
> 
> > > -----Original Message-----
> > > From: vern at lvp.eastlink.ca [mailto:vern at lvp.eastlink.ca]
> >
> > > Well, I'm just not having any fun with this problem at all
> > > I followed the insightfullness of David Cuny and converted my
> > > little error
> > > number into hex and compared it to the value listed in
> > > winerror.h supplied
> > > with Borland5.5 and lol and behold,  error #80004005 -
> > > unspecified error
> > > LOL
> >
> > When I've gotten errors like that, I've usually traced it back to an
> > improperly declared structure.
> >
> > Matt Lewis
> >
> >

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu