Index: /trunk/src/cf_debug.c
===================================================================
--- /trunk/src/cf_debug.c	(revision 54)
+++ /trunk/src/cf_debug.c	(revision 55)
@@ -22,5 +22,5 @@
 #define IS_READABLE_CHAR(__c)		(' ' <= __c && __c <= '~')
 
-#define CHECK_INVALID_CTX(__ctx)			\
+#define ASSERT_CTX(__ctx)					\
 	if (__ctx == NULL)						\
 		return CF_ERROR_DEBUG_INVALID_CTX
@@ -82,5 +82,5 @@
 	CF_DEBUG_CTX * context = (CF_DEBUG_CTX *) ctx;
 
-	CHECK_INVALID_CTX (ctx);
+	ASSERT_CTX (ctx);
 
 	strncpy (context->file, file, strlen (file));
@@ -156,5 +156,5 @@
 	CF_DEBUG_CALLSTACK	* next = NULL;
 
-	CHECK_INVALID_CTX (ctx);
+	ASSERT_CTX (ctx);
 
 	if (context->fp != NULL)
@@ -297,5 +297,5 @@
 	CF_DEBUG_CALLSTACK	* push = NULL;
 
-	CHECK_INVALID_CTX (ctx);
+	ASSERT_CTX (ctx);
 
 	push = (CF_DEBUG_CALLSTACK *) calloc (sizeof (CF_DEBUG_CALLSTACK), 1);
@@ -366,5 +366,5 @@
 	CF_DEBUG_CALLSTACK	* pop = NULL;
 
-	CHECK_INVALID_CTX (ctx);
+	ASSERT_CTX (ctx);
 
 	pop = context->callstack.caller;
Index: /trunk/src/cf_file.c
===================================================================
--- /trunk/src/cf_file.c	(revision 54)
+++ /trunk/src/cf_file.c	(revision 55)
@@ -13,8 +13,10 @@
 #if defined(_WIN32) || defined(_WIN64)
 # include <io.h>
+# include <direct.h>
 
 # define DELIMITER		'\\'
 # define mkdir(a,b)		_mkdir (a)
 # define access(a,b)	_access (a,b)
+# define snprintf		_snprintf
 
 # define F_OK			0
@@ -46,4 +48,8 @@
 #define FILE_MODE		S_IWUSR|S_IRUSR|S_IRGRP|S_IROTH
 
