CreateFile(A/W) will not work on Windows 98 because, according to the description on MSDN, the minimum client is Windows XP. Maybe you should try using C "fopen" function, for example?