Originally Posted by ukdtom
|
Please post some code lines
--
Tommy Mikkelsen
IT Quality A/S, Denmark
Novell Support Forums SYSOP / NKP
Sorry, but no support through email
Please join Open-Horizons - Home
|
Its my function for executing token commands.
CString execute(CString comand){
CString rez= L"";
if (pIGWCommander) {
BSTR bsCommand= ::SysAllocString(comand);
try {
VARIANT_BOOL bResult;
BSTR bstrResult;
if (pIGWCommander->Execute(bsCommand, &bstrResult, &bResult) == S_OK) {
bResult ? rez.SetString(bstrResult) : rez= L"";
if (bResult && !wcscmp(rez, L""))
rez= L"OK";
::SysFreeString(bstrResult);
}
} catch (...) {}
::SysFreeString(bsCommand);
}
return rez;
}
And if I for examlpe use such tokens as itemAttachmentGetCount,
itemAttachmentGetDisplayName not for newly created message and for any message its at end generate an exception
CString itemAttachmentGetDisplayName(CString mid, long pos){
CString rez;
rez.Format(L"%d", pos);
return execute(L"ItemAttachmentGetDisplayName(\"" + mid + L"\";" + rez + L")");
}
Using some like this
bool result= false;
CString wsId= getExecutor()->itemMessageIDFromView();
if (!wcscmp(wsId, X00)){
CString wstempName;
int iCount= getExecutor()->itemAttachmentGetCount(X00);
for (int i= 0; i < iCount; i++){
if ( wcscmp((wstempName= getExecutor()->itemAttachmentGetDisplayName(X00, i)), L"")) {
if (NOSUPPORT != CheckFileFormat(wstempName)){
result= true;
break;
}
}
}
At run time, all is well.
And also, when I update my groupwise to 7.03 version exception not generate... Is this a problem of groupwise an older versions?
Can I go this way if my project must be compatible with older versions of groupwise?