N
Hey zusammen
Ich habe es hingekriegt!
Als Handle muss man int(Application->Handle) benutzen:
Also hier der fertige Code:
#include <mapi.h>
void __fastcall TForm1::Button1Click(TObject *Sender)
{
const HINSTANCE hMAPILib = ::LoadLibrary("MAPI32.DLL");
if (hMAPILib)
{
typedef ULONG (FAR PASCAL *MAPIFUNC) (ULONG ulUIParam,LPTSTR lpszDelimChar,LPTSTR lpszFullPaths,LPTSTR lpszFileNames,ULONG ulReserved);
MAPIFUNC MAPISendDocuments = (MAPIFUNC) GetProcAddress(hMAPILib, "MAPISendDocuments");
if (MAPISendDocuments != NULL)
{
MAPISendDocuments(int(Application->Handle),";","C:\\test.html","test.html",NULL );
}
else
{
ShowMessage("Mapi function does not exist");
}
::FreeLibrary(hMAPILib);
}
else
{
ShowMessage("Mapi does not exist");
}
}
Danke für eure Denkanstösse!
Mit besten Grüssen
Andrin
YUUUUUUUUUUPPPPIIIIIIIIIII !!!!