#include once "window9.bi"

Function Create_File(ByRef sFileName As USTRING, ByVal PAR As Integer) As HANDLE Export
	if len(sFileName) = 0 then return cast(HANDLE, -1)
	#ifdef UNICODE
		Var hFile = CreateFile(*sFileName, GENERIC_WRITE Or GENERIC_READ, FILE_SHARE_READ or FILE_SHARE_WRITE,0, CREATE_ALWAYS, par,0)
	#else	
		Var hFile = CreateFile(sFileName, GENERIC_WRITE Or GENERIC_READ, FILE_SHARE_READ or FILE_SHARE_WRITE,0, CREATE_ALWAYS, par,0)
	#EndIf
	Return hFile
End Function
