ÆÄÀÏ¿¡ ÁöÁ¤ÇÑ size¸¸Å bufÀÇ ³»¿ëÀ» ±â·ÏÇÑ´Ù.
WORD FileWrite(DWORD handle, char *buf, WORD size);
ÇÔ¼öÀÎÀÚ
handle - FileOpen À̳ª FileOpenLPT ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© ¾òÀº ÆÄÀÏ ÀÎ½Ä ID
buf - ÆÄÀÏ¿¡ ±â·ÏÇÒ ³»¿ë
size - ÆÄÀÏ¿¡ ±â·ÏÇÒ Å©±â. (9.3.7 ºÎÅÍ´Â size¸¦ -1À» »ç¿ëÇϸé ÀúÀåÇÒ Å©±â¸¦ ÀÚµ¿À¸·Î °áÁ¤ÇÑ´Ù.)
return °ª
¾²±â°¡ ¼º°øÀûÀ¸·Î ³¡³ª¸é return°ªÀº ±â·ÏÇÑ Å©±â ¸¸ÅÀÌ µ¹¾Æ¿Â´Ù.
¿¹Á¦1
handle = @FileOpen("C:\\EX.TXT", "a");
if(handle != 0) {
@FileWrite(handle, "example data\r\n", 14);
@FileClose(handle);
}
¹®Àå¼³¸í : C:\\EX.TXT ÆÄÀÏÀ» ¿¾î¼ "example data"¶ó´Â µ¥ÀÌÅ͸¦ ±â·ÏÇÑ µÚ ÆÄÀÏÀ» ´Ý´Â´Ù.