* DEFINEs for file share mode. #Define FILE_SHARE_READ 1 #Define FILE_SHARE_WRITE 2 * DEFINEs for access right #Define GENERIC_READ hex2dec("80000000") #Define GENERIC_WRITE hex2dec("40000000") * DEFINES for Create Mode. #Define CREATE_NEW 1 #Define CREATE_ALWAYS 2 #Define OPEN_EXISTING 3 #Define OPEN_ALWAYS 4 #Define TRUNCATE_EXISTING 5 * File flag. #Define FILE_ATTRIBUTE_NORMAL hex2dec("80") Declare Integer CreateFile In kernel32 ; STRING lpFileName, ; INTEGER dwDesiredAccess, ; INTEGER dwShareMode, ; INTEGER lpSecurityAttributes, ; INTEGER dwCreationDisposition, ; INTEGER dwFlagsAndAttributes, ; INTEGER hTemplateFile ... lhFileHandle = CreateFile(lcFileName, GENERIC_READ, ; FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0)The CreateFile() function works in Windows XP, but fails in Windows 98 and returns Error 87 ERROR_INVALID_PARAMETER. The file in question is being accessed over a network share. I'm stumped. I couldn't find anything in the documentation or knowledgebase indicating an incompatibility with Win98. Any help would be appreciated. In the meantime, I'm going to try the outdated OpenFile() function.