error LNK2001: unresolved external symbol IID_IPOutlookApp
Hi,
I have ported one class from .NET into standard C++ but I have issues
with some constant.
My class is defined lke this :
#ifndef _SYSTEMWINDOWSMOBILEPOCKETOUTLOOK_H
#define _SYSTEMWINDOWSMOBILEPOCKETOUTLOOK_H
#include "System.h"
#include <objbase.h>
#include <pimstore.h>
namespace System{
namespace WindowsMobile{
namespace PocketOutlook{
class PimItem;
class Contact;
class Appointment;
class PimItemCollection;
class ContactCollection;
class Folder;
class ContactFolder;
class OutlookSession;
...
class OutlookSession
{
public:
friend class Folder;
friend class ContactCollection;
friend class TaskCollection;
OutlookSession();
~OutlookSession();
bool get_IsLoggedIn() {return m_bLoggedIn; }
//AppointmentFolder* get_Appointments();
ContactFolder* get_Contacts();
//EmailAccountCollection* get_EmailAccounts();
//SmsAccount* get_SmsAccount();
TaskFolder* get_Tasks();
protected:
bool m_bLoggedIn;
IPOutlookAppPtr m_pPOOMApp;
Folder* m_pAppointmentFolder;
Folder* m_pContactFolder;
Folder* m_pTaskFolder;
};
} // PocketOutlook
} // WindowsMobile
} // System
#endif //_SYSTEMWINDOWSMOBILEPOCKETOUTLOOK_H
and inside my cpp :
OutlookSession::OutlookSession()
:m_bLoggedIn(false),
m_pAppointmentFolder(NULL),
m_pContactFolder(NULL),
m_pTaskFolder(NULL)
{
HRESULT hr = 0;
CLSID clsid;
LPOLESTR pProgID = L"PocketOutlook.Application";
hr = ::CoInitializeEx(NULL, 0);
hr = ::CLSIDFromProgID(pProgID,&clsid);
IPOutlookApp* l_pIOutlookApp;
hr = ::CoCreateInstance(clsid, 0, CLSCTX_INPROC_SERVER,
IID_IPOutlookApp, reinterpret_cast<void **>(&l_pIOutlookApp));
if ( SUCCEEDED(hr) )
{
if(SUCCEEDED(m_pPOOMApp->Logon(NULL)))
{
m_bLoggedIn = true;
}
}
}
I GET the error : error LNK2001: unresolved external symbol IID_IPOutlookApp
while this symbol is defined in pimstore.h as :
EXTERN_C const GUID FAR IPOutlookApp;(GUID is a struct)
I don't understand why it cannot find it?????????