🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Can't use MAPILogonEx

#12554
From: Bob Gonder
Date: Wed, 03 Dec 2003 00:55
29 lines
2423 bytes
Dennis Jones wrote:

>"Bob Gonder" <notbg@notmindspring.invalid> wrote in message
>news:t3ipsvo8hk1g4rbgdajj6mv08733vi27qe@4ax.com...
>>
>>     HANDLE hMAPILib;
>>    LPMAPILOGONEX MAPILogonEx;
>>
>> hMAPILib = LoadLibrary("MAPI32.DLL");
>> MAPILogonEx =
>> (LPMAPILOGONEX)GetProcAddress(hMAPILib,"MAPILogonEx");
>>
>
>Hmm...I've had no trouble compiling/linking normal MAPI functions, but I
>also get errors when I try to use MapiLogonEx, even if I include mapix.h.
>There must be a trick to it, but I'm stumped.

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.
Technical Details
Message-ID: <57cqsv0oufvcav13m7c9b9v06dgn7e6cps@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-06!sn-xit-09!supernews.com!38.144.126.76.MISMATCH!feed2.newsreader.com!newsreader.com!zeus.visi.com!news-out.visi.com!petbe.visi.com!ash.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <imbpsvssig4cvsqge6v4q0cnnp9vghq8aa@4ax.com> <t3ipsvo8hk1g4rbgdajj6mv08733vi27qe@4ax.com> <3fcccdb1$3@newsgroups.borland.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 16:57:25 PST
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Can't use MAPILogonEx
Date: Tue, 02 Dec 2003 16:55:03 -0800
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <57cqsv0oufvcav13m7c9b9v06dgn7e6cps@4ax.com>
References: <imbpsvssig4cvsqge6v4q0cnnp9vghq8aa@4ax.com> <t3ipsvo8hk1g4rbgdajj6mv08733vi27qe@4ax.com> <3fcccdb1$3@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.31.165.31
X-Trace: newsgroups.borland.com 1070412907 67.31.165.31 (2 Dec 2003 16:55:07 -0700)
Lines: 32
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-06!sn-xit-09!supernews.com!38.144.126.76.MISMATCH!feed2.newsreader.com!newsreader.com!zeus.visi.com!news-out.visi.com!petbe.visi.com!ash.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail