Hola a todos,
Tengo que crear un fichero con un nombre largo (más de 8 carácteres).
¿Con que comando puedo crearlo? El comando FCREATE() no funciona.
Gracias.
Andrés
Crear un fichero de más de 8 letras
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Sebastián Almirón
- Posts: 125
- Joined: Mon Dec 12, 2005 9:56 am
- Location: Moralzarzal - Spain
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
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