bool r = false;
if ( hszDat ){
HDDEDATA hdata = DdeClientTransaction( (LPBYTE)hszDat, (DWORD)-1, (HCONV)dde->Conv, hszItem,
- dde->DdeFmt, XTYP_POKE, 10000, NULL);
- r = hdata ? true : false;
+ dde->DdeFmt, XTYP_POKE, 10000, NULL);
+ if (hdata || DdeGetLastError(ddeMgr->DdeInstId) != DMLERR_NO_ERROR){
+ r = true;
+ if (hdata)
+ DdeFreeDataHandle( hdata );
+ }
}
- DdeFreeStringHandle (ddeMgr->DdeInstId, hszItem);
+ DdeFreeStringHandle(ddeMgr->DdeInstId, hszItem);
return r;
#endif
}
bool r = false;
if ( hszDat ){
HDDEDATA hdata = DdeClientTransaction( (LPBYTE)hszDat, (DWORD)-1, (HCONV)dde->Conv, hszItem,
- ddeFmt, XTYP_POKE, 10000, NULL);
- r = hdata ? true : false;
+ ddeFmt, XTYP_POKE, 10000, NULL);
+ if (hdata || DdeGetLastError(ddeMgr->DdeInstId) != DMLERR_NO_ERROR){
+ r = true;
+ if (hdata)
+ DdeFreeDataHandle( hdata );
+ }
+ }
}
DdeFreeStringHandle (ddeMgr->DdeInstId, hszItem);
return r;