Debug/rr.exe : fatal error LNK1120: 1 unresolved externals
U cemu je problem ? :(
Molim vas, pomozite !
Code:
#include <windows.h>
#include <mapi.h>
LPMAPILOGON lpfnMAPILogon;
LPMAPISENDMAIL lpfnMAPISendMail;
LPMAPILOGOFF lpfnMAPILogoff;
MapiRecipDesc recipient =
{
0, MAPI_TO,
"da", "SMTP:[email protected]",
0, NULL
};
MapiMessage message =
{
0, "DataSmrt",
"Tekst\n",
NULL, NULL, NULL, 0, NULL, 1, &recipient, 0, NULL
};
void main(void)
{
LHANDLE lhSession;
HANDLE hMAPILib;
hMAPILib = LoadLibrary("MAPI32.DLL");
lpfnMAPILogon =
(LPMAPILOGON)GetProcAddress(hMAPILib, "MAPILogon");
lpfnMAPISendMail =
(LPMAPISENDMAIL)GetProcAddress(hMAPILib, "MAPISendMail");
lpfnMAPILogoff =
(LPMAPILOGOFF)GetProcAddress(hMAPILib, "MAPILogoff");
(*lpfnMAPISendMail)(lhSession, 0, &message, 0, 0);
(*lpfnMAPILogoff)(lhSession, 0, 0, 0);
FreeLibrary(hMAPILib);
}
#include <windows.h>
#include <mapi.h>
LPMAPILOGON lpfnMAPILogon;
LPMAPISENDMAIL lpfnMAPISendMail;
LPMAPILOGOFF lpfnMAPILogoff;
MapiRecipDesc recipient =
{
0, MAPI_TO,
"da", "SMTP:[email protected]",
0, NULL
};
MapiMessage message =
{
0, "DataSmrt",
"Tekst\n",
NULL, NULL, NULL, 0, NULL, 1, &recipient, 0, NULL
};
void main(void)
{
LHANDLE lhSession;
HANDLE hMAPILib;
hMAPILib = LoadLibrary("MAPI32.DLL");
lpfnMAPILogon =
(LPMAPILOGON)GetProcAddress(hMAPILib, "MAPILogon");
lpfnMAPISendMail =
(LPMAPISENDMAIL)GetProcAddress(hMAPILib, "MAPISendMail");
lpfnMAPILogoff =
(LPMAPILOGOFF)GetProcAddress(hMAPILib, "MAPILogoff");
(*lpfnMAPISendMail)(lhSession, 0, &message, 0, 0);
(*lpfnMAPILogoff)(lhSession, 0, 0, 0);
FreeLibrary(hMAPILib);
}