Quote Originally Posted by xxdoc123 View Post
thanks,Your code is great

I made a little modification as per my needs

Code:
Private Declare Function WriteFile _
                Lib "kernel32" (ByVal hFile As Long, _
                                ByVal lpBuf As Long, _
                                ByVal cToWrite As Long, _
                                ByRef cWritten As Long, _
                                ByVal lpOverlapped As Any) As Long

Public Function WriteInput(sValue As String) As Boolean
    Dim lWritten As Long
    
    Dim BtTest() As Byte
    Dim Buflen   As Long

    BtTest = StrConv(sValue, vbFromUnicode)
    Buflen = UBound(BtTest) + 1
    
    If m_hWriteInput <> 0 Then
         
        If WriteFile(m_hWriteInput, StrPtr(BtTest), Buflen, lWritten, 0&) <> 0 Then
            Call FlushFileBuffers(m_hWriteInput)
            WriteInput = True
        End If
    End If

End Function
Fixed this using CharToOemBuffA API instead of StrConv as it was not working here w/ cyrillic characters unless using the correct API in WriteInput.

cheers,
</wqw>