Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Delphi Probleme mit MapiLogon (https://www.delphipraxis.net/116181-probleme-mit-mapilogon.html)

hav 24. Jun 2008 19:02


Probleme mit MapiLogon
 
Die Idee in diesem Thread http://www.delphipraxis.net/internal...ct.php?t=97038 wurde für den Einbau in einen eigenen E-Mailclient genutzt. Das Senden von Dateien, um diese als Attachments anzuhängen, funktioniert beispielsweise auch problemlos.
Mit einigen Anwendungen gibt es allerdings Probleme. Speziell in MAPILogon kommt es bei mehreren Anwendungen zu Fehlermeldungen.

In der Anwendung pdfFactory gibt es bereits eine Funktion, um das aktuelle Dokument als Anhang an den Standardemailclient zu senden (mit Outlook funktioniert es). Beim Aufruf erfolgt auch eine Verzweigung in meine mapi.dll. Dann kommt es allerdings zur Fehlermeldung "An error occurred in Windows (MAPILogon failed) return code 0".

Zu den Parametern, die für die MAPILogon-Methode gesetzt wurden: das Profil und das Passwort sind leer, flags auf MAPI_LOGON_UI or MAPI_NEW_SESSION
(Beschreibung der Funktion: http://msdn.microsoft.com/en-us/library/ms527586(EXCHG.10).aspx)

Bezüglich der leeren Felder für das Profil und das Passwort: aus Word heraus sind diese Parameter ebenfalls leer. Wenn man die Option wählt "Senden an -> E-Mailempfänger (zur Überarbeitung)" funktioniert es (inklusive des Durchlaufens der MAPILogon-Methode), bei "Senden an -> E-Mailempfänger (als Anlage)" kommt dagegen der bereits genannte Fehler mit "MAPILogon failed...".


Ich bin mir bewusst, dass das Problem wahrscheinlich zu speziell ist, aber eventuell mussten sich doch einige von euch mit den gleichen Problemen herumschlagen und können mir weiterhelfen.

Remko 24. Jun 2008 22:27

Re: Probleme mit MapiLogon
 
Are you sure that the application is calling MapiLogon and not MapiLogonEx?

hav 25. Jun 2008 09:14

Re: Probleme mit MapiLogon
 
Interesting point. But all I can say is that after I use the "send to..." function in the mentioned applications, then my MapiLogon method
(declared as: function MAPILogon(ulUIParam: Cardinal; lpszProfileName: LPSTR; lpszPassword: LPSTR; flFlags: FLAGS; ulReserved: Cardinal; lplhSession: PLHANDLE): Cardinal; stdcall;) is called. I don't have the knowledge whether this means that the MapiLonEx function could still be called as well or not.
There are other applications where the "send to" function does not result in calling my MapiLogon method but so far there are no problems in these cases.

I use the unit Mapi that is prefaced with the comment "Simple MAPI Interface Unit" and therefore I currently couldn't check whether MapiLogonEx is called.


Alle Zeitangaben in WEZ +1. Es ist jetzt 08:40 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz