tincho 01-11-2020, 04:08
Hola a todos.

Si se tiene una función en un archivo.h de este tipo:
Código:
EXPORT int dwg_read_file (const char *restrict filename, Dwg_Data *restrict dwg);
Es correcto hacer esto en gambas?
Código:
Private Extern dwg_read_file(filename As String, Dwg_Data As Pointer) As Integer

Seria esto?
nombre_de_la_funcion(nombre_del_archivo As String, salida_de_los_datos As Pointer) As Integer

Saludos.
tincho 01-11-2020, 04:04
Hola a todos.
Hice una prueba muy rudimentaria con Extern pero no ha funcionado, dejo el código aquí por si alguien tiene ganas de resolverlo.
Código:
Library "/usr/local/lib/libredwg:0.0.11"

'EXPORT int dwg_read_file (const char *restrict filename, Dwg_Data *restrict dwg);
Private Extern dwg_read_file(filename As String, Dwg_Data As Pointer) As Integer

'EXPORT int dxf_read_file (const char *restrict filename, Dwg_Data *restrict dwg);
Private Extern dxf_read_file(filename As String, Dwg_Data As Pointer) As Integer

'EXPORT unsigned int dwg_get_layer_count (const Dwg_Data *restrict dwg);
Private Extern dwg_get_layer_count(Dwg_Data As Pointer) As Integer

Public Function info(f As String) As Pointer
  Dim info As Pointer
  Dim i As Integer
  Dim q As Integer
  i = dwg_read_file(f, info)
  q = dwg_get_layer_count(info)
  Return q
End

El archivo dwg.h se puede consultar aquí
https://git.savannah.gnu.org/cgit/libred...lude/dwg.h
Saludos.
gambafeliz 30-10-2020, 20:52
Hola, jovenes

Tengo un array con varias palabras pero se supone que no se si llevan tilde. Alguien me dice como detectar palabras con tilde pero de la forma mas simple que se os ocurra. Si existe alguna función directa o algo así mejor.

Gracias.
Páginas (564):    1 512 513 514 515 516 564   
Bienvenido, Invitado
Tienes que registrarte para poder participar en nuestro foro.
Recordarme?
Miembros: 291
Último miembro: Rufust
Temas del foro: 1,742
Mensajes del foro: 9,026
Últimos temas
Odio a gb.Report
Foro: General
Último mensaje por: guizans, Hace 1 hora
Respuestas: 9 - Vistas: 1,484
Ordenar en un TableView
Foro: General
Último mensaje por: guizans, Ayer, 19:35
Respuestas: 0 - Vistas: 28
Reportes de Gambas
Foro: Aplicaciones/Fragmentos de Código
Último mensaje por: Alberto59, 27-10-2025, 16:34
Respuestas: 2 - Vistas: 1,315
Ordenando las carpetas
Foro: Programación en otros lenguajes
Último mensaje por: tercoide, 22-10-2025, 15:57
Respuestas: 0 - Vistas: 101
Powered By MyBB, © 2002-2025 MyBB Group.
Made with by Curves UI.