🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Can't use MAPILogonEx

#12556
From: Dennis Jones
Date: Wed, 03 Dec 2003 01:35
32 lines
2682 bytes
"Bob Gonder" <notbg@notmindspring.invalid> wrote in message
news:57cqsv0oufvcav13m7c9b9v06dgn7e6cps@4ax.com...
> Dennis Jones wrote:

> Headers don't of them selves, cause the compiler/linker to bring in
> the needed libraries.  Other than the standard kernal libs, you need
> to add each addition library (not just the headers) your app requires.
>
> mapix.h defines MAPILogonEx as a function pointer. Somebody somewhere
> needs to fill in the pointer with the runtime address of the function.
> If you have a mapi32.lib, and have it linked with your app, then it
> should fill in that address when your app starts. OTOH, since it is an
> extended function, maybe the lib doesn't do that for that particular
> function, so you would need to do it yourself.
> It looks like MAPILogonEx is in mapi32.dll, so the above code should
> work.

I think you've misunderstood...I was referring to compiler errors, not
linker errors.

Anyway, I did a little more research.  It turns out that the simple MAPI
functions are built into Borland's VCL package.  However, the extended MAPI
functions are not.  This explains why I have never had trouble using the
simple MAPI functions (without resorting to LoadLibrary/GetProcAddress), and
why one might see compiler errors (as the OP did) when attempting to use
extended MAPI functions, such as MapiLogonEx.

Thus, the solution (for Fernando, if you're still reading this thread!) is
to use LoadLibrary and GetProcAddress as Bob showed in his first reply.

- Dennis
Technical Details
Message-ID: <3fcd3ddb$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed00.sul.t-online.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>

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-02 17:39:20 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>
Subject: Re: Can't use MAPILogonEx
Date: Tue, 2 Dec 2003 17:35:23 -0800
Lines: 34
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: <3fcd3ddb$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1070415323 204.200.27.7 (2 Dec 2003 17:35:23 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail