Gambas Documentation
Compilación e instalación
Componentes
Controls pictures
Cómo...
Descripciones del Lenguaje
Developer Documentation
Componentes adicionales de Gambas
Cómo programar componentes en C/C++
Cómo programar componentes en Gambas
Índice Alfabético de la Interfaz de Programación de Gambas
Índice por Categorías de la Interfaz de Programación de Gambas
Name
ARG
BEGIN_METHOD_VOID
BEGIN_PROPERTY
END_METHOD
GB.Add
GB.Alloc
GB.Application.Name
GB.Application.Title
GB.Array.Count
GB.CheckPost
GB.CurrentComponent
GB.Detach
GB.ExistClass
GB.ExistFile
GB.FileName
GB.Free
GB.FreeArray
GB.FreeString
GB.GetClass
GB.GetClassName
GB.GetEnum
GB.GetEvent
GB.GetFunction
GB.GetTempDir
GB.GetTime
GB.GetUnknown
GB.Is
GB.ListEnum
GB.LoadComponent
GB.NewString
GB.NextEnum
GB.Propagate
GB.Push
GB.Realloc
GB.Ref
GB.ReleaseFile
GB.ReturnFloat
GB.ReturnLong
GB.ReturnObject
GB.StopAllEnum
GB.StopEnum
GB.StoreObject
GB.StoreString
GB.StoreVariant
GB.System.Language
GB.Unref
GB.Watch
GB_ARRAY
GB_FLOAT
GB_HOOK_LOOP
GB_HOOK_MAIN
GB_HOOK_POST
GB_HOOK_TIMER
GB_STRING
GB_T_BOOLEAN
GB_T_BYTE
GB_T_DATE
GB_T_FLOAT
GB_T_INTEGER
GB_T_LONG
GB_T_SHORT
GB_T_SINGLE
GB_T_STRING
GB_T_VARIANT
GB_TIMER
PROP
VPROP
Documentacion y Recetas
Documentación del Entorno de Desarrollo
Fragmentos de código
Glosario
Índice del Lenguaje
LÉEME
Licencia del Wiki
Manual del Wiki
Mensajes de Error
Pendiente de traducción
Registrarse
Repositorio de Aplicaciones
Tutoriales
Últimos cambios

GB.LoadFile

int GB.LoadFile ( const char *path , long lenp , char **addr , long *len )

Loads a file into memory.

  • path points at the file path.

  • lenp is the file path length.

  • addr will receive the address of the loaded file in memory.

  • len will receive the length of the file.

This functions returns TRUE if the load has failed, and sets the internal interpreter error flag. So, if you want to raise an error, just return from the method or the property immediately after.

You must use this function if you want to access a file located into the project or the current component, i.e. if path is relative.

The reason is that Gambas executables are mapped into memory, and so in that case this function does not load anything, but just returns a pointer to the file data.

If you need to access a file located in the project or in the current component as a real file, use the GB.RealFileName function.

See also