I know, I strain your patience!
The file which content I read is a file containing concatenated files (program files, text files), and one of this files is a text file (e.g. created by Notepad) which was saved as unicode; and this file contains the file name I have to extract.
As described, I read stg from the file in the usual FB way:
Code: Select all
Dim As String stg, fil
Open "Combined.bin" For Binary As #1
stg = Input(lof(1), #1)
Then I do the string manipulations. All this is working perfectly! And I need all this manipulations for my main job. Also the extracting of the file name works perfectly, fil = mid(strg, pos, lngth) doesnt't fail! An example: if the file name saved in the unicode-encoded text file is 'Kč.ahk', fil is the following byte sequence: '4B 00 0D 01 2E 00 61 00 68 00 6B 00'. I would be able e.g. to write this string into a file or similar things, all this works perfectly. The problem in this context is only how to use this string 'fil' to create a file (by CreateFileW()) with the name 'Kč.ahk'...