error LNK2001: unresolved external symbol _IID_IMessage

Often time, I encounter unresolved external symbol _IID_IMessage problem when I am trying to use IID_IMessage in my codes.


This is my solution to the problem, include and define in such sequence.


#define INITGUID
#define USES_IID_IMessage
#define USES_IID_IMAPIPropData
#define USES_IID_IMAPITable

#include <initguid.h> //this is needed,
#include <mapiguid.h> //then this
#include <mapiform.h>
#include <objbase.h>
#include <mapix.h>
#include <mapitags.h>
#include <mapidefs.h>
#include <mapiutil.h>
#include <imessage.h>

Comments

Cyde Weys said…
Thanks for the post, this successfully resolved my error, and in far less time than if I had tried to figure out this seemingly random order on my own.
griffin said…
thx1e+6 for this
Unknown said…
Thank you, I west a lot of time....

Popular posts from this blog

Outlook : "operation failed, object could not be found. " when trying to close a PST.

How to transfer app and data from old iPhone to new iPhone for model IOS17 and IOS18 above.

Tips on how to use IBM iNotes (web client) on emailing or scheduling - Like copy tables from Excel or checking for user id (windows logon id) through email address