Fail to load SAPI or ContactsDMenuRes.dll !

M

MeYouhana

I am using IContact interface to dosplau a contact summary through a
call to Display() method.
after open the contact summary dialog the Menu items has ... in place
of "Add Voice Tag" and when click on it I got a messagebox with "Fail
to load SAPI or ContactsDMenuRes.dll !"

any help?


HRESULT hr;
IPOutlookApp *polApp =NULL;

//Now, get the main application
hr = CoCreateInstance(CLSID_Application, NULL,
CLSCTX_INPROC_SERVER,IID_IPOutlookApp, (LPVOID *)&polApp);
if (FAILED(hr))
{
return FALSE;
}
//Log on to Pocket Outlook
hr = polApp->Logon(NULL);
if (FAILED(hr))
{
polApp->Release();
return FALSE;
}
IContact *pCntct;
//get contact
hr = polApp->GetItemFromOid(Oid, (IDispatch**)&pCntct);
if (FAILED(hr))
{
polApp->Logoff();
polApp->Release();
return FALSE;
}
pCntct->Display();
//Finally, log off and release the Application object
polApp->Logoff();

//Release
pCntct->Release();
polApp->Release();

//setflag
//m_fDataChanged = true;
return TRUE;
 
P

Peter Foot [MVP]

Do you have Microsoft Voice Command installed or have you ever installed it
and removed it from the device?

Peter
 
G

Guest

Probably a silly question, but did you call CoInitialize before creating the
object with CoCreateInstance?

Rick D.
Contractor
 

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