🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #12439

Re: Can't use MAPILogonEx

#12439
From: Dennis Jones
Date: Thu, 04 Dec 2003 05:11
43 lines
2828 bytes
"Bob Gonder" <notbg@notmindspring.invalid> wrote in message
news:fn4tsvknjq9gpmn5bciaf96pmam7a2ps8b@4ax.com...
> Dennis Jones wrote:
> >
> > and then refers to the mapi.hpp header file in which he
> >expected to find the function prototype, which suggested a compiler
error.
>
> Or that he expected the header to magically bring in the library.

I doubt it -- that would be the mistake of a C/C++ beginner.

>
> >So, I changed it to "MAPILogonEx" *and* #include'd mapix.h, and now I get
> >conversion errors because MAPILogonEx takes an "LPMAPISESSION" and
Borland's
> >version of MAPILogon takes an "unsigned *".
>
> Right, if they took the same parameters, what would be the point?
> MAPILogon returns a session Handle, -Ex returns the (more powerful?)
> MapiSession structure.  Which appears to be a VB tie-in to ActiveX
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconusingmapicontrol.asp

Duh.  Fernando's original problem was that the compiler couldn't find the
function prototype.  By including mapix.h and getting the error I did, I
showed that the prototype for MAPILogonEx is found and recognized by the
compiler.  No need to use LoadLibrary or GetProcAddress.  I'm leaving it up
to Fernando to figure out how to pass the correct arguments.

>
> >This suggests that Fernando just needed to include "mapix.h" to get past
the
> >error he was getting (because MAPILogonEx is not defined in the Borland
> >header, "mapi.hpp").
>
> Right. MSDN  says it is in MAPIX.H

The point is, mapi.hpp (which is a Borland header file) does not include it,
even though one might think it should.

- Dennis
Technical Details
Message-ID: <3fcec1f2$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <imbpsvssig4cvsqge6v4q0cnnp9vghq8aa@4ax.com> <t3ipsvo8hk1g4rbgdajj6mv08733vi27qe@4ax.com> <3fcccdb1$3@newsgroups.borland.com> <57cqsv0oufvcav13m7c9b9v06dgn7e6cps@4ax.com> <3fcd3ddb$1@newsgroups.borland.com> <fdgssvgi495ler9vqg533p0le3uds27ec5@4ax.com> <3fce54a1$1@newsgroups.borland.com> <fn4tsvknjq9gpmn5bciaf96pmam7a2ps8b@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,cb65823e8ed3a9bb
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-12-03 21:39:05 PST
From: "Dennis Jones" <djones@nospam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <imbpsvssig4cvsqge6v4q0cnnp9vghq8aa@4ax.com> <t3ipsvo8hk1g4rbgdajj6mv08733vi27qe@4ax.com> <3fcccdb1$3@newsgroups.borland.com> <57cqsv0oufvcav13m7c9b9v06dgn7e6cps@4ax.com> <3fcd3ddb$1@newsgroups.borland.com> <fdgssvgi495ler9vqg533p0le3uds27ec5@4ax.com> <3fce54a1$1@newsgroups.borland.com> <fn4tsvknjq9gpmn5bciaf96pmam7a2ps8b@4ax.com>
Subject: Re: Can't use MAPILogonEx
Date: Wed, 3 Dec 2003 21:11:15 -0800
Lines: 45
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 204.200.27.7
Message-ID: <3fcec1f2$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1070514674 204.200.27.7 (3 Dec 2003 21:11:14 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail