Hello all,

I have a problem opening file with "OpenFileDialog" from a location which uses special characters of our language.

If I use filepath like follows: "D:\PROJEKTI\Velenje\TEOVS\ČP v VH Mravljakov vrh (2.2.10)\Program\CPinVH_MravljakovVrh_Run.tws", I get HRESULT error: Error HRESULT E_FAIL has been returned from a call to a COM component.

If I change filepath like this: "D:\PROJEKTI\Velenje\TEOVS\CP v VH Mravljakov vrh (2.2.10)\Program\CPinVH_MravljakovVrh_Run.tws", everything works OK.

the only difference is in character "Č" and "C".

My code:
Code:
        Dim TWSDoc As TWinSoft.Document = New TWinSoft.Document
        Dim f As System.Runtime.InteropServices.ComTypes.IPersistFile = DirectCast(TWSDoc, System.Runtime.InteropServices.ComTypes.IPersistFile)
        Dim pot As String

        OpenFileDialog2.Filter = "TWinSoft files *.tws| *.tws" 
        If OpenFileDialog2.ShowDialog = Windows.Forms.DialogResult.OK Then
            pot = OpenFileDialog2.FileName
            f.Load(pot, 0) ' --> Here I get error
        Else
            Exit Sub
        End If