🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.basic.visual.misc
7 messages
7 total messages Started by XYZ Mon, 26 Apr 1999 00:00
problems with mapi.dll
#388
Author: XYZ
Date: Mon, 26 Apr 1999 00:00
13 lines
1402 bytes
Why is it that VB doesn't recognize this:

Declare Function MAPISendMail Lib "MAPI.DLL" Alias "BMAPISendMail" _
   (ByVal Session&, ByVal UIParam&, Message As MAPIMessage, Recipient _
   As MapiRecip, File As MapiFile, ByVal Flags&, ByVal Reserved&) As Long

if i declare another function from, for example kernel32, no problems! The
problem appears when i try to use mapi.dll or mapi32.dll...TIA!


--
Good day to you!
www.illusion.qc.ca
Re: problems with mapi.dll
#380
Author: Tony Fountain
Date: Tue, 27 Apr 1999 00:00
36 lines
1969 bytes
Exactly what error do you get?  Do you have MAPI installed?  Here's the
declaration I use and it works like a charm, straight from the MAPI32.TXT
via the API Viewer (ok, with the data types spelled out):

Private Declare Function MAPISendMail Lib "MAPI32.DLL" Alias "BMAPISendMail"
_
    (ByVal Session As Long, _
     ByVal UIParam As Long, _
     Message As MAPIMessage, _
     Recipient() As MapiRecip, _
     File() As MapiFile, _
     ByVal Flags As Long, _
     ByVal Reserved As Long) As Long

Later,
Tony Fountain, MCP
tonyfo at primenet dot com
ICQ# 16575458

XYZ <vanluc@faltec.com> wrote in message
news:A34V2.137$gi2.17742@wagner.videotron.net...
> Why is it that VB doesn't recognize this:
>
> Declare Function MAPISendMail Lib "MAPI.DLL" Alias "BMAPISendMail" _
>    (ByVal Session&, ByVal UIParam&, Message As MAPIMessage, Recipient _
>    As MapiRecip, File As MapiFile, ByVal Flags&, ByVal Reserved&) As Long
>
> if i declare another function from, for example kernel32, no problems! The
> problem appears when i try to use mapi.dll or mapi32.dll...TIA!
>
>
> --
> Good day to you!
> www.illusion.qc.ca
>
>
Re: problems with mapi.dll
#381
Author: Radovan Raszka
Date: Tue, 27 Apr 1999 00:00
25 lines
1649 bytes
using Text API Viewer utility I found this declaration
Declare Function MAPISendMail Lib "MAPI32.DLL" Alias "BMAPISendMail" (ByVal
Session&, ByVal UIParam&, Message As MAPIMessage, Recipient() As MapiRecip,
File() As MapiFile, ByVal Flags&, ByVal Reserved&) As Long
Recipient and File are arrays, not simple variables

--
Radovan Raszka

XYZ wrote in message ...
>Why is it that VB doesn't recognize this:
>
>Declare Function MAPISendMail Lib "MAPI.DLL" Alias "BMAPISendMail" _
>   (ByVal Session&, ByVal UIParam&, Message As MAPIMessage, Recipient _
>   As MapiRecip, File As MapiFile, ByVal Flags&, ByVal Reserved&) As Long
>
>if i declare another function from, for example kernel32, no problems! The
>problem appears when i try to use mapi.dll or mapi32.dll...TIA!
>
>
>--
>Good day to you!
>www.illusion.qc.ca
>
>
Re: problems with mapi.dll
#382
Author: Trooper
Date: Tue, 27 Apr 1999 00:00
18 lines
1535 bytes
This is the error it gives me when i compile the code:

            User-defined type not defined

>
> Declare Function MAPISendMail Lib "MAPI.DLL" Alias "BMAPISendMail" _
>    (ByVal Session&, ByVal UIParam&, Message As MAPIMessage, Recipient _
>    As MapiRecip, File As MapiFile, ByVal Flags&, ByVal Reserved&) As Long
>
> if i declare another function from, for example kernel32, no problems! The
> problem appears when i try to use mapi.dll or mapi32.dll...TIA!
>
>
> --
> Good day to you!
> www.illusion.qc.ca
>
>
Re: problems with mapi.dll
#383
Author: Tony Fountain
Date: Tue, 27 Apr 1999 00:00
61 lines
2363 bytes
You need to make sure you have the following structures defined (all in the
API viewer):

