Re: Using MAPI to send MMS: Link Errror

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi,
no response/luck so far but i went to Project | Properties | Linker |
Input and added mapi.lib to Additional dependencies
now i get another error
Error 1 fatal error LNK1136: invalid or corrupt file c:\Documents and
Settings\marabo\My Documents\Visual Studio
2005\Projects\SendMMS\SendMMS\mapi.lib 1

any other parameters i need to specify? where do i specify the path to
mapi.lib?
i even tried specifying the path to mapi.lib as (under Additional
dependencies)
"C:\Program Files\Microsoft Visual Studio
8\VC\PlatformSDK\Lib\mapi.lib"
but that didnt work either

my question is, is this lib compiled for desktop? where i can get the
mapi library that is for windows mobile smartphone 5.0?

any help ?
Regards
Mo



Mo wrote:
Hello again
i understand that i might need to add a refrenece to the MAPI library
(as i ve seen from similar posts) but i am using VS 2005, my project is
VC++ Smart Device, Win32 Smart Device Project and there is no
project->settings->link tab....... :-(

Any idea?
Thanks


Mo wrote:
Hello All,
I am using VS 2005 to create a win32 app that sends MMS messages
i have the right header files included in my code
#include "cemapi.h"
#include "mapix.h"
#include "MAPIUTIL.H"
#include "MAPIGuid.h"

but i am getting these link error messages
Error 1 error LNK2019: unresolved external symbol MAPILogonEx
referenced in function "void __cdecl InitMAPI(void)"
(?InitMAPI@@YAXXZ) MMS.obj

Error 2 error LNK2019: unresolved external symbol MAPIInitialize
referenced in function "void __cdecl InitMAPI(void)"
(?InitMAPI@@YAXXZ) MMS.obj

I am confused, i tought the header files should include these two
functions (MAPILogonEx, MAPIInitialize) what else do i need to add?

Regards
Mo

below is my code
<code>
HRESULT hr;
ICEMAPISession * pSession = NULL;

hr = MAPIInitialize(NULL);
if (hr != S_OK) {
// MAPIInitialize failed.
MessageBox(NULL,
_T("MAPIInitialize failed."),
_T("Warning"),
MB_OK);
exit(0); // Replace with specific error handling.
}

hr = MAPILogonEx(0, NULL, NULL, 0, (LPMAPISESSION *)&pSession);
if (hr != S_OK) {
// MAPILogonEx failed.
MessageBox(NULL,
_T("MAPILogonEx failed."),
_T("Warning"),
MB_OK);
exit(0); // Replace with specific error handling.
}
</code>

.



Relevant Pages

  • Re: Using MAPI to send MMS: Link Errror
    ... any other parameters i need to specify? ... but i am getting these link error messages ... i tought the header files should include these two ... // Replace with specific error handling. ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: [PATCH] make miniconfig (take 2)
    ... that symbols can be set by dependencies, ... miniconfig is an action changing the default state. ... So really a miniconfig can't specify an inconsistent state, ... I suspect there are guard symbols that are also ...
    (Linux-Kernel)
  • Re: Attach event/function to links within span tag
    ... >> Michael Winter wrote: ... > short notation and removes any dependencies on the color ... > That seems to make it rather clear that #00f and #0000ff specify the ... > onload attribute or the onload property? ...
    (comp.lang.javascript)
  • Re: Unix and OO Avoidance
    ... > of commercial UNIX system code is, well, to put it bluntly, very crappy. ... > once before in a thread about header files how one might manage header files ... UNIX may be less than convincing as an example of good non-OO style. ... Did the parts actually need such dependencies, ...
    (comp.object)
  • Re: Header inclusion question
    ... > I've got a question concerning inclusion of .hpp files. ... > including all needed header files in the .cpp file. ... > dependencies of the package and all dependencies of these dependencies ...
    (comp.lang.cpp)