#include once "window9.bi"

#ifdef UNICODE
Function Read_Character (ByVal H As HANDLE) As USTRING Export
	Dim shBuf As Short
	Dim iRetBytes As ulong
	ReadFile(H, @shBuf,2,Cast(LPDWORD,@iRetBytes),0)
	dim as USTRING sRet = WChr(shBuf)
	Return sRet
End Function	
#else	
Function Read_Character (ByVal H As HANDLE) As USTRING Export
	Dim shBuf As Short
	Dim iRetBytes As ulong
	ReadFile(H, @shBuf,1,Cast(LPDWORD,@iRetBytes),0)
	Return Chr(shBuf)
End Function	
#EndIf

