Linker Error
-
Hi all I am using IImnAccountManager interface for outlook express email accounts. This interface requires imnact.h header file I downloaded this file from link http://ftp.teklynx.fr/online//31- IDEAM/PPCSDK2000/Program Files/INCLUDE/IMNACT.h I am writing this code
IImnAccountManager m_pImnAccountManager; //in header file m_pImnAccountManager = NULL; HRESULT hr = CoInitialize(0); if(FAILED(hr)) { MessageBox(_T("Error CoInitialize.")); } hr = CoCreateInstance(CLSID_ImnAccountManager, NULL, CLSCTX_SERVER, IID_IImnAccountManager, (LPVOID*) &m_pImnAccountManager); if(FAILED(hr)) { MessageBox(_T("Error creating OE Accounts.")); } hr = m_pImnAccountManager->Init(pAdviseMigrateServer); if(FAILED(hr)) { MessageBox(_T("Error initializing OE Accounts.")); m_pImnAccountManager->Release(); } m_MailList.ResetContent(); return TRUE; // return TRUE unless you set the focus to a control }
when I use this code then it gives errors /*------------------------------------------- Linking... OutlookAccountDlg.obj : error LNK2001: unresolved external symbol _CLSID_ImnAccountManager OutlookAccountDlg.obj : error LNK2001: unresolved external symbol _IID_IImnAccountManager Debug/OutlookAccount.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe. OutlookAccount.exe - 3 error(s), 0 warning(s) /*------------------------------------------------- Though I have included imnact.h file. Please suggest me. Thanks -
Hi all I am using IImnAccountManager interface for outlook express email accounts. This interface requires imnact.h header file I downloaded this file from link http://ftp.teklynx.fr/online//31- IDEAM/PPCSDK2000/Program Files/INCLUDE/IMNACT.h I am writing this code
IImnAccountManager m_pImnAccountManager; //in header file m_pImnAccountManager = NULL; HRESULT hr = CoInitialize(0); if(FAILED(hr)) { MessageBox(_T("Error CoInitialize.")); } hr = CoCreateInstance(CLSID_ImnAccountManager, NULL, CLSCTX_SERVER, IID_IImnAccountManager, (LPVOID*) &m_pImnAccountManager); if(FAILED(hr)) { MessageBox(_T("Error creating OE Accounts.")); } hr = m_pImnAccountManager->Init(pAdviseMigrateServer); if(FAILED(hr)) { MessageBox(_T("Error initializing OE Accounts.")); m_pImnAccountManager->Release(); } m_MailList.ResetContent(); return TRUE; // return TRUE unless you set the focus to a control }
when I use this code then it gives errors /*------------------------------------------- Linking... OutlookAccountDlg.obj : error LNK2001: unresolved external symbol _CLSID_ImnAccountManager OutlookAccountDlg.obj : error LNK2001: unresolved external symbol _IID_IImnAccountManager Debug/OutlookAccount.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe. OutlookAccount.exe - 3 error(s), 0 warning(s) /*------------------------------------------------- Though I have included imnact.h file. Please suggest me. Thanksrajeevktripathi wrote: _http://ftp.teklynx.fr/online//31- IDEAM/PPCSDK2000/Program Files/INCLUDE/IMNACT.h_ you forget to download corressponding _i.c and _p_c
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
-
Hi all I am using IImnAccountManager interface for outlook express email accounts. This interface requires imnact.h header file I downloaded this file from link http://ftp.teklynx.fr/online//31- IDEAM/PPCSDK2000/Program Files/INCLUDE/IMNACT.h I am writing this code
IImnAccountManager m_pImnAccountManager; //in header file m_pImnAccountManager = NULL; HRESULT hr = CoInitialize(0); if(FAILED(hr)) { MessageBox(_T("Error CoInitialize.")); } hr = CoCreateInstance(CLSID_ImnAccountManager, NULL, CLSCTX_SERVER, IID_IImnAccountManager, (LPVOID*) &m_pImnAccountManager); if(FAILED(hr)) { MessageBox(_T("Error creating OE Accounts.")); } hr = m_pImnAccountManager->Init(pAdviseMigrateServer); if(FAILED(hr)) { MessageBox(_T("Error initializing OE Accounts.")); m_pImnAccountManager->Release(); } m_MailList.ResetContent(); return TRUE; // return TRUE unless you set the focus to a control }
when I use this code then it gives errors /*------------------------------------------- Linking... OutlookAccountDlg.obj : error LNK2001: unresolved external symbol _CLSID_ImnAccountManager OutlookAccountDlg.obj : error LNK2001: unresolved external symbol _IID_IImnAccountManager Debug/OutlookAccount.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe. OutlookAccount.exe - 3 error(s), 0 warning(s) /*------------------------------------------------- Though I have included imnact.h file. Please suggest me. ThanksYou use the tlb or idl files to extract the objects information.. You can do this by using #import<..> " Action without vision is only passing time, Vision without action is merely day dreaming, But vision with action can change the world " - Words from Nelson Mandela Thanks & Regards, Gopalakrishnan