+#define ASSERT_ARGS(x)					\
+	if ((x))							\
+		return CF_ERROR_FILE_INVALID_ARGS
+
 /**
  * 파일 열기
@@ -60,5 +66,9 @@
 			  const CF_FILE_FLAG	flag)
 {
-	int result = open (path, (int)(flag|O_BINARY));
+	int result = 0;
+
+	ASSERT_ARGS (path == NULL);
+
+	result = open (path, (int)(flag|O_BINARY));
 
 	if (result < 0)
@@ -78,5 +88,9 @@
 CF_File_Create (const char * path)
 {
-	int result = open (path, CF_FILE_CR|CF_FILE_WO|CF_FILE_TR, FILE_MODE);
+	int result = 0;
+	
+	ASSERT_ARGS (path == NULL);
+
+	result = open (path, CF_FILE_CR|CF_FILE_WO|CF_FILE_TR, FILE_MODE);
 
 	if (result < 0)
@@ -98,6 +112,5 @@
 	int result = 0;
 
-	if (fd < 0)
-		return CF_ERROR_FILE_INVALID_ARGS;
+	ASSERT_ARGS (fd < 0);
 
 	result = close (fd);
@@ -123,5 +136,10 @@
 			  const size_t	len)
 {
-	int result = (int) read (fd, buf, len);
+	int result = 0;
+	
+	ASSERT_ARGS (fd < 0);
+	ASSERT_ARGS (buf == NULL);
+
+	result = (int) read (fd, buf, len);
 
 	if (result < 0)
@@ -145,5 +163,10 @@
 			   const size_t	len)
 {
-	int result = (int) write (fd, buf, len);
+	int result = 0;
+	
+	ASSERT_ARGS (fd < 0);
+	ASSERT_ARGS (buf == NULL);
+
+	(int) write (fd, buf, len);
 
 	if (result != len)
@@ -163,5 +186,9 @@
 CF_File_GetSize (const int fd)
 {
-	int result = (int) lseek (fd, 0, SEEK_END);
+	int result = 0;
+
+	ASSERT_ARGS (fd < 0);
+
+	(int) lseek (fd, 0, SEEK_END);
 
 	if (result < 0 || lseek (fd, 0, SEEK_SET) < 0)
@@ -187,4 +214,6 @@
 	char	* f = fullPath;
 	char	* d = stepPath;
+
+	ASSERT_ARGS (path == NULL);
 
 	snprintf (fullPath, sizeof (fullPath) - 1, "%s%c", path, DELIMITER);
Index: /trunk/src/cf_log.c
===================================================================
--- /trunk/src/cf_log.c	(revision 54)
+++ /trunk/src/cf_log.c	(revision 55)
@@ -27,11 +27,11 @@
 #endif
 
-#define CHECK_INVALID_CTX(__ctx)		(__ctx == NULL)
+#define ASSERT_CTX(__ctx)				(__ctx == NULL)
 #define LOCK_LOG_CTX(__ctx)				CF_Mutex_Lock (&__ctx->mutex)
 #define UNLOCK_LOG_CTX(__ctx)			CF_Mutex_Unlock (&__ctx->mutex)
 #define CHECK_INITIALIZED()				(gLogArray.ctxPool == NULL||	\
 										 gLogArray.ctxSize <= 0	)
-#define CHECK_INVALID_MAPID(__mapid)	(gLogArray.ctxSize <= __mapid)
-#define CHECK_MAPPED_ID(__mapid)		(gLogArray.ctxPool[__mapid] != NULL)
+#define ASSERT_MAPID(__mapid)			(gLogArray.ctxSize <= __mapid)
+#define ASSERT_MAPPED_CTX(__mapid)		(gLogArray.ctxPool[__mapid] != NULL)
 
 #define LOG_BUFFER_DEFAULT_SIZE			128 * 1024
@@ -242,5 +242,5 @@
 	CF_LOG_CTX * context = (CF_LOG_CTX *) ctx;
 
-	if (CHECK_INVALID_CTX (ctx))
+	if (ASSERT_CTX (ctx))
 		return CF_ERROR_LOG_INVALID_CTX;
 
@@ -265,5 +265,5 @@
 	CF_LOG_CTX * context = (CF_LOG_CTX *) ctx;
 
-	if (CHECK_INVALID_CTX (ctx))
+	if (ASSERT_CTX (ctx))
 		return CF_ERROR_LOG_INVALID_CTX;
 
@@ -296,5 +296,5 @@
 	char		datetime[LOG_DATETIME_LENGTH + 1] = {0x00,};
 
-	if (CHECK_INVALID_CTX (ctx))
+	if (ASSERT_CTX (ctx))
 		return CF_ERROR_LOG_INVALID_CTX;
 
@@ -326,5 +326,5 @@
 	CF_LOG_CTX * context = (CF_LOG_CTX *) ctx;
 
-	if (CHECK_INVALID_CTX (ctx))
+	if (ASSERT_CTX (ctx))
 		return CF_ERROR_LOG_INVALID_CTX;
 
@@ -348,5 +348,5 @@
 	CF_LOG_CTX * context = (CF_LOG_CTX *) ctx;
 
-	if (CHECK_INVALID_CTX (ctx))
+	if (ASSERT_CTX (ctx))
 		return CF_ERROR_LOG_INVALID_CTX;
 
@@ -457,10 +457,10 @@
 			TRY_BREAK;
 		}
-		if (CHECK_INVALID_MAPID (mapid))
+		if (ASSERT_MAPID (mapid))
 		{
 			result = CF_ERROR_LOG_INVALID_MAPID;
 			TRY_BREAK;
 		}
-		if (CHECK_MAPPED_ID (mapid))
+		if (ASSERT_MAPPED_CTX (mapid))
 		{
 			result = CF_ERROR_LOG_ALREADY_MAPPED_ID;
@@ -495,7 +495,7 @@
 	if (CHECK_INITIALIZED ())
 		return CF_ERROR_LOG_NOT_INITIALIZE;
-	if (CHECK_INVALID_MAPID (mapid))
+	if (ASSERT_MAPID (mapid))
 		return CF_ERROR_LOG_INVALID_MAPID;
-	if (!CHECK_MAPPED_ID (mapid))
+	if (!ASSERT_MAPPED_CTX (mapid))
 		return CF_ERROR_LOG_NOT_MAPPED_ID;
 
@@ -522,7 +522,7 @@
 	if (CHECK_INITIALIZED ())
 		return CF_ERROR_LOG_NOT_INITIALIZE;
-	if (CHECK_INVALID_MAPID (mapid))
+	if (ASSERT_MAPID (mapid))
 		return CF_ERROR_LOG_INVALID_MAPID;
-	if (!CHECK_MAPPED_ID (mapid))
+	if (!ASSERT_MAPPED_CTX (mapid))
 		return CF_ERROR_LOG_NOT_MAPPED_ID;
 
Index: /trunk/src/cf_socket.c
===================================================================
--- /trunk/src/cf_socket.c	(revision 54)
+++ /trunk/src/cf_socket.c	(revision 55)
@@ -29,9 +29,9 @@
 #endif
 
-#define CHECK_SOCKET_INIT()					\
+#define ASSERT_INIT()						\
 	if (!CF_Socket_IsInitialized ())		\
 		return CF_ERROR_SOCKET_NOT_INITIALIZED 
 
-#define CHECK_INVALID_SOCKET(__sock)		\
+#define ASSERT_SOCKET(__sock)			\
 	if (__sock < 0)						\
 		return CF_ERROR_SOCKET_INVALID_SOCKET
@@ -169,5 +169,5 @@
 CF_Socket_Finalize (void)
 {
-	CHECK_SOCKET_INIT ();
+	ASSERT_INIT ();
 
 #if defined(_WIN32) || defined(_WIN64)
@@ -191,5 +191,5 @@
 	int result = 0;
 
-	CHECK_INVALID_SOCKET (sock);
+	ASSERT_SOCKET (sock);
 
 	result = close (sock);
@@ -219,5 +219,5 @@
 	int	result = 0;
 
-	CHECK_INVALID_SOCKET (sock);
+	ASSERT_SOCKET (sock);
 
 	result = setsockopt (sock,
@@ -254,5 +254,5 @@
 	int	result = 0;
 
-	CHECK_INVALID_SOCKET (sock);
+	ASSERT_SOCKET (sock);
 
 	result = getsockopt (sock,
@@ -313,5 +313,5 @@
 	fd_set				writefds;
 
-	CHECK_SOCKET_INIT ();
+	ASSERT_INIT ();
 
 	/* 1. create socket */