Public Type MapiFile
    Reserved As Long
    Flags As Long
    Position As Long
    PathName As String
    FileName As String
    FileType As String
End Type
Public Type MAPIMessage
    Reserved As Long
    Subject As String
    NoteText As String
    MessageType As String
    DateReceived As String
    ConversationID As String
    Flags As Long
    RecipCount As Long
    FileCount As Long
End Type
Public Type MapiRecip
    Reserved As Long
    RecipClass As Long
    Name As String
    Address As String
    EIDSize As Long
    EntryID As String
End Type

Later,
Tony Fountain, MCP
tonyfo at primenet dot com
ICQ# 16575458
Please do not email me directly, my wife already clutters up my inbox

Trooper <luc.vandal@sympatico.ca> wrote in message
news:owmV2.2702$gi2.31374@wagner.videotron.net...
> This is the error it gives me when i compile the code:
>
>             User-defined type not defined
>
> >
> > Declare Function MAPISendMail Lib "MAPI.DLL" Alias "BMAPISendMail" _
> >    (ByVal Session&, ByVal UIParam&, Message As MAPIMessage, Recipient _
> >    As MapiRecip, File As MapiFile, ByVal Flags&, ByVal Reserved&) As
Long
> >
> > if i declare another function from, for example kernel32, no problems!
The
> > problem appears when i try to use mapi.dll or mapi32.dll...TIA!
> >
> >
> > --
> > Good day to you!
> > www.illusion.qc.ca
> >
> >
>
>
Re: problems with mapi.dll
#385
Author: Surfer
Date: Thu, 29 Apr 1999 00:00
23 lines
1622 bytes
You should switch to CDO instead. It is completely COM compliant and can be
used without any "Declare" within VB.
Furthermore, it is feature complete which means you can do anything you want
when messaging is concerned.


XYZ <vanluc@faltec.com> wrote in message
news:A34V2.137$gi2.17742@wagner.videotron.net...
> Why is it that VB doesn't recognize this:
>
> Declare Function MAPISendMail Lib "MAPI.DLL" Alias "BMAPISendMail" _
>    (ByVal Session&, ByVal UIParam&, Message As MAPIMessage, Recipient _
>    As MapiRecip, File As MapiFile, ByVal Flags&, ByVal Reserved&) As Long
>
> if i declare another function from, for example kernel32, no problems! The
> problem appears when i try to use mapi.dll or mapi32.dll...TIA!
>
>
> --
> Good day to you!
> www.illusion.qc.ca
>
>
Re: problems with mapi.dll
#387
Author: Tony Fountain
Date: Thu, 29 Apr 1999 00:00
43 lines
2327 bytes
From the last conversations I had with MS, CDO was not redistributable as of
then (about 2 months ago).  Bit me bad since I thought it was the best thing
next to sliced bread (at first).  It also has some problems running on WinNT
4.0 with the SMTP protocol.  GPF's everytime the session loses scope, either
by an explicit Set = Nothing or the procedure terminates.

Later,
Tony Fountain, MCP
tonyfo at primenet dot com
ICQ# 16575458
Please do not email me directly, my wife already clutters up my inbox

Surfer <DontReply@ThisAddress.net> wrote in message
news:#TvOv8kk#GA.285@cppssbbsa02.microsoft.com...
> You should switch to CDO instead. It is completely COM compliant and can
be
> used without any "Declare" within VB.
> Furthermore, it is feature complete which means you can do anything you
want
> when messaging is concerned.
>
>
> XYZ <vanluc@faltec.com> wrote in message
> news:A34V2.137$gi2.17742@wagner.videotron.net...
> > Why is it that VB doesn't recognize this:
> >
> > Declare Function MAPISendMail Lib "MAPI.DLL" Alias "BMAPISendMail" _
> >    (ByVal Session&, ByVal UIParam&, Message As MAPIMessage, Recipient _
> >    As MapiRecip, File As MapiFile, ByVal Flags&, ByVal Reserved&) As
Long
> >
> > if i declare another function from, for example kernel32, no problems!
The
> > problem appears when i try to use mapi.dll or mapi32.dll...TIA!
> >
> >
> > --
> > Good day to you!
> > www.illusion.qc.ca
> >
> >
>
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads