Index: /trunk/include/cf_file.h
===================================================================
--- /trunk/include/cf_file.h	(revision 4)
+++ /trunk/include/cf_file.h	(revision 5)
@@ -7,13 +7,4 @@
 #include "cf_base.h"
 #include <fcntl.h>
-
-#ifdef _WIN32
-# define O_RDONLY		_O_RDONLY	| _O_BINARY
-# define O_WRONLY		_O_WRONLY	| _O_BINARY
-# define O_RDWR			_O_RDWR		| _O_BINARY
-# define O_APPEND		_O_APPEND	| _O_BINARY
-# define O_CREAT		_O_CREAT	| _O_BINARY
-# define O_TRUNC		_O_TRUNC
-#endif // #ifdef _WIN32
 
 #define CF_ERROR_FILE					CF_ERROR_BASE * 2
Index: /trunk/include/cf_thread.h
===================================================================
--- /trunk/include/cf_thread.h	(revision 4)
+++ /trunk/include/cf_thread.h	(revision 5)
@@ -9,5 +9,5 @@
 #ifdef _WIN32
 //# include <stddef.h>
-# define CF_THREAD_RETURN	uintptr_t
+# define CF_THREAD_RETURN	unsigned int
 # define CF_THREAD_CALL		__stdcall
 #else // #ifdef _WIN32
@@ -16,5 +16,5 @@
 #endif // #ifdef _WIN32
 
-#define CF_THREAD_FUNCTION	CF_THREAD_RETURN CF_THREAD_CALL
+typedef CF_THREAD_RETURN  (CF_THREAD_CALL * CF_Thread_Function) (void *);
 
 #define CF_ERROR_THREAD					CF_ERROR_BASE * 4
@@ -35,5 +35,5 @@
 CF_EXPORT int
 CF_Thread_Create	(CF_Thread			* threadID,
-					 CF_THREAD_RETURN	callback,
+					 CF_Thread_Function	callback,
 					 void				* arg);
 
Index: /trunk/src/cf_file.c
===================================================================
--- /trunk/src/cf_file.c	(revision 4)
+++ /trunk/src/cf_file.c	(revision 5)
@@ -6,4 +6,5 @@
 #ifdef _WIN32
 # include <io.h>
+# include <stdio.h>
 #else // #ifdef _WIN32
 # include <unistd.h>
Index: /trunk/src/cf_socket.c
===================================================================
--- /trunk/src/cf_socket.c	(revision 4)
+++ /trunk/src/cf_socket.c	(revision 5)
@@ -7,4 +7,7 @@
 #ifdef _WIN32
 # include <WinSock2.h>
+# pragma comment (lib, "ws2_32.lib")
+# define close(__sock)	closesocket(__sock)
+# define sa_family_t	unsigned short
 #else
 # include <netinet/in.h>
@@ -74,10 +77,5 @@
 	CHECK_INVALID_SOCKET (sock);
 
-	result = /* continued */
-#ifdef _WIN32
-		closesocket (socket);
-#else
-		close (sock);
-#endif
+	result = close (sock);
 
 	if (result != 0)
@@ -143,16 +141,16 @@
 	int result = 0;
 
-	CHECK_INVALID_SOCKET (sock);
-
-	if (timeout < 0)
-		return CF_ERROR_SOCKET_INVALID_ARGS;
-
-#ifndef _WIN32
+#ifdef _WIN32
+	int time_ms = timeout * 1000;
+#else
 	struct timeval	timeval;
 	timeval.tv_sec = timeout;
 	timeval.tv_usec= 0;
-#else
-	int				time_ms = timeout * 1000;
-#endif
+#endif
+
+	CHECK_INVALID_SOCKET (sock);
+
+	if (timeout < 0)
+		return CF_ERROR_SOCKET_INVALID_ARGS;
 
 	result = CF_Socket_SetOption (sock,
Index: /trunk/src/cf_thread.c
===================================================================
--- /trunk/src/cf_thread.c	(revision 4)
+++ /trunk/src/cf_thread.c	(revision 5)
@@ -39,7 +39,7 @@
 
 int
-CF_Thread_Create (CF_Thread			* threadID,
-				  CF_THREAD_RETURN	callback,
-				  void				* arg)
+CF_Thread_Create (CF_Thread				* threadID,
+				  CF_Thread_Function	callback,
+				  void					* arg)
 {
 	int result = 0;
@@ -86,5 +86,5 @@
 
 #ifdef _WIN32
-	WaitForSingleObject ((THREAD_TYPE) *threaID, INFINITE);
+	WaitForSingleObject ((THREAD_TYPE) *threadID, INFINITE);
 #else
 	int status;
Index: /trunk/windows/libCF.sln
===================================================================
--- /trunk/windows/libCF.sln	(revision 5)
+++ /trunk/windows/libCF.sln	(revision 5)
@@ -0,0 +1,20 @@
+﻿
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCF", "libCF/libCF.vcproj", "{E5FB2D95-3841-464C-B23F-94ADA4499FE6}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{E5FB2D95-3841-464C-B23F-94ADA4499FE6}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E5FB2D95-3841-464C-B23F-94ADA4499FE6}.Debug|Win32.Build.0 = Debug|Win32
+		{E5FB2D95-3841-464C-B23F-94ADA4499FE6}.Release|Win32.ActiveCfg = Release|Win32
+		{E5FB2D95-3841-464C-B23F-94ADA4499FE6}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
Index: /trunk/windows/libCF/libCF.vcproj
===================================================================
--- /trunk/windows/libCF/libCF.vcproj	(revision 5)
+++ /trunk/windows/libCF/libCF.vcproj	(revision 5)
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="ks_c_5601-1987"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9.00"
+	Name="libCF"
+	ProjectGUID="{E5FB2D95-3841-464C-B23F-94ADA4499FE6}"
+	RootNamespace="libCF"
+	Keyword="Win32Proj"
+	TargetFrameworkVersion="196613"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBCF_EXPORTS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="4"
+				DisableSpecificWarnings="4996"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="2"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				EnableIntrinsicFunctions="true"
+				AdditionalIncludeDirectories="..\..\include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBCF_EXPORTS"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+				DisableSpecificWarnings="4996"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="1"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="¼Ò½º ÆÄÀÏ"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\..\src\cf_file.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\cf_local.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\cf_socket.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\cf_thread.c"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Çì´õ ÆÄÀÏ"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\..\include\cf_base.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\cf_file.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\cf_socket.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\cf_thread.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="¸®¼Ò½º ÆÄÀÏ"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+			<File
+				RelativePath="..\..\src\makefile"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
