svnno****@sourc*****
svnno****@sourc*****
2010年 7月 17日 (土) 23:34:29 JST
Revision: 3944 http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=3944 Author: yutakapon Date: 2010-07-17 23:34:29 +0900 (Sat, 17 Jul 2010) Log Message: ----------- DDEéä¿¡ã®éãã¨ã©ã¼ãã§ãã¯ãè¡ãããã«ããã Modified Paths: -------------- trunk/teraterm/ttpmacro/ttmdde.c -------------- next part -------------- Modified: trunk/teraterm/ttpmacro/ttmdde.c =================================================================== --- trunk/teraterm/ttpmacro/ttmdde.c 2010-07-12 13:20:18 UTC (rev 3943) +++ trunk/teraterm/ttpmacro/ttmdde.c 2010-07-17 14:34:29 UTC (rev 3944) @@ -1012,6 +1012,7 @@ { HDDEDATA Data; PCHAR DataPtr; + int err; if (! Linked) { return ErrLinkFirst; @@ -1019,11 +1020,13 @@ SendCmnd(OpId,0); Data = DdeClientTransaction(NULL,0,ConvH,Item2,CF_OEMTEXT,XTYP_REQUEST,5000,NULL); - if (Data==0) { + err = DdeGetLastError(Inst); /* G[`FbNÇÁ (2010.7.17 yutaka) */ + if (Data==0 || err) { return 0; } DataPtr = (PCHAR)DdeAccessData(Data,NULL); - if (DataPtr!=NULL) { + err = DdeGetLastError(Inst); /* G[`FbNÇÁ (2010.7.17 yutaka) */ + if (DataPtr!=NULL && err == 0) { strncpy_s(Param,destlen,DataPtr,_TRUNCATE); DdeUnaccessData(Data); }