@@ -434,5 +434,5 @@
 	struct sockaddr_in	address;
 
-	CHECK_SOCKET_INIT ();
+	ASSERT_INIT ();
 
 	sock = socket (PF_INET, SOCK_STREAM, IPPROTO_TCP);
@@ -492,5 +492,5 @@
 	socklen_t			len = sizeof (address);
 
-	CHECK_INVALID_SOCKET (sock);
+	ASSERT_SOCKET (sock);
 
 	sockClient = accept (sock, (struct sockaddr *) &address, &len);
@@ -538,5 +538,5 @@
 	int result = 0;
 
-	CHECK_INVALID_SOCKET (sock);
+	ASSERT_SOCKET (sock);
 
 	result = (int) send (sock, buf, (size_t) len, 0);
@@ -584,5 +584,5 @@
 	int result = 0;
 
-	CHECK_INVALID_SOCKET (sock);
+	ASSERT_SOCKET (sock);
 
 	TRY
Index: /trunk/src/cf_thread.c
===================================================================
--- /trunk/src/cf_thread.c	(revision 54)
+++ /trunk/src/cf_thread.c	(revision 55)
@@ -21,9 +21,9 @@
 #endif // #if defined(_WIN32) || defined(_WIN64)
 
-#define CHECK_INVALID_THREAD(__h)		\
+#define ASSERT_THREAD(__h)				\
 	if (__h == NULL)					\
 		return CF_ERROR_THREAD_INVALID_ARGS
 
-#define CHECK_INVALID_MUTEX(__h)		\
+#define ASSERT_MUTEX(__h)				\
 	if (__h == NULL)					\
 		return CF_ERROR_MUTEX_INVALID_ARGS
@@ -86,5 +86,5 @@
 CF_Thread_Release (CF_Thread * threadID)
 {
-	CHECK_INVALID_THREAD (*threadID);
+	ASSERT_THREAD (*threadID);
 
 	CF_Thread_Local_Close (*threadID);
@@ -103,5 +103,5 @@
 CF_Thread_Join (CF_Thread * threadID)
 {
-	CHECK_INVALID_THREAD (*threadID);
+	ASSERT_THREAD (*threadID);
 
 #if defined(_WIN32) || defined(_WIN64)
@@ -156,5 +156,5 @@
 CF_Mutex_Destory (CF_Mutex * mutex)
 {
-	CHECK_INVALID_MUTEX (*mutex);
+	ASSERT_MUTEX (*mutex);
 
 	CF_Thread_Local_Close (*mutex);
@@ -173,5 +173,5 @@
 CF_Mutex_Lock (CF_Mutex * mutex)
 {
-	CHECK_INVALID_MUTEX (*mutex);
+	ASSERT_MUTEX (*mutex);
 
 #if defined(_WIN32) || defined(_WIN64)
@@ -194,5 +194,5 @@
 CF_Mutex_Unlock (CF_Mutex * mutex)
 {
-	CHECK_INVALID_MUTEX (*mutex);
+	ASSERT_MUTEX (*mutex);
 
 #if defined(_WIN32) || defined(_WIN64)
Index: /trunk/windows/libcf/libcf.vcproj
===================================================================
--- /trunk/windows/libcf/libcf.vcproj	(revision 54)
+++ /trunk/windows/libcf/libcf.vcproj	(revision 55)
@@ -214,4 +214,8 @@
 			</File>
 			<File
+				RelativePath="..\..\include\cf_error.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\include\cf_file.h"
 				>
