/*¤´»²¹Í(»ØÄꥹ¥¯¥ê¥×¥È¤Î³Æ°ÌÃ֤˲¼µ¤òÄɲ乤ë):½¤Àµ
½ªÎ»»þ¤ËÆâÍƤòÊݸ¤·¤Æ¼Â¹Ô»þ¤ËÆɤ߹þ¤àÆ°ºî¤ËÀ®¤ë¥Ï¥º¤Ç¤¹¡£
¡Ê ¥³¡¼¥ë¥Ð¥Ã¥¯¤Î¥Ð¥¤¥Ê¥ê¡¼Éôʬ¤Ï½ÅÊ£¤·¤Æ¤¤¤Þ¤¹¤¬Æ±¤¸¤â¤Î¤Ç¤¹
¥â¥¸¥å¡¼¥ë¤ËÁȤßÂؤ¨¤ëºÝŬÅö¤Ë½èÍý¤·¤Æ²¼¤µ¤¤¡Ë
*/
;¡stop :ºÇ½ª¹Ô¤Î²¼¤Ë²¼µ¤òÄɲ乤롣
#deffunc xxx_Save int p1,str p2,int p3,local ii,local jj,local ww,local nn,local bb
bb = $0424448B,$74FF006A,$74FF1424,$74FF1424,$30FF1424,$F70450FF,$40C01BD8,$000010C2
dupptr ww,libptr(WriteFile)+24,4
CreateFileA p2,$40000000,0,0,$2,$80,0 :ii = stat
if (ii == -1) {return -1} :jj = ii,ww
nn = varptr(jj),0,varptr(bb)
sendmsg p1,$44A,limit(p3+1,1,2),varptr(nn)
CloseHandle ii
return nn
#deffunc xxx_Load int p1,str p2,int p3,local ii,local jj,local rr,local nn,local bb
bb = $0424448B,$74FF006A,$74FF1424,$74FF1424,$30FF1424,$F70450FF,$40C01BD8,$000010C2
dupptr rr,libptr(ReadFile )+24,4
CreateFileA p2,$80000000,0,0,$3,$80,0 :ii = stat
if (ii == -1) {return -1} :jj = ii,rr
nn = varptr(jj),0,varptr(bb)
sendmsg p1,$449,limit(p3+1,1,2),varptr(nn)
CloseHandle ii
return nn
;¢
;*exit :¹Ô¤Î²¼¤Ë²¼µ¤òÄɲ乤ë
;xxx_Save hwnd_re,"test.rtf",1
;£
;dim cf2,21 // CHARFORMAT2¹½Â¤ÂÎ:¹Ô¤Î²¼¤Ë²¼µ¤òÄɲ乤ë
;xxx_Load hwnd_re,"test.rtf",1