PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Getting info from pocket outlook using Embedded visual tools

Okay so I am trying to use eVC++ ppc2002 edition to get information from pocket outlook, currenlty from the msdn site i found a code example to get the current version, so this is al i wanted to get up and running but I am getting a unresolved external symbol CLSID_Application and unresolved external symbol IID_IPOutlookApp and i thought it was because I had no pimstore.lib (i have pimstore.h but no pimstore.lib) and so someone was nice enough to email me the lib file, and i still get the same errors...

So here is the code if anyone has any ideas at all id love them for it. Thanks


And i was getting the same linker before included pimstore.lib in the project settings and after..

So thank you to anyone who can help. The complete code follows from a eVC++ mfc app where the button click is supposed to just get the pocket out look version. Thank you.

Code:


#include "stdafx.h"
#include <windows.h>
#include <pimstore.h>
#include "OutlookTest.h"

#include "OutlookTestDlg.h"
...
...
...


//OutlookTestDlg.cpp

void COutlookTestDlg::OnButton1()
{
// TODO: Add your control notification handler code here
HRESULT hr;
IPOutlookApp *polApp;

BSTR pwszError = NULL;

if (FAILED(CoInitializeEx(NULL, 0)))
{
//MessageBox(NULL, pwszError, TEXT("POOM VERSION"), MB_SETFOREGROUND | MB_OK);
}

hr=CoCreateInstance(CLSID_Application, NULL, CLSCTX_INPROC_SERVER, IID_IPOutlookApp, (LPVOID *)&polApp;);

if(FAILED(hr))
{
//MessageBox(NULL, "Create Error");
}

hr=polApp->Logon(NULL);

if(FAILED(hr))
{
//MessageBox(NULL, "Logon Error");
}


BSTR pwszVersion = NULL;
polApp->get_Version(&pwszVersion;);

MessageBox(pwszVersion, TEXT("POOM VERSION"), MB_SETFOREGROUND | MB_OK);

SysFreeString(pwszVersion);

polApp->Logoff();
polApp->Release();

}



Thank you for any help
-Shane
I copy and pasted your code into a function in a workspace I have. It doesn't use MFC dialogs, or the precompiled headers.

First attempt, I got the same link errors you mentioned.

Then I added this

#include <initguid.h>

after the windows.h and before the pimstore.h (if that matters).

It linked and ran - I've got version 3.00.0126 apparently.

That include is normally in the stdafx header.