by Sebastián Almirón » Mon May 12, 2008 8:57 am
Hola, yo utilizo las siguientes funciones para crear y manipular los ficheros con nombres largos:
DLL32 FUNCTION FCreate32( lpPathName AS STRING, iAttribute AS LONG ) AS LONG PASCAL FROM "_lcreat" LIB "KERNEL32"
DLL32 FUNCTION FWrite32( hFile AS LONG, lpBuffer AS STRING, wBytes AS LONG ) AS LONG PASCAL FROM "_lwrite" LIB "KERNEL32"
DLL32 FUNCTION FClose32( hFile AS LONG ) AS LONG PASCAL FROM "_lclose" LIB "KERNEL32"
DLL32 FUNCTION FErase32( lpFileName AS STRING ) AS LONG PASCAL FROM "DeleteFileA" LIB "KERNEL32"
DLL32 FUNCTION FOpen32( lpPathName AS STRING, iReadWrite AS LONG ) AS LONG PASCAL FROM "_lopen" LIB "KERNEL32"
DLL32 FUNCTION FRead32( hFile AS LONG, @lpBuffer AS LPSTR, wBytes AS LONG ) AS LONG PASCAL FROM "_lread" LIB "KERNEL32"
DLL32 FUNCTION FSeek32( hFile AS LONG, lOffset AS LONG, iOrigin AS LONG ) AS LONG PASCAL FROM "_llseek" LIB "KERNEL32"
Es decir copias todo esto en tu programa y luego utilizar FCreate32 en vez de FCreate, lo mismo para FOpen, FWrite, FClose, FErase, FRead y Fseek.
Saludos