1. Errors

Hi, I recently upgraded to WinXP Pro and am having a little trouble with a
script I wrote as an Apache cgi script.  The script call MAPI functions and
uses Outlook Express default user to relay form input ... this script work
well under Win98.  Now I get an error number -2147467259
when the

error = c_func(MAPILogon, {0, 0, 0, MAPI_USE_DEFAULT, 0, session}) call is
made

if error then
 printf(1,"Error sending Message %d",error)
  abort(error)
end if

Any ideas what this error number represents??

Thanks
Vern

new topic     » topic index » view message » categorize

2. Re: Errors

Hi, Brian, thank you for your timely response.  The snipet of code I posted
was just the error portion, for a complete look at the defs, refer to
parser.ew on the contributors page as my example (I admit it is sadly
authored but it does work).  The flags are set to not force_down_load as
this would serious degrade the cgi process and maybe even timeout the
webserver ... anyway, this script works excellent under win98 but not under
winXP...
----- Original Message -----
From: "Brian Broker" <bkb at cnw.com>
To: "EUforum" <EUforum at topica.com>
Subject: RE: Errors


>
> Found out the answer to the first question:
>
> >From mapi.h
> /*# define MAPI_USE_DEFAULT     0x00000040     Use default profile in
> logon */
>
> but being commented pretty much deprecates it as a valid flag.
>
> Valid flags are:
> flFlags
> [in] Bitmask of option flags. The following flags can be set:
> MAPI_FORCE_DOWNLOAD
> #define MAPI_FORCE_DOWNLOAD     0x00001000
> An attempt should be made to download all of the user's messages before
> returning. If the MAPI_FORCE_DOWNLOAD flag is not set, messages can be
> downloaded in the background after the function call returns.
>
> MAPI_NEW_SESSION
> #define MAPI_NEW_SESSION        0x00000002
> An attempt should be made to create a new session rather than acquire
> the environment's shared session. If the MAPI_NEW_SESSION flag is not
> set, MAPILogon uses an existing shared session.
>
> MAPI_LOGON_UI
> #define MAPI_LOGON_UI           0x00000001
> A logon dialog box should be displayed to prompt the user for logon
> information. If the user needs to provide a password and profile name to
> enable a successful logon, MAPI_LOGON_UI must be set.
>
> MAPI_PASSWORD_UI
> #define MAPI_PASSWORD_UI        0x00020000
> MAPILogon should only prompt for a password and not allow the user to
> change the profile name. Either MAPI_PASSWORD_UI or MAPI_LOGON_UI should
> not be set, since the intent is to select between two different dialog
> boxes for logon.
>
> Hope this helps...
> -- Brian
>
> Brian Broker wrote:
> > Hi Vern,
> >
> > That does not appear to be a valid return value for that function.  But
> > then again, MAPI_USE_DEFAULT doesn't appear to be a valid value for
> > flFlags.  What is the value of MAPI_USE_DEFAULT?  How did you define
> > MAPILogon?
> >
> > -- Brian
> >
> >
> > Vern wrote:
> > > Hi, I recently upgraded to WinXP Pro and am having a little trouble
with
> > >
> > > a
> > > script I wrote as an Apache cgi script.  The script call MAPI
functions
> > > and
> > > uses Outlook Express default user to relay form input ... this script
> > > work
> > > well under Win98.  Now I get an error number -2147467259
> > > when the
> > >
> > > error = c_func(MAPILogon, {0, 0, 0, MAPI_USE_DEFAULT, 0, session})
call
> > > is
> > > made
> > >
> > > if error then
> > >  printf(1,"Error sending Message %d",error)
> > >   abort(error)
> > > end if
> > >
> > > Any ideas what this error number represents??
> > >
> > > Thanks
> > > Vern
> > >
> > >
>
>
>

new topic     » goto parent     » topic index » view message » categorize

3. Errors

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

I guess I'll have to build SMTP services right into my app

Thanks for you help David

Bernie

new topic     » goto parent     » topic index » view message » categorize

4. Re: Errors

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 message » categorize

5. Re: Errors

Hi, Brian, thank you, I, for some reason, did not get your last post, looked
for it but can't find it.  I will try this code you hace supplied and let
you know.  I apologize but I cannot refer to your last post as I did not get
it  :)

Hope ya'll have a great weekend,

Bernie Somes


----- Original Message -----
From: "Brian Broker" <bkb at cnw.com>
To: "EUforum" <EUforum at topica.com>
Subject: RE: Errors


>
> 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
>

new topic     » goto parent     » topic index » view message » categorize

6. Re: Errors

Euler:
I tried to download it without success for nearly a week. Any suggestion?
Thanks.
----- Original Message -----
From: "Euler German" <efgerman at myrealbox.com>
To: "EUforum" <EUforum at topica.com>
Subject: Re: Errors


>
> Yes! You can find it at <http://www.tfi-technology.com/>.
>
> -- Euler
>
> On 29 Dec 2001, at 3:18, tone.skoda at siol.net wrote:
>
> >
> > I once used program StayAlive (I think it was called something like
that) which would repair program when it crashes so
> > that you can use it like nothing happened. I don't remember why I
stopped using it, but as I remember it did its job quite
> > well.
> >
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

7. Re: Errors

Ricardo:

I could send it to you. Installer of trial version is 366KB. Personally I'm not 
that much impressed though it has other features. Let me know so I can mail it 
to you.

-- Euler

On 5 Jan 2002, at 0:01, rforno at tutopia.com wrote:

> 
> Euler:
> I tried to download it without success for nearly a week. Any suggestion?
> Thanks.
> ----- Original Message -----
> From: "Euler German" <efgerman at myrealbox.com>
> To: "EUforum" <EUforum at topica.com>
> Sent: Saturday, December 29, 2001 10:25 PM
> Subject: Re: Errors
> 
> 
> > Yes! You can find it at <http://www.tfi-technology.com/>.
> >
> > -- Euler
> >
> > On 29 Dec 2001, at 3:18, tone.skoda at siol.net wrote:
> >
> > >
> > > I once used program StayAlive (I think it was called something like
> that) which would repair program when it crashes so
> > > that you can use it like nothing happened. I don't remember why I
> stopped using it, but as I remember it did its job quite
> > > well.
> > >
> >
> 
> 
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu