MAPI IID_IMessage is unresolved.

M

Mike M.

Visual C 6.0, Windows 2000, Outlook 2003. I am trying to QueryInterface()
on the MAPIOBJECT of a calendar item. When I link my program I get the
following error:
SelectEvents.obj : error LNK2001: unresolved external symbol _IID_IMessage


These are my includes:
#include "stdafx.h"

#define INITGUID
#include <objbase.h>
#define USES_IID_IMessage
#include <mapix.h>
#include <mapitags.h>
#include <mapidefs.h>
#include <mapiutil.h>
#include <mapiguid.h>
#include <imessage.h>

stdafx has altbase.h and the other standard windows include files in it.

This is the line in question:
hr = ptr_Mapi->QueryInterface(IID_IMessage, (void **)&lpIMsg);

What might I be missing to get this to link?

TIA
 
M

Mike M.

I also needed to have the includes in the "exact" correct order. I Googled
and found a post that helped out.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top