We use c3po as an interface from a groupwise mail message to one of our
applications.

With Groupwise 6.0 everything worked fine but with 7.0 it does not.

When opening a mail message and asking for the IGWMessage via
get_CommandMessage it works.

But when opening an attached mail message (via an earlier opened mail) it
does not, I do not get the IGWMessage but error -2147467259!

Can you please check this out and give a hint/solution?

Code snippet:

IDispatch* pDP = NULL;
IGWClientState* pCS = NULL;
IGWMessage* pMsg = NULL;
HRESULT hr;
USES_CONVERSION;
hr = m_pIMgr->get_ClientState(&pDP);
if(FAILED(hr))
{
::MessageBox(NULL,"failed 1","",MB_OK);
return hr;
}

hr = pDP->QueryInterface(IID_IClientState,(void**)&pCS);
if(FAILED(hr) || !pCS)
{
::MessageBox(NULL,"failed 2","",MB_OK);
return hr;
}

hr = pCS->get_SelectedMessages(&pDP);
if(FAILED(hr) || !pDP)
{
::MessageBox(NULL,"upload!","Alert!",MB_OK);

if(pDP)
pDP->Release();

return NOERROR;
}

IGWMessageList* pML = NULL;
hr = pDP->QueryInterface(IID_IGWMessageList,(void**)&pML) ;
if(FAILED(hr) )
{
::MessageBox(NULL,"failed 4","",MB_OK);
return hr;
}

pML->get_Count(&count);

char buf[32];
ltoa(count,buf,10);

if(count == 0)
{
hr = pCS->get_CommandMessage(&pDP);

if(FAILED(hr) || !pDP)
{
::MessageBox(NULL,"upload!","Alert!",MB_OK);

if(pDP)
pDP->Release();

return NOERROR;
}
}