<![CDATA[HMGforum.com]]> http://www.hmgforum.com Smartfeed extension for phpBB <![CDATA[HMG General Help :: Writing text to existing PDF file :: Author mol]]> 2025-10-01T19:33:32+00:00 2025-10-01T19:33:32+00:00 http://www.hmgforum.com/viewtopic.php?f=5&t=7705&p=71934#p71934 I need to insert text into existing pdf file.
Does somebody have any working sample?
If I don't find a solution, I'll have to create my own pdf form and fill it with my data...]]>
I need to insert text into existing pdf file.
Does somebody have any working sample?
If I don't find a solution, I'll have to create my own pdf form and fill it with my data...]]>
<![CDATA[HMG General Help :: Re: How to call function from .dll library? :: Reply by danielmaximiliano]]> 2025-10-03T13:53:14+00:00 2025-10-03T13:53:14+00:00 http://www.hmgforum.com/viewtopic.php?f=5&t=5318&p=71938#p71938

codigo que encontre:

Code: Select all

/* ------------------------------
   Programa de prueba
   ------------------------------ */
#include "hmg.ch"
#include "hbdyn.ch" 
#define CRLF  INetCRLF()

PROCEDURE Main()
PUBLIC pDLL 
PUBLIC pVLCNew, pMediaNewLoc, pMediaNewPath, pPlayerNew, pSetHWND, pPlay

// Resolver funciones necesarias
   pVLCNew       := hb_DynCall( { "libvlc_new", pDLL }, HB_DYN_CTYPE_PTR, { HB_DYN_CTYPE_INT, HB_DYN_CTYPE_PTR } )
   pMediaNewLoc  := hb_DynCall( { "libvlc_media_new_location", pDLL }, HB_DYN_CTYPE_PTR, { HB_DYN_CTYPE_PTR, HB_DYN_CTYPE_STRING } )
   pMediaNewPath := hb_DynCall( { "libvlc_media_new_path", pDLL }, HB_DYN_CTYPE_PTR, { HB_DYN_CTYPE_PTR, HB_DYN_CTYPE_STRING } )
   pPlayerNew    := hb_DynCall( { "libvlc_media_player_new_from_media", pDLL }, HB_DYN_CTYPE_PTR, { HB_DYN_CTYPE_PTR } )
   pSetHWND      := hb_DynCall( { "libvlc_media_player_set_hwnd", pDLL }, HB_DYN_CTYPE_VOID, { HB_DYN_CTYPE_PTR, HB_DYN_CTYPE_LONG } )
   pPlay         := hb_DynCall( { "libvlc_media_player_play", pDLL }, HB_DYN_CTYPE_INT, { HB_DYN_CTYPE_PTR } )
PlayStream( "192.168.100.16:554" )
RETURN


//-----------------------------------------------------------
// Abrir cuadro de diálogo para seleccionar archivo local
//-----------------------------------------------------------
FUNCTION BrowseFile()
   LOCAL cFile := GetFile( { {"Videos", "*.mp4;*.avi;*.mkv;*.mov;*.flv"}, ;
                             {"Todos los archivos", "*.*"} }, ;
                             "Seleccionar archivo de video", "C:\videos\" )

   IF !Empty( cFile )
 // Main.txtSource.Value := cFile
 ENDIF
RETURN NIL

//-----------------------------------------------------------
// Inicializa VLC y reproduce un stream o archivo
//-----------------------------------------------------------
FUNCTION PlayStream( cSource )
   
   IF Empty( AllTrim( cSource ) )
      MsgStop( "Debe ingresar una URL o archivo" )
      RETURN NIL
   ENDIF

    IF Empty( pDLL )
      pDLL := hb_LibLoad( "libvlc.dll" )
      IF Empty( pDLL )
         ? "No se pudo cargar libvlc.dll" 
         RETURN NIL
      ENDIF
   ENDIF
   
   IF Empty( hVLC )
      hVLC := pVLCNew( 0, 0 )
   ENDIF

   IF File( cSource ) .OR. ( ":" $ cSource )
      hMedia := pMediaNewPath( hVLC, cSource )
   ELSE
      hMedia := pMediaNewLoc( hVLC, cSource )
   ENDIF

   hPlayer := pPlayerNew( hMedia )
   pSetHWND( hPlayer, GetControlHandle( "frm1", "Main" ) )
   pPlay( hPlayer )
RETURN NIL

//-----------------------------------------------------------
// Pause / Resume
//-----------------------------------------------------------
FUNCTION PauseStream()
   LOCAL pPause := hb_DynCall( { "libvlc_media_player_pause", "libvlc.dll" }, HB_DYN_CTYPE_VOID, { HB_DYN_CTYPE_PTR } )
   IF !Empty( hPlayer )
      pPause( hPlayer )
   ENDIF
RETURN NIL

//-----------------------------------------------------------
// Stop
//-----------------------------------------------------------
FUNCTION StopStream()
   LOCAL pStop := hb_DynCall( { "libvlc_media_player_stop", "libvlc.dll" }, HB_DYN_CTYPE_VOID, { HB_DYN_CTYPE_PTR } )
   IF !Empty( hPlayer )
      pStop( hPlayer )
   ENDIF
RETURN NIL

//-----------------------------------------------------------
// Volumen + / -
//-----------------------------------------------------------
FUNCTION VolumeUp()
   LOCAL pGetVol := hb_DynCall( { "libvlc_audio_get_volume", "libvlc.dll" }, HB_DYN_CTYPE_INT, { HB_DYN_CTYPE_PTR } )
   LOCAL pSetVol := hb_DynCall( { "libvlc_audio_set_volume", "libvlc.dll" }, HB_DYN_CTYPE_INT, { HB_DYN_CTYPE_PTR, HB_DYN_CTYPE_INT } )
   LOCAL nVol
   IF !Empty( hPlayer )
      nVol := pGetVol( hPlayer )
      pSetVol( hPlayer, Min( 200, nVol + 10 ) ) // máximo 200%
   ENDIF
RETURN NIL

FUNCTION VolumeDown()
   LOCAL pGetVol := hb_DynCall( { "libvlc_audio_get_volume", "libvlc.dll" }, HB_DYN_CTYPE_INT, { HB_DYN_CTYPE_PTR } )
   LOCAL pSetVol := hb_DynCall( { "libvlc_audio_set_volume", "libvlc.dll" }, HB_DYN_CTYPE_INT, { HB_DYN_CTYPE_PTR, HB_DYN_CTYPE_INT } )
   LOCAL nVol
   IF !Empty( hPlayer )
      nVol := pGetVol( hPlayer )
      pSetVol( hPlayer, Max( 0, nVol - 10 ) )
   ENDIF
RETURN NIL

//-----------------------------------------------------------
// Fullscreen On/Off
//-----------------------------------------------------------
FUNCTION ToggleFullScreen()
   LOCAL pToggle := hb_DynCall( { "libvlc_toggle_fullscreen", "libvlc.dll" }, HB_DYN_CTYPE_VOID, { HB_DYN_CTYPE_PTR } )
   IF !Empty( hPlayer )
      pToggle( hPlayer )
   ENDIF
RETURN NIL

el error :
hbmk2: Harbour: Compilando m¢dulos...
Harbour 3.2.0dev (r1703241902)
Copyright (c) 1999-2016, http://harbour-project.org/
hbmk2: Compilando...
hbmk2: Enlazando... hmgvlc.exe
.hbmk/win/mingw/Main.o:Main.c:(.data+0x178): undefined reference to `HB_FUN_PVLCNEW'
.hbmk/win/mingw/Main.o:Main.c:(.data+0x198): undefined reference to `HB_FUN_PMEDIANEWPATH'
.hbmk/win/mingw/Main.o:Main.c:(.data+0x1b8): undefined reference to `HB_FUN_PMEDIANEWLOC'
.hbmk/win/mingw/Main.o:Main.c:(.data+0x1c8): undefined reference to `HB_FUN_PPLAYERNEW'
.hbmk/win/mingw/Main.o:Main.c:(.data+0x1e8): undefined reference to `HB_FUN_PSETHWND'
.hbmk/win/mingw/Main.o:Main.c:(.data+0x208): undefined reference to `HB_FUN_PPLAY'
.hbmk/win/mingw/Main.o:Main.c:(.data+0x228): undefined reference to `HB_FUN_PPAUSE'
.hbmk/win/mingw/Main.o:Main.c:(.data+0x248): undefined reference to `HB_FUN_PSTOP'
.hbmk/win/mingw/Main.o:Main.c:(.data+0x268): undefined reference to `HB_FUN_PGETVOL'
.hbmk/win/mingw/Main.o:Main.c:(.data+0x278): undefined reference to `HB_FUN_PSETVOL'
.hbmk/win/mingw/Main.o:Main.c:(.data+0x2c8): undefined reference to `HB_FUN_PTOGGLE'
collect2.exe: error: ld returned 1 exit status
hbmk2[hmgvlc]: Error: Ejecutando enlazador. 1
gcc.exe .hbmk/win/mingw/Main.o .hbmk/win/mingw/_hbmkaut_Main.o C:/Temp/HmgVlc/_temp.o -pthread -static-libgcc -static-libstdc++ -static -lpthread -mwindows -Wl,--start-group -lhmg -lcrypt -ledit -leditex -lgraph -lini -lreport -lhfcl -lmsvfw32 -lvfw32 -lhbmysql -lmysql -lhbfimage -lhbpgsql -lsddmy -lhbvpdf -lhbct -lhbwin -lhbmzip -lminizip -lhbmemio -lhbmisc -lhbtip -lsqlite3 -lhbsqlit3 -lsddodbc -lrddsql -lhbodbc -lodbc32 -lhbhpdf -lhbnetio -lxhb -lpng -llibhpdf -lhbzebra -lhbextern -lhbdebug -lhbvmmt -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgtwin -lgtwvt -lgtgui -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lhbmainwin -lkernel32 -luser32 -lgdi32 -ladvapi32 -lws2_32 -liphlpapi -lwinspool -lcomctl32 -lcomdlg32 -lshell32 -luuid -lole32 -loleaut32 -lmpr -lwinmm -lmapi32 -limm32 -lmsimg32 -lwininet -lhbpcre -lhbzlib -Wl,--end-group -ohmgvlc.exe -LC:/hmg.3.4.4/harbour/lib/win/mingw -LC:/hmg.3.4.4/lib

hbmk2: Error: Funci¢n(es) referenciada, no encontrada, pero desconocida:
PVLCNEW(), PMEDIANEWPATH(), PMEDIANEWLOC(), PPLAYERNEW(), PSETHWND(),
PPLAY(), PPAUSE(), PSTOP(), PGETVOL(), PSETVOL(), PTOGGLE()
]]>


codigo que encontre:

Code: Select all

/* ------------------------------
   Programa de prueba
   ------------------------------ */
#include "hmg.ch"
#include "hbdyn.ch" 
#define CRLF  INetCRLF()

PROCEDURE Main()
PUBLIC pDLL 
PUBLIC pVLCNew, pMediaNewLoc, pMediaNewPath, pPlayerNew, pSetHWND, pPlay

// Resolver funciones necesarias
   pVLCNew       := hb_DynCall( { "libvlc_new", pDLL }, HB_DYN_CTYPE_PTR, { HB_DYN_CTYPE_INT, HB_DYN_CTYPE_PTR } )
   pMediaNewLoc  := hb_DynCall( { "libvlc_media_new_location", pDLL }, HB_DYN_CTYPE_PTR, { HB_DYN_CTYPE_PTR, HB_DYN_CTYPE_STRING } )
   pMediaNewPath := hb_DynCall( { "libvlc_media_new_path", pDLL }, HB_DYN_CTYPE_PTR, { HB_DYN_CTYPE_PTR, HB_DYN_CTYPE_STRING } )
   pPlayerNew    := hb_DynCall( { "libvlc_media_player_new_from_media", pDLL }, HB_DYN_CTYPE_PTR, { HB_DYN_CTYPE_PTR } )
   pSetHWND      := hb_DynCall( { "libvlc_media_player_set_hwnd", pDLL }, HB_DYN_CTYPE_VOID, { HB_DYN_CTYPE_PTR, HB_DYN_CTYPE_LONG } )
   pPlay         := hb_DynCall( { "libvlc_media_player_play", pDLL }, HB_DYN_CTYPE_INT, { HB_DYN_CTYPE_PTR } )
PlayStream( "192.168.100.16:554" )
RETURN


//-----------------------------------------------------------
// Abrir cuadro de diálogo para seleccionar archivo local
//-----------------------------------------------------------
FUNCTION BrowseFile()
   LOCAL cFile := GetFile( { {"Videos", "*.mp4;*.avi;*.mkv;*.mov;*.flv"}, ;
                             {"Todos los archivos", "*.*"} }, ;
                             "Seleccionar archivo de video", "C:\videos\" )

   IF !Empty( cFile )
 // Main.txtSource.Value := cFile
 ENDIF
RETURN NIL

//-----------------------------------------------------------
// Inicializa VLC y reproduce un stream o archivo
//-----------------------------------------------------------
FUNCTION PlayStream( cSource )
   
   IF Empty( AllTrim( cSource ) )
      MsgStop( "Debe ingresar una URL o archivo" )
      RETURN NIL
   ENDIF

    IF Empty( pDLL )
      pDLL := hb_LibLoad( "libvlc.dll" )
      IF Empty( pDLL )
         ? "No se pudo cargar libvlc.dll" 
         RETURN NIL
      ENDIF
   ENDIF
   
   IF Empty( hVLC )
      hVLC := pVLCNew( 0, 0 )
   ENDIF

   IF File( cSource ) .OR. ( ":" $ cSource )
      hMedia := pMediaNewPath( hVLC, cSource )
   ELSE
      hMedia := pMediaNewLoc( hVLC, cSource )
   ENDIF

   hPlayer := pPlayerNew( hMedia )
   pSetHWND( hPlayer, GetControlHandle( "frm1", "Main" ) )
   pPlay( hPlayer )
RETURN NIL

//-----------------------------------------------------------
// Pause / Resume
//-----------------------------------------------------------
FUNCTION PauseStream()
   LOCAL pPause := hb_DynCall( { "libvlc_media_player_pause", "libvlc.dll" }, HB_DYN_CTYPE_VOID, { HB_DYN_CTYPE_PTR } )
   IF !Empty( hPlayer )
      pPause( hPlayer )
   ENDIF
RETURN NIL

//-----------------------------------------------------------
// Stop
//-----------------------------------------------------------
FUNCTION StopStream()
   LOCAL pStop := hb_DynCall( { "libvlc_media_player_stop", "libvlc.dll" }, HB_DYN_CTYPE_VOID, { HB_DYN_CTYPE_PTR } )
   IF !Empty( hPlayer )
      pStop( hPlayer )
   ENDIF
RETURN NIL

//-----------------------------------------------------------
// Volumen + / -
//-----------------------------------------------------------
FUNCTION VolumeUp()
   LOCAL pGetVol := hb_DynCall( { "libvlc_audio_get_volume", "libvlc.dll" }, HB_DYN_CTYPE_INT, { HB_DYN_CTYPE_PTR } )
   LOCAL pSetVol := hb_DynCall( { "libvlc_audio_set_volume", "libvlc.dll" }, HB_DYN_CTYPE_INT, { HB_DYN_CTYPE_PTR, HB_DYN_CTYPE_INT } )
   LOCAL nVol
   IF !Empty( hPlayer )
      nVol := pGetVol( hPlayer )
      pSetVol( hPlayer, Min( 200, nVol + 10 ) ) // máximo 200%
   ENDIF
RETURN NIL

FUNCTION VolumeDown()
   LOCAL pGetVol := hb_DynCall( { "libvlc_audio_get_volume", "libvlc.dll" }, HB_DYN_CTYPE_INT, { HB_DYN_CTYPE_PTR } )
   LOCAL pSetVol := hb_DynCall( { "libvlc_audio_set_volume", "libvlc.dll" }, HB_DYN_CTYPE_INT, { HB_DYN_CTYPE_PTR, HB_DYN_CTYPE_INT } )
   LOCAL nVol
   IF !Empty( hPlayer )
      nVol := pGetVol( hPlayer )
      pSetVol( hPlayer, Max( 0, nVol - 10 ) )
   ENDIF
RETURN NIL

//-----------------------------------------------------------
// Fullscreen On/Off
//-----------------------------------------------------------
FUNCTION ToggleFullScreen()
   LOCAL pToggle := hb_DynCall( { "libvlc_toggle_fullscreen", "libvlc.dll" }, HB_DYN_CTYPE_VOID, { HB_DYN_CTYPE_PTR } )
   IF !Empty( hPlayer )
      pToggle( hPlayer )
   ENDIF
RETURN NIL

el error :
hbmk2: Harbour: Compilando m¢dulos...
Harbour 3.2.0dev (r1703241902)
Copyright (c) 1999-2016, http://harbour-project.org/
hbmk2: Compilando...
hbmk2: Enlazando... hmgvlc.exe
.hbmk/win/mingw/Main.o:Main.c:(.data+0x178): undefined reference to `HB_FUN_PVLCNEW'
.hbmk/win/mingw/Main.o:Main.c:(.data+0x198): undefined reference to `HB_FUN_PMEDIANEWPATH'
.hbmk/win/mingw/Main.o:Main.c:(.data+0x1b8): undefined reference to `HB_FUN_PMEDIANEWLOC'
.hbmk/win/mingw/Main.o:Main.c:(.data+0x1c8): undefined reference to `HB_FUN_PPLAYERNEW'
.hbmk/win/mingw/Main.o:Main.c:(.data+0x1e8): undefined reference to `HB_FUN_PSETHWND'
.hbmk/win/mingw/Main.o:Main.c:(.data+0x208): undefined reference to `HB_FUN_PPLAY'
.hbmk/win/mingw/Main.o:Main.c:(.data+0x228): undefined reference to `HB_FUN_PPAUSE'
.hbmk/win/mingw/Main.o:Main.c:(.data+0x248): undefined reference to `HB_FUN_PSTOP'
.hbmk/win/mingw/Main.o:Main.c:(.data+0x268): undefined reference to `HB_FUN_PGETVOL'
.hbmk/win/mingw/Main.o:Main.c:(.data+0x278): undefined reference to `HB_FUN_PSETVOL'
.hbmk/win/mingw/Main.o:Main.c:(.data+0x2c8): undefined reference to `HB_FUN_PTOGGLE'
collect2.exe: error: ld returned 1 exit status
hbmk2[hmgvlc]: Error: Ejecutando enlazador. 1
gcc.exe .hbmk/win/mingw/Main.o .hbmk/win/mingw/_hbmkaut_Main.o C:/Temp/HmgVlc/_temp.o -pthread -static-libgcc -static-libstdc++ -static -lpthread -mwindows -Wl,--start-group -lhmg -lcrypt -ledit -leditex -lgraph -lini -lreport -lhfcl -lmsvfw32 -lvfw32 -lhbmysql -lmysql -lhbfimage -lhbpgsql -lsddmy -lhbvpdf -lhbct -lhbwin -lhbmzip -lminizip -lhbmemio -lhbmisc -lhbtip -lsqlite3 -lhbsqlit3 -lsddodbc -lrddsql -lhbodbc -lodbc32 -lhbhpdf -lhbnetio -lxhb -lpng -llibhpdf -lhbzebra -lhbextern -lhbdebug -lhbvmmt -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgtwin -lgtwvt -lgtgui -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lhbmainwin -lkernel32 -luser32 -lgdi32 -ladvapi32 -lws2_32 -liphlpapi -lwinspool -lcomctl32 -lcomdlg32 -lshell32 -luuid -lole32 -loleaut32 -lmpr -lwinmm -lmapi32 -limm32 -lmsimg32 -lwininet -lhbpcre -lhbzlib -Wl,--end-group -ohmgvlc.exe -LC:/hmg.3.4.4/harbour/lib/win/mingw -LC:/hmg.3.4.4/lib

hbmk2: Error: Funci¢n(es) referenciada, no encontrada, pero desconocida:
PVLCNEW(), PMEDIANEWPATH(), PMEDIANEWLOC(), PPLAYERNEW(), PSETHWND(),
PPLAY(), PPAUSE(), PSTOP(), PGETVOL(), PSETVOL(), PTOGGLE()
]]>
<![CDATA[HMG General Help :: Re: Encriptación DBF :: Reply by tonton2]]> 2025-10-02T21:34:03+00:00 2025-10-02T21:34:03+00:00 http://www.hmgforum.com/viewtopic.php?f=5&t=887&p=71937#p71937
mustafa wrote: Wed Feb 26, 2014 12:24 pm Hola amigos:
Les presento un trabajo para encriptar ficheros DBF,basado en "encryptsqlite.zip"
que publico Rathinagiri :
http://www.hmgforum.com/viewtopic.php?f ... exe#p21952" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;
Se puede encriptar y desencriptar un fichero , solo con un maximo de 24 FIELD_NAME,
es el maximo que permite encriptar y he probado una base de datos con unos 100 registros.
Pueden Ver la encriptacion y Descriptacion en View Databases.
Antes de encriptar, se crea un fichero de respaldo con la extension _Back, ejemplo ---> Test_Back
y un fichero de Estructura _Struct , ejemplo ---> Test_Struct
Muy Importante, haga copias de Backup antes de encriptar, si por equivocacion intenta encriptar
un Fichero encriptado, aunque la aplicacion le avisa, no he conseguido que no encripte de Nuevo
y luego es imposible desencriptar dado que se ha encriptado dos Veces
Muy Importante:
Trabajen, con Seguridad, declino toda responsabilidad por el Error o Mala manipulacion del Fichero
que se quiere Encriptar.
En la Carpeta donde se encuentra el Fichero Encriptado, durante la Encriptacion, se crean cuatro
ficheros con extension ".mem", no los Borre ni los traslade de Carpeta, son necesarios para poder
Desencriptar los Ficheros, el programa los Borrara una vez Desencriptado el Fichero.
No Desencripte mas de un Fichero por Carpeta !
Espero que les pueda servir y les guste

Un Saludo
Mustafa

*--------------------------------- Google-----------------------------------------*
Hello friends :
I present a job to encrypt DBF files, based on " encryptsqlite.zip "
I post Rathinagiri :
http://www.hmgforum.com/viewtopic.php?f ... ncrypt.exe" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false; # p21952
It can encrypt and decrypt a file , only a maximum of 24 FIELD_NAME ,
is the maximum that lets you encrypt and have tried a database with about 100 records.
They may encryption and decryption View View in Databases.
Before you encrypt a backup file with the extension _back , example ---> Test_Back is created
Structure and _Struct file , example ---> Test_Struct
Very Important , back backup before encrypting , by mistake if you try to encrypt
an encrypted file, the application warns you though , I have not managed to not encrypt New
and then it is impossible to decrypt since been encrypted twice
Very Important:
Work with Security , decline all responsibility for the Mistake or bad handling of the File
you want to Encrypt .
In the Folder where the File Encryption , during Encryption is create four
files with extension ".mem" , do not Delete Folder or move them , are needed to
Decrypt the files , the program deleted the file once Decryption .
Decrypt No more than one File per Folder !
I hope I can serve them and like

Regards
Mustafa :D
Bonsoir tout le monde ,bonsoir mon ami mustafa: je voudrais l'utilser dans HMG.3.6 ,pourriez vous me mettre un FICHIER.hbp pour l'utliser avec IDE merci d'avance
Good evening everyone, good evening my friend Mustafa: I would like to use it in HMG.3.6, could you put it in .hbp FILE for me to use it with IDE, thank you in advance]]>
mustafa wrote: Wed Feb 26, 2014 12:24 pm Hola amigos:
Les presento un trabajo para encriptar ficheros DBF,basado en "encryptsqlite.zip"
que publico Rathinagiri :
http://www.hmgforum.com/viewtopic.php?f ... exe#p21952" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;
Se puede encriptar y desencriptar un fichero , solo con un maximo de 24 FIELD_NAME,
es el maximo que permite encriptar y he probado una base de datos con unos 100 registros.
Pueden Ver la encriptacion y Descriptacion en View Databases.
Antes de encriptar, se crea un fichero de respaldo con la extension _Back, ejemplo ---> Test_Back
y un fichero de Estructura _Struct , ejemplo ---> Test_Struct
Muy Importante, haga copias de Backup antes de encriptar, si por equivocacion intenta encriptar
un Fichero encriptado, aunque la aplicacion le avisa, no he conseguido que no encripte de Nuevo
y luego es imposible desencriptar dado que se ha encriptado dos Veces
Muy Importante:
Trabajen, con Seguridad, declino toda responsabilidad por el Error o Mala manipulacion del Fichero
que se quiere Encriptar.
En la Carpeta donde se encuentra el Fichero Encriptado, durante la Encriptacion, se crean cuatro
ficheros con extension ".mem", no los Borre ni los traslade de Carpeta, son necesarios para poder
Desencriptar los Ficheros, el programa los Borrara una vez Desencriptado el Fichero.
No Desencripte mas de un Fichero por Carpeta !
Espero que les pueda servir y les guste

Un Saludo
Mustafa

*--------------------------------- Google-----------------------------------------*
Hello friends :
I present a job to encrypt DBF files, based on " encryptsqlite.zip "
I post Rathinagiri :
http://www.hmgforum.com/viewtopic.php?f ... ncrypt.exe" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false; # p21952
It can encrypt and decrypt a file , only a maximum of 24 FIELD_NAME ,
is the maximum that lets you encrypt and have tried a database with about 100 records.
They may encryption and decryption View View in Databases.
Before you encrypt a backup file with the extension _back , example ---> Test_Back is created
Structure and _Struct file , example ---> Test_Struct
Very Important , back backup before encrypting , by mistake if you try to encrypt
an encrypted file, the application warns you though , I have not managed to not encrypt New
and then it is impossible to decrypt since been encrypted twice
Very Important:
Work with Security , decline all responsibility for the Mistake or bad handling of the File
you want to Encrypt .
In the Folder where the File Encryption , during Encryption is create four
files with extension ".mem" , do not Delete Folder or move them , are needed to
Decrypt the files , the program deleted the file once Decryption .
Decrypt No more than one File per Folder !
I hope I can serve them and like

Regards
Mustafa :D
Bonsoir tout le monde ,bonsoir mon ami mustafa: je voudrais l'utilser dans HMG.3.6 ,pourriez vous me mettre un FICHIER.hbp pour l'utliser avec IDE merci d'avance
Good evening everyone, good evening my friend Mustafa: I would like to use it in HMG.3.6, could you put it in .hbp FILE for me to use it with IDE, thank you in advance]]>
<![CDATA[HMG General Help :: Re: Encriptación DBF :: Reply by franco]]> 2025-10-03T15:55:25+00:00 2025-10-03T15:55:25+00:00 http://www.hmgforum.com/viewtopic.php?f=5&t=887&p=71939#p71939 <![CDATA[General :: Re: EDITBOX :: Reply by serge_girard]]> 2025-09-25T09:01:08+00:00 2025-09-25T09:01:08+00:00 http://www.hmgforum.com/viewtopic.php?f=24&t=7701&p=71919#p71919
maybe this can help you to get starting...:

Code: Select all

#include "hmg.ch"
FUNCTION MAIN()
/*****************/
DEFINE WINDOW Form_1 ;
   AT 0,0 ;
   WIDTH 930 HEIGHT 400 ;
   TITLE ' T e s t';
   FONT "Arial" SIZE 09

   ON KEY ESCAPE ACTION Form_1.Release  

   @ 10,840 LABEL LABEL_LEN_TB_1 ;
      VALUE " " ;
      WIDTH 100 ;
      HEIGHT 35 ;
      BOLD

   DEFINE EDITBOX TB_1
      ROW	 10
      COL	 10
      WIDTH  820 
      HEIGHT 250 
      VALUE '1234567890123456789012345678901234567890123456789012345678901234567890'  
      TOOLTIP '' 
      MAXLENGTH 2000	 
      ON CHANGE TEST_LEN() 
   END EDITBOX
    
END WINDOW
 
Form_1.TB_1.SetFocus

CENTER WINDOW Form_1
ACTIVATE WINDOW Form_1
 
RETURN


FUNCTION TEST_LEN()
/******************/
LOCAL cResult  := "", n, nPOS

Form_1.LABEL_LEN_TB_1.Value := LEN(Form_1.TB_1.Value)

FOR n := 80 TO 800 STEP 80 
   IF LEN(Form_1.TB_1.Value) == 80
      FOR nPos := 1 TO Len( Form_1.TB_1.Value ) STEP 80
         cResult += SubStr( Form_1.TB_1.Value, nPos, 80 ) + CRLF
      NEXT
      Form_1.TB_1.Value := cResult
      EXIT
   ENDIF
NEXT
N.B.
1 - Every CRLF will add 2 to the LEN
2 - Caret position is be moved to the end of the line... I cannot find the function to do this. I will look further.]]>

maybe this can help you to get starting...:

Code: Select all

#include "hmg.ch"
FUNCTION MAIN()
/*****************/
DEFINE WINDOW Form_1 ;
   AT 0,0 ;
   WIDTH 930 HEIGHT 400 ;
   TITLE ' T e s t';
   FONT "Arial" SIZE 09

   ON KEY ESCAPE ACTION Form_1.Release  

   @ 10,840 LABEL LABEL_LEN_TB_1 ;
      VALUE " " ;
      WIDTH 100 ;
      HEIGHT 35 ;
      BOLD

   DEFINE EDITBOX TB_1
      ROW	 10
      COL	 10
      WIDTH  820 
      HEIGHT 250 
      VALUE '1234567890123456789012345678901234567890123456789012345678901234567890'  
      TOOLTIP '' 
      MAXLENGTH 2000	 
      ON CHANGE TEST_LEN() 
   END EDITBOX
    
END WINDOW
 
Form_1.TB_1.SetFocus

CENTER WINDOW Form_1
ACTIVATE WINDOW Form_1
 
RETURN


FUNCTION TEST_LEN()
/******************/
LOCAL cResult  := "", n, nPOS

Form_1.LABEL_LEN_TB_1.Value := LEN(Form_1.TB_1.Value)

FOR n := 80 TO 800 STEP 80 
   IF LEN(Form_1.TB_1.Value) == 80
      FOR nPos := 1 TO Len( Form_1.TB_1.Value ) STEP 80
         cResult += SubStr( Form_1.TB_1.Value, nPos, 80 ) + CRLF
      NEXT
      Form_1.TB_1.Value := cResult
      EXIT
   ENDIF
NEXT
N.B.
1 - Every CRLF will add 2 to the LEN
2 - Caret position is be moved to the end of the line... I cannot find the function to do this. I will look further.]]>
<![CDATA[General :: Re: EDITBOX :: Reply by AUGE_OHR]]> 2025-09-25T12:28:39+00:00 2025-09-25T12:28:39+00:00 http://www.hmgforum.com/viewtopic.php?f=24&t=7701&p=71920#p71920
serge_girard wrote: Thu Sep 25, 2025 9:01 am 2 - Caret position is be moved to the end of the line... I cannot find the function to do this. I will look further.
have a look @c:\hmg.3.4.4\SAMPLES\Controls\TextBox\CARETPOS\demo.prg

Code: Select all

CaretPos := len(VALUE)
]]>
serge_girard wrote: Thu Sep 25, 2025 9:01 am 2 - Caret position is be moved to the end of the line... I cannot find the function to do this. I will look further.
have a look @c:\hmg.3.4.4\SAMPLES\Controls\TextBox\CARETPOS\demo.prg

Code: Select all

CaretPos := len(VALUE)
]]>
<![CDATA[General :: Commande OnMaximize :: Author tonton2]]> 2025-09-25T17:02:20+00:00 2025-09-25T17:02:20+00:00 http://www.hmgforum.com/viewtopic.php?f=24&t=7702&p=71921#p71921 <![CDATA[General :: Re: El juego de los Gorilas :: Reply by mol]]> 2025-09-25T19:08:20+00:00 2025-09-25T19:08:20+00:00 http://www.hmgforum.com/viewtopic.php?f=24&t=7606&p=71922#p71922 <![CDATA[General :: Re: El juego de los Gorilas :: Reply by franco]]> 2025-09-26T15:04:43+00:00 2025-09-26T15:04:43+00:00 http://www.hmgforum.com/viewtopic.php?f=24&t=7606&p=71924#p71924 <![CDATA[General :: Re: TCP/IP RSTP :: Reply by danielmaximiliano]]> 2025-09-28T02:15:02+00:00 2025-09-28T02:15:02+00:00 http://www.hmgforum.com/viewtopic.php?f=24&t=7700&p=71925#p71925 Con la ayuda de WireShark pude ver como es el inicio de sesion de la aplicacion de la camara sobre TCP/IP capturando los paquetes TCP en la red.
Pude crear el socket y sobre protocolo RSTP pude enviar las credenciales al servidor RSTP de la camara y que acepte mis peticiones.
Ahora en mas resolver los metodos SETUP y extraer la sessionID para completar el metodo PLAY

Code: Select all

#include <hmg.ch>
#include "hbsocket.ch"


FUNCTION Main()
   PUBLIC oSocket , cRequest
   PUBLIC cRtspDescribe    := Space( 1024 )
   PUBLIC cRtspSetup       := Space( 1024 )
   PUBLIC cRtspPlay        := Space( 1024 )
   PUBLIC nPos, nEnd, nSeq := 0
   PUBLIC cSession         := ""
   PUBLIC cServerIP        := "192.168.100.16"   // IP de la cámara
   PUBLIC nPort            := 554                // Puerto RTSP
   
   LOAD Window Main
   Center Window Main
   Activate Window Main
   
   FUNCTION Connect()
   oSocket    := hb_socketOpen()
   IF oSocket == NIL
      MSGINFO("Error al crear socket")
      RETURN
   ENDIF

   IF ! hb_socketConnect( oSocket, {HB_SOCKET_AF_INET, cServerIP, nPort } )
      MSGINFO("No se pudo conectar a:", cServerIP)
      hb_socketClose( oSocket )
      RETURN
   ENDIF

   // 1) DESCRIBE
      nSeq++
      cRequest := "DESCRIBE rtsp://192.168.100.16:554/22992e47b611dde40dde83b803ca1ab0_0 RTSP/1.0\r\n" + CRLF + ;
                  "CSeq: " + LTRIM( STR( nSeq ) ) + "\r\n"                                             + CRLF + ;
		          "User-Agent: HarbourClient/1.0\r\n"                                                  + CRLF + ;
                  "Accept: application/sdp\r\n"                                                        + CRLF + CRLF
   hb_socketSend( oSocket, cRequest       )
   hb_socketRecv( oSocket, @cRtspDescribe, LEN( cRtspDescribe )  )

   // 2) SETUP 
   nSeq++
   cRequest := "SETUP rtsp://192.168.100.16:554/22992e47b611dde40dde83b803ca1ab0_0/trackID=0 RTSP/1.0\r\n"  + CRLF + ;
               "CSeq: " + LTRIM( STR( nSeq ) ) + "\r\n"                                                     + CRLF + ;
		       "User-Agent: HarbourHMGClient/1.0\r\n"                                                       + CRLF + ;
               "Transport: RTP/AVP/TCP;unicast;interleaved=2\r\n"                                           + CRLF + CRLF
   hb_socketSend( oSocket, cRequest )
   hb_socketRecv( oSocket, @cRtspSetup )
   
   // Extraer Session ID
   PUBLIC nPos, nEnd, cSession := ""
   nPos := AT( "Session:", cRtspSetup )
   IF nPos > 0
      nEnd := AT( CRLF, SUBSTR( cRtspSetup, nPos ) )
      cSession:= ALLTRIM( SUBSTR( cRtspSetup, nPos + 8, nEnd-1 ) )
   ENDIF

   
   // 3) PLAY
   nSeq++
   cRequest := "PLAY rtsp://192.168.100.16:554/22992e47b611dde40dde83b803ca1ab0_0 RTSP/1.0\r\n" + CRLF + ;
        "CSeq: " + LTRIM(STR(nSeq))                                                            + CRLF + ;
        "Session: " + cSession                                                                  + CRLF + ;
        "Range: npt=0.000-\r\n"                                                                 + CRLF + CRLF   
   hb_socketSend( oSocket, cRequest )
   hb_socketRecv( oSocket, @cRtspPlay , LEN( cRtspPlay ))
   WAITWINDOW()
   hb_socketClose( oSocket )

RETURN
]]>
Con la ayuda de WireShark pude ver como es el inicio de sesion de la aplicacion de la camara sobre TCP/IP capturando los paquetes TCP en la red.
Pude crear el socket y sobre protocolo RSTP pude enviar las credenciales al servidor RSTP de la camara y que acepte mis peticiones.
Ahora en mas resolver los metodos SETUP y extraer la sessionID para completar el metodo PLAY

Code: Select all

#include <hmg.ch>
#include "hbsocket.ch"


FUNCTION Main()
   PUBLIC oSocket , cRequest
   PUBLIC cRtspDescribe    := Space( 1024 )
   PUBLIC cRtspSetup       := Space( 1024 )
   PUBLIC cRtspPlay        := Space( 1024 )
   PUBLIC nPos, nEnd, nSeq := 0
   PUBLIC cSession         := ""
   PUBLIC cServerIP        := "192.168.100.16"   // IP de la cámara
   PUBLIC nPort            := 554                // Puerto RTSP
   
   LOAD Window Main
   Center Window Main
   Activate Window Main
   
   FUNCTION Connect()
   oSocket    := hb_socketOpen()
   IF oSocket == NIL
      MSGINFO("Error al crear socket")
      RETURN
   ENDIF

   IF ! hb_socketConnect( oSocket, {HB_SOCKET_AF_INET, cServerIP, nPort } )
      MSGINFO("No se pudo conectar a:", cServerIP)
      hb_socketClose( oSocket )
      RETURN
   ENDIF

   // 1) DESCRIBE
      nSeq++
      cRequest := "DESCRIBE rtsp://192.168.100.16:554/22992e47b611dde40dde83b803ca1ab0_0 RTSP/1.0\r\n" + CRLF + ;
                  "CSeq: " + LTRIM( STR( nSeq ) ) + "\r\n"                                             + CRLF + ;
		          "User-Agent: HarbourClient/1.0\r\n"                                                  + CRLF + ;
                  "Accept: application/sdp\r\n"                                                        + CRLF + CRLF
   hb_socketSend( oSocket, cRequest       )
   hb_socketRecv( oSocket, @cRtspDescribe, LEN( cRtspDescribe )  )

   // 2) SETUP 
   nSeq++
   cRequest := "SETUP rtsp://192.168.100.16:554/22992e47b611dde40dde83b803ca1ab0_0/trackID=0 RTSP/1.0\r\n"  + CRLF + ;
               "CSeq: " + LTRIM( STR( nSeq ) ) + "\r\n"                                                     + CRLF + ;
		       "User-Agent: HarbourHMGClient/1.0\r\n"                                                       + CRLF + ;
               "Transport: RTP/AVP/TCP;unicast;interleaved=2\r\n"                                           + CRLF + CRLF
   hb_socketSend( oSocket, cRequest )
   hb_socketRecv( oSocket, @cRtspSetup )
   
   // Extraer Session ID
   PUBLIC nPos, nEnd, cSession := ""
   nPos := AT( "Session:", cRtspSetup )
   IF nPos > 0
      nEnd := AT( CRLF, SUBSTR( cRtspSetup, nPos ) )
      cSession:= ALLTRIM( SUBSTR( cRtspSetup, nPos + 8, nEnd-1 ) )
   ENDIF

   
   // 3) PLAY
   nSeq++
   cRequest := "PLAY rtsp://192.168.100.16:554/22992e47b611dde40dde83b803ca1ab0_0 RTSP/1.0\r\n" + CRLF + ;
        "CSeq: " + LTRIM(STR(nSeq))                                                            + CRLF + ;
        "Session: " + cSession                                                                  + CRLF + ;
        "Range: npt=0.000-\r\n"                                                                 + CRLF + CRLF   
   hb_socketSend( oSocket, cRequest )
   hb_socketRecv( oSocket, @cRtspPlay , LEN( cRtspPlay ))
   WAITWINDOW()
   hb_socketClose( oSocket )

RETURN
]]>
<![CDATA[General :: Re: TCP/IP RSTP :: Reply by serge_girard]]> 2025-09-28T06:40:55+00:00 2025-09-28T06:40:55+00:00 http://www.hmgforum.com/viewtopic.php?f=24&t=7700&p=71926#p71926 <![CDATA[General :: Re: TCP/IP RSTP :: Reply by mol]]> 2025-09-28T17:21:43+00:00 2025-09-28T17:21:43+00:00 http://www.hmgforum.com/viewtopic.php?f=24&t=7700&p=71927#p71927 Don't you need to send username and password for the camera?]]> Don't you need to send username and password for the camera?]]> <![CDATA[General :: Re: TCP/IP RSTP :: Reply by franco]]> 2025-09-29T15:41:58+00:00 2025-09-29T15:41:58+00:00 http://www.hmgforum.com/viewtopic.php?f=24&t=7700&p=71928#p71928 How long after taking picture does it arrive on computer. Or is this what it does.
Do you think this would work with a cell phone.
What size is the image when you receive it. What format ? jpg]]>
How long after taking picture does it arrive on computer. Or is this what it does.
Do you think this would work with a cell phone.
What size is the image when you receive it. What format ? jpg]]>
<![CDATA[General :: Re: TCP/IP RSTP :: Reply by danielmaximiliano]]> 2025-09-30T21:35:39+00:00 2025-09-30T21:35:39+00:00 http://www.hmgforum.com/viewtopic.php?f=24&t=7700&p=71930#p71930
mol wrote: Sun Sep 28, 2025 5:21 pm Very iteresting!
Don't you need to send username and password for the camera?
Hello Mol, sorry for the delay in answering your question.
On Android or PC, when installing the application it insists on adding the camera with its QR or Code that it has on a label. When you run the program or application, it only asks for the password and then recommends changing it. it never asks you to enter it again that's why I use the RTSP chain that I see in WIRESHARK.
I am studying how to recover the SessionID returned by the "SETUP" Method, which it is not returning with my program but in the case of the official application.
by the way I am encapsulating all the classes
However, with the method "OPTION" that I do not see that the official application uses through WireShark, it does return the SessionID that is required by other RTSP Methods
En Android o la PC, al instalar la aplicacion te insiste en agregar la camara con su QR o Codigo que tiene en una etiqueta. al ejecutar el programa o aplicacion te pide solamente el password y despues te recomienda cambiarlo. nunca ms te pide entrarlo por eso yo uso la cadena RTSP que veo en WIRESHARK.
estoy estudiando la forma de recuperar la SessionID que devuelve el Metodo "SETUP" al cual no est devolviendo con mi programa pero si en el caso de la aplicacion oficial.
de paso estoy encapsulando todo el Clases
sin embargo con el metodo "OPTION" que no veo que usa la aplicacion oficial mediante WireShark si devuelve la SessionID que es requerida por otros Metodos de RTSP
]]>
mol wrote: Sun Sep 28, 2025 5:21 pm Very iteresting!
Don't you need to send username and password for the camera?
Hello Mol, sorry for the delay in answering your question.
On Android or PC, when installing the application it insists on adding the camera with its QR or Code that it has on a label. When you run the program or application, it only asks for the password and then recommends changing it. it never asks you to enter it again that's why I use the RTSP chain that I see in WIRESHARK.
I am studying how to recover the SessionID returned by the "SETUP" Method, which it is not returning with my program but in the case of the official application.
by the way I am encapsulating all the classes
However, with the method "OPTION" that I do not see that the official application uses through WireShark, it does return the SessionID that is required by other RTSP Methods
En Android o la PC, al instalar la aplicacion te insiste en agregar la camara con su QR o Codigo que tiene en una etiqueta. al ejecutar el programa o aplicacion te pide solamente el password y despues te recomienda cambiarlo. nunca ms te pide entrarlo por eso yo uso la cadena RTSP que veo en WIRESHARK.
estoy estudiando la forma de recuperar la SessionID que devuelve el Metodo "SETUP" al cual no est devolviendo con mi programa pero si en el caso de la aplicacion oficial.
de paso estoy encapsulando todo el Clases
sin embargo con el metodo "OPTION" que no veo que usa la aplicacion oficial mediante WireShark si devuelve la SessionID que es requerida por otros Metodos de RTSP
]]>
<![CDATA[General :: Re: TCP/IP RSTP :: Reply by danielmaximiliano]]> 2025-10-02T19:31:59+00:00 2025-10-02T19:31:59+00:00 http://www.hmgforum.com/viewtopic.php?f=24&t=7700&p=71935#p71935 OPTION, DESCRIBE, SETUP, PLAY y TEARDOWN con hbsocket y la ayuda de WIRESHARK :D
ahora me queda recuperar los datos de VIDEO y AUDIO para mostrarlo en una VENTANA con ACTIVEX de VLC :mrgreen:
Captura de pantalla 2025-10-02 161830.jpg
les dejos el fuente aquí :arrow:
Camera.rar
próximamente iré publicando las mejoras

Attachments


Captura de pantalla 2025-10-02 161830.jpg (333.44 KiB)

Camera.rar (290.73 KiB)
]]>
OPTION, DESCRIBE, SETUP, PLAY y TEARDOWN con hbsocket y la ayuda de WIRESHARK :D
ahora me queda recuperar los datos de VIDEO y AUDIO para mostrarlo en una VENTANA con ACTIVEX de VLC :mrgreen:
Captura de pantalla 2025-10-02 161830.jpg
les dejos el fuente aquí :arrow:
Camera.rar
próximamente iré publicando las mejoras

Attachments


Captura de pantalla 2025-10-02 161830.jpg (333.44 KiB)

Camera.rar (290.73 KiB)
]]>
<![CDATA[General :: Re: TCP/IP RSTP :: Reply by mol]]> 2025-10-02T19:35:34+00:00 2025-10-02T19:35:34+00:00 http://www.hmgforum.com/viewtopic.php?f=24&t=7700&p=71936#p71936 <![CDATA[General :: Re: TCP/IP RSTP :: Reply by Steed]]> 2025-10-03T23:40:25+00:00 2025-10-03T23:40:25+00:00 http://www.hmgforum.com/viewtopic.php?f=24&t=7700&p=71940#p71940
mol wrote: Thu Oct 02, 2025 7:35 pmGreat job, Daniel
+1]]>
mol wrote: Thu Oct 02, 2025 7:35 pmGreat job, Daniel
+1]]>
<![CDATA[General :: Re: OT: API Google crear gráficas :: Reply by tonton2]]> 2025-10-09T11:10:01+00:00 2025-10-09T11:10:01+00:00 http://www.hmgforum.com/viewtopic.php?f=24&t=5718&p=71947#p71947
mustafa wrote: Tue Nov 27, 2018 7:48 pm Hola amigos
Felicidades por la aplicación "edk"
He modificado el Sample de "edk" con la opción de Base de datos de "Tonton2"
Haber que os parece ?
Saludos
Mustafa
*---------------------------------------------- Google -------------------------------------*
Hello friends
Congratulations on the "edk" application
I modified the "edk" Sample with the "Tonton2" database option
What do you think?
Regards
Mustafa :idea:
J'ai modifié l'exemple de EDK et de MUSTAFA .Pour voir la Le PRIX TOTAL et la QUANTITE par reference faites defiler le curseur de la souris sur "REFERENCE"
I modified the example from EDK and MUSTAFA. To see the TOTAL PRICE and QUANTITY per reference, hover your mouse over 'REFERENCE'."

Attachments

DIAGRAMME_1.rar (1397.82 KiB)
]]>
mustafa wrote: Tue Nov 27, 2018 7:48 pm Hola amigos
Felicidades por la aplicación "edk"
He modificado el Sample de "edk" con la opción de Base de datos de "Tonton2"
Haber que os parece ?
Saludos
Mustafa
*---------------------------------------------- Google -------------------------------------*
Hello friends
Congratulations on the "edk" application
I modified the "edk" Sample with the "Tonton2" database option
What do you think?
Regards
Mustafa :idea:
J'ai modifié l'exemple de EDK et de MUSTAFA .Pour voir la Le PRIX TOTAL et la QUANTITE par reference faites defiler le curseur de la souris sur "REFERENCE"
I modified the example from EDK and MUSTAFA. To see the TOTAL PRICE and QUANTITY per reference, hover your mouse over 'REFERENCE'."

Attachments

DIAGRAMME_1.rar (1397.82 KiB)
]]>
<![CDATA[General :: IDE Unicode V1.2a :: Author danielmaximiliano]]> 2025-10-19T00:36:35+00:00 2025-10-19T00:36:35+00:00 http://www.hmgforum.com/viewtopic.php?f=24&t=7707&p=71955#p71955 desde hace bastantes dias vengo luchando para poder usar las librería libvlc.dll y libvlccore.dll usando libload() y dyncall() pero todo llevaba a mal puerto. Usando ChatGPT me puse a investigar sobre el comportamiento de Libload() en modo 64 bits y se llego a la conclusión de no utilizarlo y crear un nuevo VLC_LoadLib( "libvlc.dll" )

Code: Select all

IF ! VLC_LoadLib( libPath )
     ? "❌ Error: no se pudo cargar", libPath
      RETURN
   ENDIF
   ? "✅ libvlc.dll cargada correctamente."
✅ libvlc.dll cargada correctamente.


una vez cargada la DLL poder utilizar las funciones exportadas de la mismas en este caso

Code: Select all

// --- 4) Llamar a VLC_New()
   inst := VLC_New( NIL )
  
   IF inst == 0
      ? "⚠️ VLC_New devolvió NULL (0)."
      VLC_UnloadLib()
      RETURN
   ELSE
      ? "Instancia creada correctamente:", Hex64( inst )
   ENDIF
Instancia creada correctamente: 0x0000023EAB501700

Ya tengo resuelto todo pero encuentro que el IDE no me permite cargar un archivo .c en el proyecto, si cierro el proyecto y lo edito con Notepad++ y abro el proyecto desaparece del archivo proyecto.hbp
Captura de pantalla 2025-10-18 205459.png
esos son todos los archivos que se pueden agregar al proyecto :cry: , hay alguna otra forma de agregarlo o ya que si agrego

Code: Select all

#include "hmg.ch"
#include "vlc_bridge64.c"

#define CRLF  INetCRLF()

FUNCTION Main()
LOCAL cLib     := "libvlc.dll"
LOCAL cPlugins := ".\\plugins"
LOCAL cFile    := "video.mp4"

PUBLIC pMediaPlayer
PUBLIC cCurrentFolder :=  GetCurrentFolder()
PUBLIC oRTSP := RTSPConnection():New( "192.168.100.16", 554 )
PUBLIC pInst
PUBLIC lOk
   
   DEFINE WINDOW Main ;
el contenido de hb_out.log es esto
Application Internal Error - C:\Temp\Camera\Camera.exe
Terminated at: 2025-10-18 21:30:37
Unrecoverable error 9012: Can't locate the starting procedure: 'MAIN'
------------------------------------------------------------------------

Attachments


Captura de pantalla 2025-10-18 205459.png (49.55 KiB)

]]>
desde hace bastantes dias vengo luchando para poder usar las librería libvlc.dll y libvlccore.dll usando libload() y dyncall() pero todo llevaba a mal puerto. Usando ChatGPT me puse a investigar sobre el comportamiento de Libload() en modo 64 bits y se llego a la conclusión de no utilizarlo y crear un nuevo VLC_LoadLib( "libvlc.dll" )

Code: Select all

IF ! VLC_LoadLib( libPath )
     ? "❌ Error: no se pudo cargar", libPath
      RETURN
   ENDIF
   ? "✅ libvlc.dll cargada correctamente."
✅ libvlc.dll cargada correctamente.


una vez cargada la DLL poder utilizar las funciones exportadas de la mismas en este caso

Code: Select all

// --- 4) Llamar a VLC_New()
   inst := VLC_New( NIL )
  
   IF inst == 0
      ? "⚠️ VLC_New devolvió NULL (0)."
      VLC_UnloadLib()
      RETURN
   ELSE
      ? "Instancia creada correctamente:", Hex64( inst )
   ENDIF
Instancia creada correctamente: 0x0000023EAB501700

Ya tengo resuelto todo pero encuentro que el IDE no me permite cargar un archivo .c en el proyecto, si cierro el proyecto y lo edito con Notepad++ y abro el proyecto desaparece del archivo proyecto.hbp
Captura de pantalla 2025-10-18 205459.png
esos son todos los archivos que se pueden agregar al proyecto :cry: , hay alguna otra forma de agregarlo o ya que si agrego

Code: Select all

#include "hmg.ch"
#include "vlc_bridge64.c"

#define CRLF  INetCRLF()

FUNCTION Main()
LOCAL cLib     := "libvlc.dll"
LOCAL cPlugins := ".\\plugins"
LOCAL cFile    := "video.mp4"

PUBLIC pMediaPlayer
PUBLIC cCurrentFolder :=  GetCurrentFolder()
PUBLIC oRTSP := RTSPConnection():New( "192.168.100.16", 554 )
PUBLIC pInst
PUBLIC lOk
   
   DEFINE WINDOW Main ;
el contenido de hb_out.log es esto
Application Internal Error - C:\Temp\Camera\Camera.exe
Terminated at: 2025-10-18 21:30:37
Unrecoverable error 9012: Can't locate the starting procedure: 'MAIN'
------------------------------------------------------------------------

Attachments


Captura de pantalla 2025-10-18 205459.png (49.55 KiB)

]]>
<![CDATA[General :: Re: IDE Unicode V1.2a :: Reply by danielmaximiliano]]> 2025-10-19T01:35:37+00:00 2025-10-19T01:35:37+00:00 http://www.hmgforum.com/viewtopic.php?f=24&t=7707&p=71956#p71956

Code: Select all

#pragma BEGINDUMP
....... C code ......
#pragma ENDDUMP
]]>

Code: Select all

#pragma BEGINDUMP
....... C code ......
#pragma ENDDUMP
]]>
<![CDATA[General :: Libvlc.dll Working :: Author danielmaximiliano]]> 2025-10-20T19:44:37+00:00 2025-10-20T19:44:37+00:00 http://www.hmgforum.com/viewtopic.php?f=24&t=7708&p=71958#p71958 despues de 2 semanas luchando con hb_LibLoad("libvlc.dll") en 64 bits y que sus funciones den error , intentar con crear librerias estaticas "libvlc.a" teniendo el mismo resultado...no funciona. :(

usando ChatGPT pedi que me ayudara a usar libvlc con hb_libload sin ningun resulto con todos los ejemplos simples compilando Harbour 64 + Mingw 64 que se encuentra en la instalacion HMG 64.. todo sin resultado alguno..

procedí pedirle que que me hiciera un simple con de hb_loadlib() y entrego como resultado vlc_loadlib() que me devuelve correctamente todos los punteros de las funciones exportadas de libvlc.dll :D .

al hacer vemos las funciones

Code: Select all

dumpbin /exports libvlc.dll | find "vlc_"
como ya tenia lo principal fue pedirle que me diga como usar esas funciones para poder usarla en el proyecto Camara que estoy implementando con el IDE de HMG y me da el resultado que agregue al Main.prg dentro del bloque

Code: Select all

#pragma BEGINDUMP
#include "hbapi.h"
#include <windows.h>
#include <stdint.h>   // para tipos enteros fijos

// --- Tipos básicos equivalentes ---
typedef int64_t libvlc_time_t;

// --- Funciones de libVLC ---
typedef void * (__cdecl *PFN_LIBVLC_NEW)(int, const char *const *);
typedef void   (__cdecl *PFN_LIBVLC_RELEASE)(void *);
typedef void * (__cdecl *PFN_LIBVLC_MEDIA_NEW_PATH)(void *, const char *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIA_RELEASE)(void *);
typedef void * (__cdecl *PFN_LIBVLC_MEDIAPLAYER_NEW)(void *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIAPLAYER_RELEASE)(void *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIAPLAYER_SET_MEDIA)(void *, void *);
typedef int    (__cdecl *PFN_LIBVLC_MEDIAPLAYER_PLAY)(void *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIAPLAYER_STOP)(void *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIAPLAYER_SETHWND)(void *, void *);
typedef libvlc_time_t (__cdecl *PFN_LIBVLC_MEDIAPLAYER_GET_TIME)(void *);

static HMODULE hVlc = NULL;

static PFN_LIBVLC_NEW                     pLibVLC_New = NULL;
static PFN_LIBVLC_RELEASE                 pLibVLC_Release = NULL;
static PFN_LIBVLC_MEDIA_NEW_PATH          pLibVLC_Media_New_Path = NULL;
static PFN_LIBVLC_MEDIA_RELEASE           pLibVLC_Media_Release = NULL;
static PFN_LIBVLC_MEDIAPLAYER_NEW         pLibVLC_MediaPlayer_New = NULL;
static PFN_LIBVLC_MEDIAPLAYER_RELEASE     pLibVLC_MediaPlayer_Release = NULL;
static PFN_LIBVLC_MEDIAPLAYER_SET_MEDIA   pLibVLC_MediaPlayer_Set_Media = NULL;
static PFN_LIBVLC_MEDIAPLAYER_PLAY        pLibVLC_MediaPlayer_Play = NULL;
static PFN_LIBVLC_MEDIAPLAYER_STOP        pLibVLC_MediaPlayer_Stop = NULL;
static PFN_LIBVLC_MEDIAPLAYER_GET_TIME    pLibVLC_MediaPlayer_GetTime = NULL;
static PFN_LIBVLC_MEDIAPLAYER_SETHWND     pLibVLC_MediaPlayer_SetHwnd = NULL;


// --- Carga la DLL y obtiene punteros ---
HB_FUNC( VLC_LOADLIB )
{
   const char * path = hb_parc( 1 );
   hVlc = LoadLibraryA( path ? path : "libvlc.dll" );
   if( !hVlc )
   {
      hb_retl( HB_FALSE );
      return;
   }

   pLibVLC_New = (PFN_LIBVLC_NEW) GetProcAddress( hVlc, "libvlc_new" );
   pLibVLC_Release = (PFN_LIBVLC_RELEASE) GetProcAddress( hVlc, "libvlc_release" );
   pLibVLC_Media_New_Path = (PFN_LIBVLC_MEDIA_NEW_PATH) GetProcAddress( hVlc, "libvlc_media_new_path" );
   pLibVLC_Media_Release = (PFN_LIBVLC_MEDIA_RELEASE) GetProcAddress( hVlc, "libvlc_media_release" );
   pLibVLC_MediaPlayer_New = (PFN_LIBVLC_MEDIAPLAYER_NEW) GetProcAddress( hVlc, "libvlc_media_player_new" );
   pLibVLC_MediaPlayer_Release = (PFN_LIBVLC_MEDIAPLAYER_RELEASE) GetProcAddress( hVlc, "libvlc_media_player_release" );
   pLibVLC_MediaPlayer_Set_Media = (PFN_LIBVLC_MEDIAPLAYER_SET_MEDIA) GetProcAddress( hVlc, "libvlc_media_player_set_media" );
   pLibVLC_MediaPlayer_Play = (PFN_LIBVLC_MEDIAPLAYER_PLAY) GetProcAddress( hVlc, "libvlc_media_player_play" );
   pLibVLC_MediaPlayer_Stop = (PFN_LIBVLC_MEDIAPLAYER_STOP) GetProcAddress( hVlc, "libvlc_media_player_stop" );
   pLibVLC_MediaPlayer_GetTime = (PFN_LIBVLC_MEDIAPLAYER_GET_TIME) GetProcAddress( hVlc, "libvlc_media_player_get_time" );

   hb_retl( pLibVLC_New != NULL );
}

// --- Libera la DLL ---
HB_FUNC( VLC_UNLOADLIB )
{
   if( hVlc )
   {
      FreeLibrary( hVlc );
      hVlc = NULL;
   }
}

// --- Obtiene dirección de símbolo ---
HB_FUNC( VLC_GETSYMBOLADDRESS )
{
   const char * name = hb_parc(1);
   FARPROC addr = NULL;
   if( hVlc && name )
      addr = GetProcAddress( hVlc, name );
   hb_retnll( (HB_LONGLONG)(LONG_PTR) addr );
}

// --- Crea una instancia de VLC ---
HB_FUNC( VLC_NEW )
{
   void *inst = NULL;
   if( pLibVLC_New )
      inst = pLibVLC_New( 0, NULL );
   hb_retnll( (HB_LONGLONG)(LONG_PTR) inst );
}

// --- Libera instancia ---
HB_FUNC( VLC_RELEASE )
{
   void *inst = (void *)(LONG_PTR) hb_parnll(1);
   if( pLibVLC_Release && inst )
      pLibVLC_Release( inst );
}

// --- Reproduce un archivo ---
HB_FUNC( VLC_PLAYPATH )
{
   void *inst = (void *)(LONG_PTR) hb_parnll(1);
   const char *path = hb_parc(2);
   void *media = NULL;
   void *mp = NULL;

   if( !inst || !path || !pLibVLC_Media_New_Path )
   {
      hb_retnll(0);
      return;
   }

   media = pLibVLC_Media_New_Path( inst, path );
   mp = pLibVLC_MediaPlayer_New( inst );

   if( media && mp )
   {
      pLibVLC_MediaPlayer_Set_Media( mp, media );
      pLibVLC_Media_Release( media );
      pLibVLC_MediaPlayer_Play( mp );
   }

   hb_retnll( (HB_LONGLONG)(LONG_PTR) mp );
}

// --- Devuelve tiempo actual ---
HB_FUNC( VLC_MEDIAPLAYERGETTIME )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   hb_retnll( (pLibVLC_MediaPlayer_GetTime && mp) ?
              (HB_LONGLONG)pLibVLC_MediaPlayer_GetTime( mp ) : 0 );
}

// --- Detiene reproducción ---
HB_FUNC( VLC_MEDIAPLAYERSTOP )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   if( pLibVLC_MediaPlayer_Stop && mp )
      pLibVLC_MediaPlayer_Stop( mp );
}

// --- Libera reproductor ---
HB_FUNC( VLC_MEDIAPLAYERRELEASE )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   if( pLibVLC_MediaPlayer_Release && mp )
      pLibVLC_MediaPlayer_Release( mp );
}

// --- Asocia la ventana de reproducción (HWND) ---
// Permite reproducir el video dentro de un control HMG (ej. FrameVideo)
HB_FUNC( VLC_MEDIAPLAYERSETHWND )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);   // MediaPlayer
   HWND hWnd = (HWND)(LONG_PTR) hb_parnll(2);    // Handle de control HMG

   if( pLibVLC_MediaPlayer_SetHwnd == NULL && hVlc )
   {
      // obtener dirección si no se cargó aún
      pLibVLC_MediaPlayer_SetHwnd = (PFN_LIBVLC_MEDIAPLAYER_SETHWND)
         GetProcAddress( hVlc, "libvlc_media_player_set_hwnd" );
   }

   if( pLibVLC_MediaPlayer_SetHwnd && mp && hWnd )
   {
      pLibVLC_MediaPlayer_SetHwnd( mp, (void *)hWnd );
   }
}
/* ============================================================
   Enlaces Harbour ↔ libVLC para controlar MediaPlayer
   ============================================================ */

HB_FUNC( VLC_MEDIAPLAYERSETMEDIA )
{
    void *pMediaPlayer = ( void * ) ( HB_PTRUINT ) hb_parnll( 1 );
    void *pMedia       = ( void * ) ( HB_PTRUINT ) hb_parnll( 2 );

    if( pLibVLC_MediaPlayer_Set_Media != NULL && pMediaPlayer && pMedia )
        pLibVLC_MediaPlayer_Set_Media( pMediaPlayer, pMedia );
}

HB_FUNC( VLC_MEDIAPLAYERPLAY )
{
    void *pMediaPlayer = ( void * ) ( HB_PTRUINT ) hb_parnll( 1 );

    if( pLibVLC_MediaPlayer_Play != NULL && pMediaPlayer )
        hb_retni( pLibVLC_MediaPlayer_Play( pMediaPlayer ) );
    else
        hb_retni( -1 );
}

// --- Pausa la reproducción ---
HB_FUNC( VLC_MEDIAPLAYERPAUSE )
{
    void *mp = (void *)(LONG_PTR) hb_parnll(1);
    FARPROC pPause = GetProcAddress(hVlc, "libvlc_media_player_pause");
    if( pPause && mp )
        ((void (__cdecl *)(void *))pPause)(mp);
}

// --- Verifica si está reproduciendo ---
HB_FUNC( VLC_MEDIAPLAYERISPLAYING )
{
    void *mp = (void *)(LONG_PTR) hb_parnll(1);
    FARPROC pIsPlaying = GetProcAddress(hVlc, "libvlc_media_player_is_playing");
    hb_retni( (pIsPlaying && mp) ? ((int (__cdecl *)(void *))pIsPlaying)(mp) : 0 );
}

// --- Ajusta el volumen ---
HB_FUNC( VLC_AUDIOSETVOLUME )
{
    void *mp = (void *)(LONG_PTR) hb_parnll(1);
    int vol = hb_parni(2);
    FARPROC pSetVol = GetProcAddress(hVlc, "libvlc_audio_set_volume");
    if( pSetVol && mp )
        ((void (__cdecl *)(void *, int))pSetVol)(mp, vol);
}

// --- Obtiene el volumen actual ---
HB_FUNC( VLC_AUDIOGETVOLUME )
{
    void *mp = (void *)(LONG_PTR) hb_parnll(1);
    FARPROC pGetVol = GetProcAddress(hVlc, "libvlc_audio_get_volume");
    hb_retni( (pGetVol && mp) ? ((int (__cdecl *)(void *))pGetVol)(mp) : -1 );
}

// --- Devuelve la duración total ---
HB_FUNC( VLC_MEDIAPLAYERGETLENGTH )
{
    void *mp = (void *)(LONG_PTR) hb_parnll(1);
    FARPROC pLen = GetProcAddress(hVlc, "libvlc_media_player_get_length");
    hb_retnll( (pLen && mp) ? ((libvlc_time_t (__cdecl *)(void *))pLen)(mp) : 0 );
}

// --- Cambia el tiempo actual ---
HB_FUNC( VLC_MEDIAPLAYERSETTIME )
{
    void *mp = (void *)(LONG_PTR) hb_parnll(1);
    libvlc_time_t t = (libvlc_time_t)hb_parnll(2);
    FARPROC pSetTime = GetProcAddress(hVlc, "libvlc_media_player_set_time");
    if( pSetTime && mp )
        ((void (__cdecl *)(void *, libvlc_time_t))pSetTime)(mp, t);
}

// --- Cambia posición relativa (0.0–1.0) ---
HB_FUNC( VLC_MEDIAPLAYERSETPOSITION )
{
    void *mp = (void *)(LONG_PTR) hb_parnll(1);
    float pos = (float)hb_parnd(2);
    FARPROC pSetPos = GetProcAddress(hVlc, "libvlc_media_player_set_position");
    if( pSetPos && mp )
        ((void (__cdecl *)(void *, float))pSetPos)(mp, pos);
}

// --- Obtiene posición relativa actual ---
HB_FUNC( VLC_MEDIAPLAYERGETPOSITION )
{
    void *mp = (void *)(LONG_PTR) hb_parnll(1);
    FARPROC pGetPos = GetProcAddress(hVlc, "libvlc_media_player_get_position");
    hb_retnd( (pGetPos && mp) ? ((float (__cdecl *)(void *))pGetPos)(mp) : 0.0 );
}

// --- Devuelve estado del reproductor ---
HB_FUNC( VLC_MEDIAPLAYERGETSTATE )
{
    void *mp = (void *)(LONG_PTR) hb_parnll(1);
    FARPROC pGetState = GetProcAddress(hVlc, "libvlc_media_player_get_state");
    hb_retni( (pGetState && mp) ? ((int (__cdecl *)(void *))pGetState)(mp) : -1 );
}

#pragma ENDDUMP

ya contento con el funcioanamiento correcto de libvlc voy a seguir con recuperar el video que esta encapsulado en RSP (todavia lo estoy implementado) , si quieren ver el proyecto lo voy a subir a Drive en un momento y compartirlo con uds para agegrar nuevas funciones]]>
despues de 2 semanas luchando con hb_LibLoad("libvlc.dll") en 64 bits y que sus funciones den error , intentar con crear librerias estaticas "libvlc.a" teniendo el mismo resultado...no funciona. :(

usando ChatGPT pedi que me ayudara a usar libvlc con hb_libload sin ningun resulto con todos los ejemplos simples compilando Harbour 64 + Mingw 64 que se encuentra en la instalacion HMG 64.. todo sin resultado alguno..

procedí pedirle que que me hiciera un simple con de hb_loadlib() y entrego como resultado vlc_loadlib() que me devuelve correctamente todos los punteros de las funciones exportadas de libvlc.dll :D .

al hacer vemos las funciones

Code: Select all

dumpbin /exports libvlc.dll | find "vlc_"
como ya tenia lo principal fue pedirle que me diga como usar esas funciones para poder usarla en el proyecto Camara que estoy implementando con el IDE de HMG y me da el resultado que agregue al Main.prg dentro del bloque

Code: Select all

#pragma BEGINDUMP
#include "hbapi.h"
#include <windows.h>
#include <stdint.h>   // para tipos enteros fijos

// --- Tipos básicos equivalentes ---
typedef int64_t libvlc_time_t;

// --- Funciones de libVLC ---
typedef void * (__cdecl *PFN_LIBVLC_NEW)(int, const char *const *);
typedef void   (__cdecl *PFN_LIBVLC_RELEASE)(void *);
typedef void * (__cdecl *PFN_LIBVLC_MEDIA_NEW_PATH)(void *, const char *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIA_RELEASE)(void *);
typedef void * (__cdecl *PFN_LIBVLC_MEDIAPLAYER_NEW)(void *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIAPLAYER_RELEASE)(void *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIAPLAYER_SET_MEDIA)(void *, void *);
typedef int    (__cdecl *PFN_LIBVLC_MEDIAPLAYER_PLAY)(void *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIAPLAYER_STOP)(void *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIAPLAYER_SETHWND)(void *, void *);
typedef libvlc_time_t (__cdecl *PFN_LIBVLC_MEDIAPLAYER_GET_TIME)(void *);

static HMODULE hVlc = NULL;

static PFN_LIBVLC_NEW                     pLibVLC_New = NULL;
static PFN_LIBVLC_RELEASE                 pLibVLC_Release = NULL;
static PFN_LIBVLC_MEDIA_NEW_PATH          pLibVLC_Media_New_Path = NULL;
static PFN_LIBVLC_MEDIA_RELEASE           pLibVLC_Media_Release = NULL;
static PFN_LIBVLC_MEDIAPLAYER_NEW         pLibVLC_MediaPlayer_New = NULL;
static PFN_LIBVLC_MEDIAPLAYER_RELEASE     pLibVLC_MediaPlayer_Release = NULL;
static PFN_LIBVLC_MEDIAPLAYER_SET_MEDIA   pLibVLC_MediaPlayer_Set_Media = NULL;
static PFN_LIBVLC_MEDIAPLAYER_PLAY        pLibVLC_MediaPlayer_Play = NULL;
static PFN_LIBVLC_MEDIAPLAYER_STOP        pLibVLC_MediaPlayer_Stop = NULL;
static PFN_LIBVLC_MEDIAPLAYER_GET_TIME    pLibVLC_MediaPlayer_GetTime = NULL;
static PFN_LIBVLC_MEDIAPLAYER_SETHWND     pLibVLC_MediaPlayer_SetHwnd = NULL;


// --- Carga la DLL y obtiene punteros ---
HB_FUNC( VLC_LOADLIB )
{
   const char * path = hb_parc( 1 );
   hVlc = LoadLibraryA( path ? path : "libvlc.dll" );
   if( !hVlc )
   {
      hb_retl( HB_FALSE );
      return;
   }

   pLibVLC_New = (PFN_LIBVLC_NEW) GetProcAddress( hVlc, "libvlc_new" );
   pLibVLC_Release = (PFN_LIBVLC_RELEASE) GetProcAddress( hVlc, "libvlc_release" );
   pLibVLC_Media_New_Path = (PFN_LIBVLC_MEDIA_NEW_PATH) GetProcAddress( hVlc, "libvlc_media_new_path" );
   pLibVLC_Media_Release = (PFN_LIBVLC_MEDIA_RELEASE) GetProcAddress( hVlc, "libvlc_media_release" );
   pLibVLC_MediaPlayer_New = (PFN_LIBVLC_MEDIAPLAYER_NEW) GetProcAddress( hVlc, "libvlc_media_player_new" );
   pLibVLC_MediaPlayer_Release = (PFN_LIBVLC_MEDIAPLAYER_RELEASE) GetProcAddress( hVlc, "libvlc_media_player_release" );
   pLibVLC_MediaPlayer_Set_Media = (PFN_LIBVLC_MEDIAPLAYER_SET_MEDIA) GetProcAddress( hVlc, "libvlc_media_player_set_media" );
   pLibVLC_MediaPlayer_Play = (PFN_LIBVLC_MEDIAPLAYER_PLAY) GetProcAddress( hVlc, "libvlc_media_player_play" );
   pLibVLC_MediaPlayer_Stop = (PFN_LIBVLC_MEDIAPLAYER_STOP) GetProcAddress( hVlc, "libvlc_media_player_stop" );
   pLibVLC_MediaPlayer_GetTime = (PFN_LIBVLC_MEDIAPLAYER_GET_TIME) GetProcAddress( hVlc, "libvlc_media_player_get_time" );

   hb_retl( pLibVLC_New != NULL );
}

// --- Libera la DLL ---
HB_FUNC( VLC_UNLOADLIB )
{
   if( hVlc )
   {
      FreeLibrary( hVlc );
      hVlc = NULL;
   }
}

// --- Obtiene dirección de símbolo ---
HB_FUNC( VLC_GETSYMBOLADDRESS )
{
   const char * name = hb_parc(1);
   FARPROC addr = NULL;
   if( hVlc && name )
      addr = GetProcAddress( hVlc, name );
   hb_retnll( (HB_LONGLONG)(LONG_PTR) addr );
}

// --- Crea una instancia de VLC ---
HB_FUNC( VLC_NEW )
{
   void *inst = NULL;
   if( pLibVLC_New )
      inst = pLibVLC_New( 0, NULL );
   hb_retnll( (HB_LONGLONG)(LONG_PTR) inst );
}

// --- Libera instancia ---
HB_FUNC( VLC_RELEASE )
{
   void *inst = (void *)(LONG_PTR) hb_parnll(1);
   if( pLibVLC_Release && inst )
      pLibVLC_Release( inst );
}

// --- Reproduce un archivo ---
HB_FUNC( VLC_PLAYPATH )
{
   void *inst = (void *)(LONG_PTR) hb_parnll(1);
   const char *path = hb_parc(2);
   void *media = NULL;
   void *mp = NULL;

   if( !inst || !path || !pLibVLC_Media_New_Path )
   {
      hb_retnll(0);
      return;
   }

   media = pLibVLC_Media_New_Path( inst, path );
   mp = pLibVLC_MediaPlayer_New( inst );

   if( media && mp )
   {
      pLibVLC_MediaPlayer_Set_Media( mp, media );
      pLibVLC_Media_Release( media );
      pLibVLC_MediaPlayer_Play( mp );
   }

   hb_retnll( (HB_LONGLONG)(LONG_PTR) mp );
}

// --- Devuelve tiempo actual ---
HB_FUNC( VLC_MEDIAPLAYERGETTIME )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   hb_retnll( (pLibVLC_MediaPlayer_GetTime && mp) ?
              (HB_LONGLONG)pLibVLC_MediaPlayer_GetTime( mp ) : 0 );
}

// --- Detiene reproducción ---
HB_FUNC( VLC_MEDIAPLAYERSTOP )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   if( pLibVLC_MediaPlayer_Stop && mp )
      pLibVLC_MediaPlayer_Stop( mp );
}

// --- Libera reproductor ---
HB_FUNC( VLC_MEDIAPLAYERRELEASE )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   if( pLibVLC_MediaPlayer_Release && mp )
      pLibVLC_MediaPlayer_Release( mp );
}

// --- Asocia la ventana de reproducción (HWND) ---
// Permite reproducir el video dentro de un control HMG (ej. FrameVideo)
HB_FUNC( VLC_MEDIAPLAYERSETHWND )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);   // MediaPlayer
   HWND hWnd = (HWND)(LONG_PTR) hb_parnll(2);    // Handle de control HMG

   if( pLibVLC_MediaPlayer_SetHwnd == NULL && hVlc )
   {
      // obtener dirección si no se cargó aún
      pLibVLC_MediaPlayer_SetHwnd = (PFN_LIBVLC_MEDIAPLAYER_SETHWND)
         GetProcAddress( hVlc, "libvlc_media_player_set_hwnd" );
   }

   if( pLibVLC_MediaPlayer_SetHwnd && mp && hWnd )
   {
      pLibVLC_MediaPlayer_SetHwnd( mp, (void *)hWnd );
   }
}
/* ============================================================
   Enlaces Harbour ↔ libVLC para controlar MediaPlayer
   ============================================================ */

HB_FUNC( VLC_MEDIAPLAYERSETMEDIA )
{
    void *pMediaPlayer = ( void * ) ( HB_PTRUINT ) hb_parnll( 1 );
    void *pMedia       = ( void * ) ( HB_PTRUINT ) hb_parnll( 2 );

    if( pLibVLC_MediaPlayer_Set_Media != NULL && pMediaPlayer && pMedia )
        pLibVLC_MediaPlayer_Set_Media( pMediaPlayer, pMedia );
}

HB_FUNC( VLC_MEDIAPLAYERPLAY )
{
    void *pMediaPlayer = ( void * ) ( HB_PTRUINT ) hb_parnll( 1 );

    if( pLibVLC_MediaPlayer_Play != NULL && pMediaPlayer )
        hb_retni( pLibVLC_MediaPlayer_Play( pMediaPlayer ) );
    else
        hb_retni( -1 );
}

// --- Pausa la reproducción ---
HB_FUNC( VLC_MEDIAPLAYERPAUSE )
{
    void *mp = (void *)(LONG_PTR) hb_parnll(1);
    FARPROC pPause = GetProcAddress(hVlc, "libvlc_media_player_pause");
    if( pPause && mp )
        ((void (__cdecl *)(void *))pPause)(mp);
}

// --- Verifica si está reproduciendo ---
HB_FUNC( VLC_MEDIAPLAYERISPLAYING )
{
    void *mp = (void *)(LONG_PTR) hb_parnll(1);
    FARPROC pIsPlaying = GetProcAddress(hVlc, "libvlc_media_player_is_playing");
    hb_retni( (pIsPlaying && mp) ? ((int (__cdecl *)(void *))pIsPlaying)(mp) : 0 );
}

// --- Ajusta el volumen ---
HB_FUNC( VLC_AUDIOSETVOLUME )
{
    void *mp = (void *)(LONG_PTR) hb_parnll(1);
    int vol = hb_parni(2);
    FARPROC pSetVol = GetProcAddress(hVlc, "libvlc_audio_set_volume");
    if( pSetVol && mp )
        ((void (__cdecl *)(void *, int))pSetVol)(mp, vol);
}

// --- Obtiene el volumen actual ---
HB_FUNC( VLC_AUDIOGETVOLUME )
{
    void *mp = (void *)(LONG_PTR) hb_parnll(1);
    FARPROC pGetVol = GetProcAddress(hVlc, "libvlc_audio_get_volume");
    hb_retni( (pGetVol && mp) ? ((int (__cdecl *)(void *))pGetVol)(mp) : -1 );
}

// --- Devuelve la duración total ---
HB_FUNC( VLC_MEDIAPLAYERGETLENGTH )
{
    void *mp = (void *)(LONG_PTR) hb_parnll(1);
    FARPROC pLen = GetProcAddress(hVlc, "libvlc_media_player_get_length");
    hb_retnll( (pLen && mp) ? ((libvlc_time_t (__cdecl *)(void *))pLen)(mp) : 0 );
}

// --- Cambia el tiempo actual ---
HB_FUNC( VLC_MEDIAPLAYERSETTIME )
{
    void *mp = (void *)(LONG_PTR) hb_parnll(1);
    libvlc_time_t t = (libvlc_time_t)hb_parnll(2);
    FARPROC pSetTime = GetProcAddress(hVlc, "libvlc_media_player_set_time");
    if( pSetTime && mp )
        ((void (__cdecl *)(void *, libvlc_time_t))pSetTime)(mp, t);
}

// --- Cambia posición relativa (0.0–1.0) ---
HB_FUNC( VLC_MEDIAPLAYERSETPOSITION )
{
    void *mp = (void *)(LONG_PTR) hb_parnll(1);
    float pos = (float)hb_parnd(2);
    FARPROC pSetPos = GetProcAddress(hVlc, "libvlc_media_player_set_position");
    if( pSetPos && mp )
        ((void (__cdecl *)(void *, float))pSetPos)(mp, pos);
}

// --- Obtiene posición relativa actual ---
HB_FUNC( VLC_MEDIAPLAYERGETPOSITION )
{
    void *mp = (void *)(LONG_PTR) hb_parnll(1);
    FARPROC pGetPos = GetProcAddress(hVlc, "libvlc_media_player_get_position");
    hb_retnd( (pGetPos && mp) ? ((float (__cdecl *)(void *))pGetPos)(mp) : 0.0 );
}

// --- Devuelve estado del reproductor ---
HB_FUNC( VLC_MEDIAPLAYERGETSTATE )
{
    void *mp = (void *)(LONG_PTR) hb_parnll(1);
    FARPROC pGetState = GetProcAddress(hVlc, "libvlc_media_player_get_state");
    hb_retni( (pGetState && mp) ? ((int (__cdecl *)(void *))pGetState)(mp) : -1 );
}

#pragma ENDDUMP

ya contento con el funcioanamiento correcto de libvlc voy a seguir con recuperar el video que esta encapsulado en RSP (todavia lo estoy implementado) , si quieren ver el proyecto lo voy a subir a Drive en un momento y compartirlo con uds para agegrar nuevas funciones]]>
<![CDATA[General :: Re: Libvlc.dll Working :: Reply by danielmaximiliano]]> 2025-10-20T19:51:44+00:00 2025-10-20T19:51:44+00:00 http://www.hmgforum.com/viewtopic.php?f=24&t=7708&p=71959#p71959 https://drive.google.com/drive/folders/ ... sp=sharing]]> https://drive.google.com/drive/folders/ ... sp=sharing]]> <![CDATA[General :: Re: Libvlc.dll Working :: Reply by luisvasquezcl]]> 2025-10-22T03:19:04+00:00 2025-10-22T03:19:04+00:00 http://www.hmgforum.com/viewtopic.php?f=24&t=7708&p=71960#p71960 Muchas gracias por tu aporte.
Saludos desde chile.]]>
Muchas gracias por tu aporte.
Saludos desde chile.]]>
<![CDATA[General :: Re: Libvlc.dll Working :: Reply by danielmaximiliano]]> 2025-10-22T03:48:31+00:00 2025-10-22T03:48:31+00:00 http://www.hmgforum.com/viewtopic.php?f=24&t=7708&p=71961#p71961
luisvasquezcl wrote: Wed Oct 22, 2025 3:19 am Hola Daniel,
Muchas gracias por tu aporte.
Saludos desde chile.
gracias, era una necesidad que tenia ya que el programa de windows de esa camara es muy pobre, solo me deja ver una a la vez, ahora que mejore todo puedo ver las 2 camaras en un solo contenedor.. la app de android es mucho mejor pero sigue viendo solo una camara y necesito salir para ver la otra.. quiero llegar a hacer un DVR donde me permita ver varias simultaneamente.]]>
luisvasquezcl wrote: Wed Oct 22, 2025 3:19 am Hola Daniel,
Muchas gracias por tu aporte.
Saludos desde chile.
gracias, era una necesidad que tenia ya que el programa de windows de esa camara es muy pobre, solo me deja ver una a la vez, ahora que mejore todo puedo ver las 2 camaras en un solo contenedor.. la app de android es mucho mejor pero sigue viendo solo una camara y necesito salir para ver la otra.. quiero llegar a hacer un DVR donde me permita ver varias simultaneamente.]]>
<![CDATA[General :: Re: Libvlc.dll Working :: Reply by danielmaximiliano]]> 2025-10-22T03:51:11+00:00 2025-10-22T03:51:11+00:00 http://www.hmgforum.com/viewtopic.php?f=24&t=7708&p=71962#p71962

Enlace a Driver : https://drive.google.com/drive/folders/ ... sp=sharing]]>


Enlace a Driver : https://drive.google.com/drive/folders/ ... sp=sharing]]>
<![CDATA[General :: Re: Libvlc.dll Working :: Reply by danielmaximiliano]]> 2025-10-22T13:55:21+00:00 2025-10-22T13:55:21+00:00 http://www.hmgforum.com/viewtopic.php?f=24&t=7708&p=71963#p71963 la modificacion corresponde a compilar en modo 32 o 64bits en el ide. la condicion es que libvcl.dll o libvlccore.dll esten en la carpeta del ejecutable y sea de de vlc32 o vcl64

.\Source\vlc_bridge.Prg

Code: Select all

#pragma BEGINDUMP

#include "hbapi.h"
#include <windows.h>
#include <stdint.h>   // para tipos enteros fijos

#pragma GCC diagnostic ignored "-Wcast-function-type"

// --- Tipos básicos equivalentes ---

#if defined(_WIN64)
    typedef int64_t libvlc_time_t;   // 64 bits
#else
    typedef int32_t libvlc_time_t;   // 32 bits
#endif


// --- Funciones de libVLC ---
typedef void * (__cdecl *PFN_LIBVLC_NEW)(int, const char *const *);
typedef void   (__cdecl *PFN_LIBVLC_RELEASE)(void *);
typedef void * (__cdecl *PFN_LIBVLC_MEDIA_NEW_PATH)(void *, const char *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIA_RELEASE)(void *);
typedef void * (__cdecl *PFN_LIBVLC_MEDIAPLAYER_NEW)(void *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIAPLAYER_RELEASE)(void *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIAPLAYER_SET_MEDIA)(void *, void *);
typedef int    (__cdecl *PFN_LIBVLC_MEDIAPLAYER_PLAY)(void *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIAPLAYER_STOP)(void *);
typedef libvlc_time_t (__cdecl *PFN_LIBVLC_MEDIAPLAYER_GET_TIME)(void *);

//--- funciones agregadas el 21-10-2025

typedef void * (__cdecl *PFN_LIBVLC_MEDIA_NEW_LOCATION)(void *, const char *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIA_ADD_OPTION)(void *, const char *);
typedef void * (__cdecl *PFN_LIBVLC_MEDIAPLAYER_NEW_FROM_MEDIA)(void *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIAPLAYER_SET_HWND)(void *, void *);
typedef int    (__cdecl *PFN_LIBVLC_MEDIAPLAYER_IS_PLAYING)(void *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIAPLAYER_PAUSE)(void *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIAPLAYER_SET_FULLSCREEN)(void *, int);
typedef int    (__cdecl *PFN_LIBVLC_MEDIAPLAYER_GET_STATE)(void *);
typedef libvlc_time_t (__cdecl *PFN_LIBVLC_MEDIAPLAYER_GET_LENGTH)(void *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIAPLAYER_SET_TIME)(void *, libvlc_time_t);
typedef int    (__cdecl *PFN_LIBVLC_AUDIO_GET_VOLUME)(void *);
typedef void   (__cdecl *PFN_LIBVLC_AUDIO_SET_VOLUME)(void *, int);

static HMODULE hVlc = NULL;

static PFN_LIBVLC_NEW                     pLibVLC_New = NULL;
static PFN_LIBVLC_RELEASE                 pLibVLC_Release = NULL;
static PFN_LIBVLC_MEDIA_NEW_PATH          pLibVLC_Media_New_Path = NULL;
static PFN_LIBVLC_MEDIA_RELEASE           pLibVLC_Media_Release = NULL;
static PFN_LIBVLC_MEDIAPLAYER_NEW         pLibVLC_MediaPlayer_New = NULL;
static PFN_LIBVLC_MEDIAPLAYER_RELEASE     pLibVLC_MediaPlayer_Release = NULL;
static PFN_LIBVLC_MEDIAPLAYER_SET_MEDIA   pLibVLC_MediaPlayer_Set_Media = NULL;
static PFN_LIBVLC_MEDIAPLAYER_PLAY        pLibVLC_MediaPlayer_Play = NULL;
static PFN_LIBVLC_MEDIAPLAYER_STOP        pLibVLC_MediaPlayer_Stop = NULL;
static PFN_LIBVLC_MEDIAPLAYER_GET_TIME    pLibVLC_MediaPlayer_GetTime = NULL;
static PFN_LIBVLC_MEDIA_NEW_LOCATION        pLibVLC_Media_New_Location = NULL;
static PFN_LIBVLC_MEDIA_ADD_OPTION          pLibVLC_Media_Add_Option = NULL;
static PFN_LIBVLC_MEDIAPLAYER_NEW_FROM_MEDIA pLibVLC_MediaPlayer_New_From_Media = NULL;
static PFN_LIBVLC_MEDIAPLAYER_SET_HWND      pLibVLC_MediaPlayer_Set_Hwnd = NULL;
static PFN_LIBVLC_MEDIAPLAYER_IS_PLAYING    pLibVLC_MediaPlayer_Is_Playing = NULL;
static PFN_LIBVLC_MEDIAPLAYER_PAUSE         pLibVLC_MediaPlayer_Pause = NULL;
static PFN_LIBVLC_MEDIAPLAYER_SET_FULLSCREEN pLibVLC_MediaPlayer_Set_Fullscreen = NULL;
static PFN_LIBVLC_MEDIAPLAYER_GET_STATE     pLibVLC_MediaPlayer_Get_State = NULL;
static PFN_LIBVLC_MEDIAPLAYER_GET_LENGTH    pLibVLC_MediaPlayer_Get_Length = NULL;
static PFN_LIBVLC_MEDIAPLAYER_SET_TIME      pLibVLC_MediaPlayer_Set_Time = NULL;
static PFN_LIBVLC_AUDIO_GET_VOLUME          pLibVLC_Audio_Get_Volume = NULL;
static PFN_LIBVLC_AUDIO_SET_VOLUME          pLibVLC_Audio_Set_Volume = NULL;



// --- Carga la DLL y obtiene punteros ---
HB_FUNC( VLC_LOADLIB )
{
   const char * path = hb_parc( 1 );
   hVlc = LoadLibraryA( path ? path : "libvlc.dll" );
   if( !hVlc )
   {
      hb_retl( HB_FALSE );
      return;
   }

   pLibVLC_New = (PFN_LIBVLC_NEW) GetProcAddress( hVlc, "libvlc_new" );
   pLibVLC_Release = (PFN_LIBVLC_RELEASE) GetProcAddress( hVlc, "libvlc_release" );
   pLibVLC_Media_New_Path = (PFN_LIBVLC_MEDIA_NEW_PATH) GetProcAddress( hVlc, "libvlc_media_new_path" );
   pLibVLC_Media_Release = (PFN_LIBVLC_MEDIA_RELEASE) GetProcAddress( hVlc, "libvlc_media_release" );
   pLibVLC_MediaPlayer_New = (PFN_LIBVLC_MEDIAPLAYER_NEW) GetProcAddress( hVlc, "libvlc_media_player_new" );
   pLibVLC_MediaPlayer_Release = (PFN_LIBVLC_MEDIAPLAYER_RELEASE) GetProcAddress( hVlc, "libvlc_media_player_release" );
   pLibVLC_MediaPlayer_Set_Media = (PFN_LIBVLC_MEDIAPLAYER_SET_MEDIA) GetProcAddress( hVlc, "libvlc_media_player_set_media" );
   pLibVLC_MediaPlayer_Play = (PFN_LIBVLC_MEDIAPLAYER_PLAY) GetProcAddress( hVlc, "libvlc_media_player_play" );
   pLibVLC_MediaPlayer_Stop = (PFN_LIBVLC_MEDIAPLAYER_STOP) GetProcAddress( hVlc, "libvlc_media_player_stop" );
   pLibVLC_MediaPlayer_GetTime = (PFN_LIBVLC_MEDIAPLAYER_GET_TIME) GetProcAddress( hVlc, "libvlc_media_player_get_time" );
   pLibVLC_Media_New_Location = (PFN_LIBVLC_MEDIA_NEW_LOCATION) GetProcAddress( hVlc, "libvlc_media_new_location" );
   pLibVLC_Media_Add_Option = (PFN_LIBVLC_MEDIA_ADD_OPTION) GetProcAddress( hVlc, "libvlc_media_add_option" );
   pLibVLC_MediaPlayer_New_From_Media = (PFN_LIBVLC_MEDIAPLAYER_NEW_FROM_MEDIA) GetProcAddress( hVlc, "libvlc_media_player_new_from_media" );
   pLibVLC_MediaPlayer_Set_Hwnd = (PFN_LIBVLC_MEDIAPLAYER_SET_HWND) GetProcAddress( hVlc, "libvlc_media_player_set_hwnd" );
   pLibVLC_MediaPlayer_Is_Playing = (PFN_LIBVLC_MEDIAPLAYER_IS_PLAYING) GetProcAddress( hVlc, "libvlc_media_player_is_playing" );
   pLibVLC_MediaPlayer_Pause = (PFN_LIBVLC_MEDIAPLAYER_PAUSE) GetProcAddress( hVlc, "libvlc_media_player_pause" );
   pLibVLC_MediaPlayer_Set_Fullscreen = (PFN_LIBVLC_MEDIAPLAYER_SET_FULLSCREEN) GetProcAddress( hVlc, "libvlc_set_fullscreen" );
   pLibVLC_MediaPlayer_Get_State = (PFN_LIBVLC_MEDIAPLAYER_GET_STATE) GetProcAddress( hVlc, "libvlc_media_player_get_state" );
   pLibVLC_MediaPlayer_Get_Length = (PFN_LIBVLC_MEDIAPLAYER_GET_LENGTH) GetProcAddress( hVlc, "libvlc_media_player_get_length" );
   pLibVLC_MediaPlayer_Set_Time = (PFN_LIBVLC_MEDIAPLAYER_SET_TIME) GetProcAddress( hVlc, "libvlc_media_player_set_time" );
   pLibVLC_Audio_Get_Volume = (PFN_LIBVLC_AUDIO_GET_VOLUME) GetProcAddress( hVlc, "libvlc_audio_get_volume" );
   pLibVLC_Audio_Set_Volume = (PFN_LIBVLC_AUDIO_SET_VOLUME) GetProcAddress( hVlc, "libvlc_audio_set_volume" );


   hb_retl( pLibVLC_New != NULL );
}

// --- Libera la DLL ---
HB_FUNC( VLC_UNLOADLIB )
{
   if( hVlc )
   {
      FreeLibrary( hVlc );
      hVlc = NULL;
   }
}

// --- Obtiene dirección de símbolo ---
HB_FUNC( VLC_GETSYMBOLADDRESS )
{
   const char * name = hb_parc(1);
   FARPROC addr = NULL;
   if( hVlc && name )
      addr = GetProcAddress( hVlc, name );
   hb_retnll( (HB_LONGLONG)(LONG_PTR) addr );
}

// --- Crea una instancia de VLC ---
HB_FUNC( VLC_NEW )
{
   void *inst = NULL;
   if( pLibVLC_New )
      inst = pLibVLC_New( 0, NULL );
   hb_retnll( (HB_LONGLONG)(LONG_PTR) inst );
}

// --- Libera instancia ---
HB_FUNC( VLC_RELEASE )
{
   void *inst = (void *)(LONG_PTR) hb_parnll(1);
   if( pLibVLC_Release && inst )
      pLibVLC_Release( inst );
}

// --- Reproduce un archivo ---
HB_FUNC( VLC_PLAYPATH )
{
   void *inst = (void *)(LONG_PTR) hb_parnll(1);
   const char *path = hb_parc(2);
   void *media = NULL;
   void *mp = NULL;

   if( !inst || !path || !pLibVLC_Media_New_Path )
   {
      hb_retnll(0);
      return;
   }

   media = pLibVLC_Media_New_Path( inst, path );
   mp = pLibVLC_MediaPlayer_New( inst );

   if( media && mp )
   {
      pLibVLC_MediaPlayer_Set_Media( mp, media );
      pLibVLC_Media_Release( media );
      pLibVLC_MediaPlayer_Play( mp );
   }

   hb_retnll( (HB_LONGLONG)(LONG_PTR) mp );
}

// --- Devuelve tiempo actual ---
HB_FUNC( VLC_MEDIAPLAYERGETTIME )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   hb_retnll( (pLibVLC_MediaPlayer_GetTime && mp) ?
              (HB_LONGLONG)pLibVLC_MediaPlayer_GetTime( mp ) : 0 );
}

// --- Detiene reproducción ---
HB_FUNC( VLC_MEDIAPLAYERSTOP )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   if( pLibVLC_MediaPlayer_Stop && mp )
      pLibVLC_MediaPlayer_Stop( mp );
}

// --- Libera reproductor ---
HB_FUNC( VLC_MEDIAPLAYERRELEASE )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   if( pLibVLC_MediaPlayer_Release && mp )
      pLibVLC_MediaPlayer_Release( mp );
}

HB_FUNC( VLC_MEDIA_NEW_LOCATION )
{
   void *inst = (void *)(LONG_PTR) hb_parnll(1);
   const char *url = hb_parc(2);
   if( pLibVLC_Media_New_Location && inst && url )
      hb_retnll( (HB_LONGLONG)(LONG_PTR) pLibVLC_Media_New_Location( inst, url ) );
   else
      hb_retnll( 0 );
}

HB_FUNC( VLC_MEDIA_ADD_OPTION )
{
   void *media = (void *)(LONG_PTR) hb_parnll(1);
   const char *opt = hb_parc(2);
   if( pLibVLC_Media_Add_Option && media && opt )
      pLibVLC_Media_Add_Option( media, opt );
}

HB_FUNC( VLC_MEDIAPLAYER_NEW_FROM_MEDIA )
{
   void *media = (void *)(LONG_PTR) hb_parnll(1);
   hb_retnll( (HB_LONGLONG)(LONG_PTR)
              (pLibVLC_MediaPlayer_New_From_Media && media ?
               pLibVLC_MediaPlayer_New_From_Media( media ) : NULL) );
}

HB_FUNC( VLC_MEDIAPLAYERSETHWND )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   void *hwnd = (void *)(LONG_PTR) hb_parnll(2);
   if( pLibVLC_MediaPlayer_Set_Hwnd && mp )
      pLibVLC_MediaPlayer_Set_Hwnd( mp, hwnd );
}

HB_FUNC( VLC_MEDIAPLAYERPLAY )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   if( pLibVLC_MediaPlayer_Play && mp )
      pLibVLC_MediaPlayer_Play( mp );
}

HB_FUNC( VLC_MEDIAPLAYERISPLAYING )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   hb_retl( (pLibVLC_MediaPlayer_Is_Playing && mp) ? pLibVLC_MediaPlayer_Is_Playing( mp ) != 0 : HB_FALSE );
}

HB_FUNC( VLC_PAUSE )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   if( pLibVLC_MediaPlayer_Pause && mp )
      pLibVLC_MediaPlayer_Pause( mp );
}

HB_FUNC( VLC_MEDIAPLAYERGETSTATE )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   hb_retni( (pLibVLC_MediaPlayer_Get_State && mp) ?
              pLibVLC_MediaPlayer_Get_State( mp ) : -1 );
}

HB_FUNC( VLC_MEDIAPLAYERGETLENGTH )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   hb_retnll( (pLibVLC_MediaPlayer_Get_Length && mp) ?
              (HB_LONGLONG)pLibVLC_MediaPlayer_Get_Length( mp ) : 0 );
}

HB_FUNC( VLC_MEDIAPLAYERSETTIME )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   libvlc_time_t t = (libvlc_time_t) hb_parnll(2);
   if( pLibVLC_MediaPlayer_Set_Time && mp )
      pLibVLC_MediaPlayer_Set_Time( mp, t );
}

HB_FUNC( VLC_MEDIAPLAYERPAUSE )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   if( pLibVLC_MediaPlayer_Pause && mp )
      pLibVLC_MediaPlayer_Pause( mp );
}

HB_FUNC( VLC_FULLSCREEN )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   int enable = hb_parl(2);
   if( pLibVLC_MediaPlayer_Set_Fullscreen && mp )
      pLibVLC_MediaPlayer_Set_Fullscreen( mp, enable );
}

HB_FUNC( VLC_AUDIOGETVOLUME )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   hb_retni( (pLibVLC_Audio_Get_Volume && mp) ?
             pLibVLC_Audio_Get_Volume( mp ) : -1 );
}

HB_FUNC( VLC_AUDIOSETVOLUME )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   int vol = hb_parni(2);
   if( pLibVLC_Audio_Set_Volume && mp )
      pLibVLC_Audio_Set_Volume( mp, vol );
}

HB_FUNC( VLC_MEDIA_NEW_PATH )
{
   void *inst = (void *)(LONG_PTR) hb_parnll(1);
   const char *path = hb_parc(2);

   if( pLibVLC_Media_New_Path && inst && path )
      hb_retnll( (HB_LONGLONG)(LONG_PTR) pLibVLC_Media_New_Path( inst, path ) );
   else
      hb_retnll( 0 );
}

#pragma ENDDUMP

]]>
la modificacion corresponde a compilar en modo 32 o 64bits en el ide. la condicion es que libvcl.dll o libvlccore.dll esten en la carpeta del ejecutable y sea de de vlc32 o vcl64

.\Source\vlc_bridge.Prg

Code: Select all

#pragma BEGINDUMP

#include "hbapi.h"
#include <windows.h>
#include <stdint.h>   // para tipos enteros fijos

#pragma GCC diagnostic ignored "-Wcast-function-type"

// --- Tipos básicos equivalentes ---

#if defined(_WIN64)
    typedef int64_t libvlc_time_t;   // 64 bits
#else
    typedef int32_t libvlc_time_t;   // 32 bits
#endif


// --- Funciones de libVLC ---
typedef void * (__cdecl *PFN_LIBVLC_NEW)(int, const char *const *);
typedef void   (__cdecl *PFN_LIBVLC_RELEASE)(void *);
typedef void * (__cdecl *PFN_LIBVLC_MEDIA_NEW_PATH)(void *, const char *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIA_RELEASE)(void *);
typedef void * (__cdecl *PFN_LIBVLC_MEDIAPLAYER_NEW)(void *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIAPLAYER_RELEASE)(void *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIAPLAYER_SET_MEDIA)(void *, void *);
typedef int    (__cdecl *PFN_LIBVLC_MEDIAPLAYER_PLAY)(void *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIAPLAYER_STOP)(void *);
typedef libvlc_time_t (__cdecl *PFN_LIBVLC_MEDIAPLAYER_GET_TIME)(void *);

//--- funciones agregadas el 21-10-2025

typedef void * (__cdecl *PFN_LIBVLC_MEDIA_NEW_LOCATION)(void *, const char *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIA_ADD_OPTION)(void *, const char *);
typedef void * (__cdecl *PFN_LIBVLC_MEDIAPLAYER_NEW_FROM_MEDIA)(void *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIAPLAYER_SET_HWND)(void *, void *);
typedef int    (__cdecl *PFN_LIBVLC_MEDIAPLAYER_IS_PLAYING)(void *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIAPLAYER_PAUSE)(void *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIAPLAYER_SET_FULLSCREEN)(void *, int);
typedef int    (__cdecl *PFN_LIBVLC_MEDIAPLAYER_GET_STATE)(void *);
typedef libvlc_time_t (__cdecl *PFN_LIBVLC_MEDIAPLAYER_GET_LENGTH)(void *);
typedef void   (__cdecl *PFN_LIBVLC_MEDIAPLAYER_SET_TIME)(void *, libvlc_time_t);
typedef int    (__cdecl *PFN_LIBVLC_AUDIO_GET_VOLUME)(void *);
typedef void   (__cdecl *PFN_LIBVLC_AUDIO_SET_VOLUME)(void *, int);

static HMODULE hVlc = NULL;

static PFN_LIBVLC_NEW                     pLibVLC_New = NULL;
static PFN_LIBVLC_RELEASE                 pLibVLC_Release = NULL;
static PFN_LIBVLC_MEDIA_NEW_PATH          pLibVLC_Media_New_Path = NULL;
static PFN_LIBVLC_MEDIA_RELEASE           pLibVLC_Media_Release = NULL;
static PFN_LIBVLC_MEDIAPLAYER_NEW         pLibVLC_MediaPlayer_New = NULL;
static PFN_LIBVLC_MEDIAPLAYER_RELEASE     pLibVLC_MediaPlayer_Release = NULL;
static PFN_LIBVLC_MEDIAPLAYER_SET_MEDIA   pLibVLC_MediaPlayer_Set_Media = NULL;
static PFN_LIBVLC_MEDIAPLAYER_PLAY        pLibVLC_MediaPlayer_Play = NULL;
static PFN_LIBVLC_MEDIAPLAYER_STOP        pLibVLC_MediaPlayer_Stop = NULL;
static PFN_LIBVLC_MEDIAPLAYER_GET_TIME    pLibVLC_MediaPlayer_GetTime = NULL;
static PFN_LIBVLC_MEDIA_NEW_LOCATION        pLibVLC_Media_New_Location = NULL;
static PFN_LIBVLC_MEDIA_ADD_OPTION          pLibVLC_Media_Add_Option = NULL;
static PFN_LIBVLC_MEDIAPLAYER_NEW_FROM_MEDIA pLibVLC_MediaPlayer_New_From_Media = NULL;
static PFN_LIBVLC_MEDIAPLAYER_SET_HWND      pLibVLC_MediaPlayer_Set_Hwnd = NULL;
static PFN_LIBVLC_MEDIAPLAYER_IS_PLAYING    pLibVLC_MediaPlayer_Is_Playing = NULL;
static PFN_LIBVLC_MEDIAPLAYER_PAUSE         pLibVLC_MediaPlayer_Pause = NULL;
static PFN_LIBVLC_MEDIAPLAYER_SET_FULLSCREEN pLibVLC_MediaPlayer_Set_Fullscreen = NULL;
static PFN_LIBVLC_MEDIAPLAYER_GET_STATE     pLibVLC_MediaPlayer_Get_State = NULL;
static PFN_LIBVLC_MEDIAPLAYER_GET_LENGTH    pLibVLC_MediaPlayer_Get_Length = NULL;
static PFN_LIBVLC_MEDIAPLAYER_SET_TIME      pLibVLC_MediaPlayer_Set_Time = NULL;
static PFN_LIBVLC_AUDIO_GET_VOLUME          pLibVLC_Audio_Get_Volume = NULL;
static PFN_LIBVLC_AUDIO_SET_VOLUME          pLibVLC_Audio_Set_Volume = NULL;



// --- Carga la DLL y obtiene punteros ---
HB_FUNC( VLC_LOADLIB )
{
   const char * path = hb_parc( 1 );
   hVlc = LoadLibraryA( path ? path : "libvlc.dll" );
   if( !hVlc )
   {
      hb_retl( HB_FALSE );
      return;
   }

   pLibVLC_New = (PFN_LIBVLC_NEW) GetProcAddress( hVlc, "libvlc_new" );
   pLibVLC_Release = (PFN_LIBVLC_RELEASE) GetProcAddress( hVlc, "libvlc_release" );
   pLibVLC_Media_New_Path = (PFN_LIBVLC_MEDIA_NEW_PATH) GetProcAddress( hVlc, "libvlc_media_new_path" );
   pLibVLC_Media_Release = (PFN_LIBVLC_MEDIA_RELEASE) GetProcAddress( hVlc, "libvlc_media_release" );
   pLibVLC_MediaPlayer_New = (PFN_LIBVLC_MEDIAPLAYER_NEW) GetProcAddress( hVlc, "libvlc_media_player_new" );
   pLibVLC_MediaPlayer_Release = (PFN_LIBVLC_MEDIAPLAYER_RELEASE) GetProcAddress( hVlc, "libvlc_media_player_release" );
   pLibVLC_MediaPlayer_Set_Media = (PFN_LIBVLC_MEDIAPLAYER_SET_MEDIA) GetProcAddress( hVlc, "libvlc_media_player_set_media" );
   pLibVLC_MediaPlayer_Play = (PFN_LIBVLC_MEDIAPLAYER_PLAY) GetProcAddress( hVlc, "libvlc_media_player_play" );
   pLibVLC_MediaPlayer_Stop = (PFN_LIBVLC_MEDIAPLAYER_STOP) GetProcAddress( hVlc, "libvlc_media_player_stop" );
   pLibVLC_MediaPlayer_GetTime = (PFN_LIBVLC_MEDIAPLAYER_GET_TIME) GetProcAddress( hVlc, "libvlc_media_player_get_time" );
   pLibVLC_Media_New_Location = (PFN_LIBVLC_MEDIA_NEW_LOCATION) GetProcAddress( hVlc, "libvlc_media_new_location" );
   pLibVLC_Media_Add_Option = (PFN_LIBVLC_MEDIA_ADD_OPTION) GetProcAddress( hVlc, "libvlc_media_add_option" );
   pLibVLC_MediaPlayer_New_From_Media = (PFN_LIBVLC_MEDIAPLAYER_NEW_FROM_MEDIA) GetProcAddress( hVlc, "libvlc_media_player_new_from_media" );
   pLibVLC_MediaPlayer_Set_Hwnd = (PFN_LIBVLC_MEDIAPLAYER_SET_HWND) GetProcAddress( hVlc, "libvlc_media_player_set_hwnd" );
   pLibVLC_MediaPlayer_Is_Playing = (PFN_LIBVLC_MEDIAPLAYER_IS_PLAYING) GetProcAddress( hVlc, "libvlc_media_player_is_playing" );
   pLibVLC_MediaPlayer_Pause = (PFN_LIBVLC_MEDIAPLAYER_PAUSE) GetProcAddress( hVlc, "libvlc_media_player_pause" );
   pLibVLC_MediaPlayer_Set_Fullscreen = (PFN_LIBVLC_MEDIAPLAYER_SET_FULLSCREEN) GetProcAddress( hVlc, "libvlc_set_fullscreen" );
   pLibVLC_MediaPlayer_Get_State = (PFN_LIBVLC_MEDIAPLAYER_GET_STATE) GetProcAddress( hVlc, "libvlc_media_player_get_state" );
   pLibVLC_MediaPlayer_Get_Length = (PFN_LIBVLC_MEDIAPLAYER_GET_LENGTH) GetProcAddress( hVlc, "libvlc_media_player_get_length" );
   pLibVLC_MediaPlayer_Set_Time = (PFN_LIBVLC_MEDIAPLAYER_SET_TIME) GetProcAddress( hVlc, "libvlc_media_player_set_time" );
   pLibVLC_Audio_Get_Volume = (PFN_LIBVLC_AUDIO_GET_VOLUME) GetProcAddress( hVlc, "libvlc_audio_get_volume" );
   pLibVLC_Audio_Set_Volume = (PFN_LIBVLC_AUDIO_SET_VOLUME) GetProcAddress( hVlc, "libvlc_audio_set_volume" );


   hb_retl( pLibVLC_New != NULL );
}

// --- Libera la DLL ---
HB_FUNC( VLC_UNLOADLIB )
{
   if( hVlc )
   {
      FreeLibrary( hVlc );
      hVlc = NULL;
   }
}

// --- Obtiene dirección de símbolo ---
HB_FUNC( VLC_GETSYMBOLADDRESS )
{
   const char * name = hb_parc(1);
   FARPROC addr = NULL;
   if( hVlc && name )
      addr = GetProcAddress( hVlc, name );
   hb_retnll( (HB_LONGLONG)(LONG_PTR) addr );
}

// --- Crea una instancia de VLC ---
HB_FUNC( VLC_NEW )
{
   void *inst = NULL;
   if( pLibVLC_New )
      inst = pLibVLC_New( 0, NULL );
   hb_retnll( (HB_LONGLONG)(LONG_PTR) inst );
}

// --- Libera instancia ---
HB_FUNC( VLC_RELEASE )
{
   void *inst = (void *)(LONG_PTR) hb_parnll(1);
   if( pLibVLC_Release && inst )
      pLibVLC_Release( inst );
}

// --- Reproduce un archivo ---
HB_FUNC( VLC_PLAYPATH )
{
   void *inst = (void *)(LONG_PTR) hb_parnll(1);
   const char *path = hb_parc(2);
   void *media = NULL;
   void *mp = NULL;

   if( !inst || !path || !pLibVLC_Media_New_Path )
   {
      hb_retnll(0);
      return;
   }

   media = pLibVLC_Media_New_Path( inst, path );
   mp = pLibVLC_MediaPlayer_New( inst );

   if( media && mp )
   {
      pLibVLC_MediaPlayer_Set_Media( mp, media );
      pLibVLC_Media_Release( media );
      pLibVLC_MediaPlayer_Play( mp );
   }

   hb_retnll( (HB_LONGLONG)(LONG_PTR) mp );
}

// --- Devuelve tiempo actual ---
HB_FUNC( VLC_MEDIAPLAYERGETTIME )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   hb_retnll( (pLibVLC_MediaPlayer_GetTime && mp) ?
              (HB_LONGLONG)pLibVLC_MediaPlayer_GetTime( mp ) : 0 );
}

// --- Detiene reproducción ---
HB_FUNC( VLC_MEDIAPLAYERSTOP )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   if( pLibVLC_MediaPlayer_Stop && mp )
      pLibVLC_MediaPlayer_Stop( mp );
}

// --- Libera reproductor ---
HB_FUNC( VLC_MEDIAPLAYERRELEASE )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   if( pLibVLC_MediaPlayer_Release && mp )
      pLibVLC_MediaPlayer_Release( mp );
}

HB_FUNC( VLC_MEDIA_NEW_LOCATION )
{
   void *inst = (void *)(LONG_PTR) hb_parnll(1);
   const char *url = hb_parc(2);
   if( pLibVLC_Media_New_Location && inst && url )
      hb_retnll( (HB_LONGLONG)(LONG_PTR) pLibVLC_Media_New_Location( inst, url ) );
   else
      hb_retnll( 0 );
}

HB_FUNC( VLC_MEDIA_ADD_OPTION )
{
   void *media = (void *)(LONG_PTR) hb_parnll(1);
   const char *opt = hb_parc(2);
   if( pLibVLC_Media_Add_Option && media && opt )
      pLibVLC_Media_Add_Option( media, opt );
}

HB_FUNC( VLC_MEDIAPLAYER_NEW_FROM_MEDIA )
{
   void *media = (void *)(LONG_PTR) hb_parnll(1);
   hb_retnll( (HB_LONGLONG)(LONG_PTR)
              (pLibVLC_MediaPlayer_New_From_Media && media ?
               pLibVLC_MediaPlayer_New_From_Media( media ) : NULL) );
}

HB_FUNC( VLC_MEDIAPLAYERSETHWND )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   void *hwnd = (void *)(LONG_PTR) hb_parnll(2);
   if( pLibVLC_MediaPlayer_Set_Hwnd && mp )
      pLibVLC_MediaPlayer_Set_Hwnd( mp, hwnd );
}

HB_FUNC( VLC_MEDIAPLAYERPLAY )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   if( pLibVLC_MediaPlayer_Play && mp )
      pLibVLC_MediaPlayer_Play( mp );
}

HB_FUNC( VLC_MEDIAPLAYERISPLAYING )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   hb_retl( (pLibVLC_MediaPlayer_Is_Playing && mp) ? pLibVLC_MediaPlayer_Is_Playing( mp ) != 0 : HB_FALSE );
}

HB_FUNC( VLC_PAUSE )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   if( pLibVLC_MediaPlayer_Pause && mp )
      pLibVLC_MediaPlayer_Pause( mp );
}

HB_FUNC( VLC_MEDIAPLAYERGETSTATE )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   hb_retni( (pLibVLC_MediaPlayer_Get_State && mp) ?
              pLibVLC_MediaPlayer_Get_State( mp ) : -1 );
}

HB_FUNC( VLC_MEDIAPLAYERGETLENGTH )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   hb_retnll( (pLibVLC_MediaPlayer_Get_Length && mp) ?
              (HB_LONGLONG)pLibVLC_MediaPlayer_Get_Length( mp ) : 0 );
}

HB_FUNC( VLC_MEDIAPLAYERSETTIME )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   libvlc_time_t t = (libvlc_time_t) hb_parnll(2);
   if( pLibVLC_MediaPlayer_Set_Time && mp )
      pLibVLC_MediaPlayer_Set_Time( mp, t );
}

HB_FUNC( VLC_MEDIAPLAYERPAUSE )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   if( pLibVLC_MediaPlayer_Pause && mp )
      pLibVLC_MediaPlayer_Pause( mp );
}

HB_FUNC( VLC_FULLSCREEN )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   int enable = hb_parl(2);
   if( pLibVLC_MediaPlayer_Set_Fullscreen && mp )
      pLibVLC_MediaPlayer_Set_Fullscreen( mp, enable );
}

HB_FUNC( VLC_AUDIOGETVOLUME )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   hb_retni( (pLibVLC_Audio_Get_Volume && mp) ?
             pLibVLC_Audio_Get_Volume( mp ) : -1 );
}

HB_FUNC( VLC_AUDIOSETVOLUME )
{
   void *mp = (void *)(LONG_PTR) hb_parnll(1);
   int vol = hb_parni(2);
   if( pLibVLC_Audio_Set_Volume && mp )
      pLibVLC_Audio_Set_Volume( mp, vol );
}

HB_FUNC( VLC_MEDIA_NEW_PATH )
{
   void *inst = (void *)(LONG_PTR) hb_parnll(1);
   const char *path = hb_parc(2);

   if( pLibVLC_Media_New_Path && inst && path )
      hb_retnll( (HB_LONGLONG)(LONG_PTR) pLibVLC_Media_New_Path( inst, path ) );
   else
      hb_retnll( 0 );
}

#pragma ENDDUMP

]]>
<![CDATA[HMG Samples :: Re: EASY.SQL.2025.09.01 (A lot of new stuff!) :: Reply by mol]]> 2025-09-25T20:37:58+00:00 2025-09-25T20:37:58+00:00 http://www.hmgforum.com/viewtopic.php?f=9&t=7689&p=71923#p71923 I want to save it originally as it is, maybe another (not mine) application will need to read it]]> I want to save it originally as it is, maybe another (not mine) application will need to read it]]> <![CDATA[HMG Samples :: Re: EASY.SQL.2025.08.08 [EDIT] :: Reply by Steed]]> 2025-09-30T02:20:15+00:00 2025-09-30T02:20:15+00:00 http://www.hmgforum.com/viewtopic.php?f=9&t=7684&p=71929#p71929
undefined reference to `HB_FUN_SDDMY']]>

undefined reference to `HB_FUN_SDDMY']]>
<![CDATA[HMG Samples :: Re: HMG.EASY.SQL.2025.09.04 :: Reply by Steed]]> 2025-10-04T01:48:19+00:00 2025-10-04T01:48:19+00:00 http://www.hmgforum.com/viewtopic.php?f=9&t=7694&p=71942#p71942
Sorry to ask: but when i compilied the test , i have the next error

hbmk2: Error: Referenced, missing, but unknown function(s): SDDMY()

I'm using HMG 3.6.1

*********************************************
Copyright (c) 1999-2023, https://harbour.github.io/
C:/Ins/hmg/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Ins/hmg/lib-64\libhmg-64.a(h_HMG_HPDF.o):h_HMG_HPDF.c:(.text+0xe0): multiple definition of `HB_FUN_HMG_HPDF_PAGECOUNT'; C:/Users/st_ed/AppData/Local/Temp/hbmk_vdwn32.dir/main.o:main.c:(.text+0x4e0): first defined here
C:/Ins/hmg/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Ins/hmg/lib-64\libhmg-64.a(h_HMG_HPDF.o):h_HMG_HPDF.c:(.text+0x100): multiple definition of `HB_FUN_HMG_HPDF_PAGENO'; C:/Users/st_ed/AppData/Local/Temp/hbmk_vdwn32.dir/main.o:main.c:(.text+0x500): first defined here
C:/Ins/hmg/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/st_ed/AppData/Local/Temp/hbmk_vdwn32.dir/main.o:main.c:(.data+0x2330): undefined reference to `HB_FUN_SDDMY'
collect2.exe: error: ld returned 1 exit status
hbmk2[test]: Error: Running linker. 1

**************************************************************************]]>

Sorry to ask: but when i compilied the test , i have the next error

hbmk2: Error: Referenced, missing, but unknown function(s): SDDMY()

I'm using HMG 3.6.1

*********************************************
Copyright (c) 1999-2023, https://harbour.github.io/
C:/Ins/hmg/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Ins/hmg/lib-64\libhmg-64.a(h_HMG_HPDF.o):h_HMG_HPDF.c:(.text+0xe0): multiple definition of `HB_FUN_HMG_HPDF_PAGECOUNT'; C:/Users/st_ed/AppData/Local/Temp/hbmk_vdwn32.dir/main.o:main.c:(.text+0x4e0): first defined here
C:/Ins/hmg/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Ins/hmg/lib-64\libhmg-64.a(h_HMG_HPDF.o):h_HMG_HPDF.c:(.text+0x100): multiple definition of `HB_FUN_HMG_HPDF_PAGENO'; C:/Users/st_ed/AppData/Local/Temp/hbmk_vdwn32.dir/main.o:main.c:(.text+0x500): first defined here
C:/Ins/hmg/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/st_ed/AppData/Local/Temp/hbmk_vdwn32.dir/main.o:main.c:(.data+0x2330): undefined reference to `HB_FUN_SDDMY'
collect2.exe: error: ld returned 1 exit status
hbmk2[test]: Error: Running linker. 1

**************************************************************************]]>
<![CDATA[HMG Samples :: Re: HMG.EASY.SQL.2025.09.04 :: Reply by Steed]]> 2025-10-08T02:42:18+00:00 2025-10-08T02:42:18+00:00 http://www.hmgforum.com/viewtopic.php?f=9&t=7694&p=71944#p71944
Steed wrote: Sat Oct 04, 2025 1:48 am Thanks a a lot!,

Sorry to ask: but when i compilied the test , i have the next error

hbmk2: Error: Referenced, missing, but unknown function(s): SDDMY()

I'm using HMG 3.6.1

**************************************************************************
Finally add in the test.hbc file the next libraries

libs=libmysql
libs=hbsqldd
libs=sddmy

It´ts compile , but know I had this new error.
TestError.png
Regards,

ES

Attachments


TestError.png (10 KiB)

]]>
Steed wrote: Sat Oct 04, 2025 1:48 am Thanks a a lot!,

Sorry to ask: but when i compilied the test , i have the next error

hbmk2: Error: Referenced, missing, but unknown function(s): SDDMY()

I'm using HMG 3.6.1

**************************************************************************
Finally add in the test.hbc file the next libraries

libs=libmysql
libs=hbsqldd
libs=sddmy

It´ts compile , but know I had this new error.
TestError.png
Regards,

ES

Attachments


TestError.png (10 KiB)

]]>
<![CDATA[HMG Samples :: Re: HMG.EASY.SQL.2025.09.04 :: Reply by Roberto Lopez]]> 2025-10-20T11:44:00+00:00 2025-10-20T11:44:00+00:00 http://www.hmgforum.com/viewtopic.php?f=9&t=7694&p=71957#p71957
Steed wrote: Wed Oct 08, 2025 2:42 am
Steed wrote: Sat Oct 04, 2025 1:48 am Thanks a a lot!,

Sorry to ask: but when i compilied the test , i have the next error

hbmk2: Error: Referenced, missing, but unknown function(s): SDDMY()

I'm using HMG 3.6.1

**************************************************************************
Finally add in the test.hbc file the next libraries

libs=libmysql
libs=hbsqldd
libs=sddmy

It´ts compile , but know I had this new error.

TestError.png

Regards,

ES
I'm not fully sure, but, maybe that libmysql.dll that I've included in the demo being not compatible with your setup. I've included it along with the compiled demo to allow users to test it 'out of the box'. You should replace by to one that work for you.

Regarding the problems with HMG_HPDF, I've already noticed fixed for the next release.]]>
Steed wrote: Wed Oct 08, 2025 2:42 am
Steed wrote: Sat Oct 04, 2025 1:48 am Thanks a a lot!,

Sorry to ask: but when i compilied the test , i have the next error

hbmk2: Error: Referenced, missing, but unknown function(s): SDDMY()

I'm using HMG 3.6.1

**************************************************************************
Finally add in the test.hbc file the next libraries

libs=libmysql
libs=hbsqldd
libs=sddmy

It´ts compile , but know I had this new error.

TestError.png

Regards,

ES
I'm not fully sure, but, maybe that libmysql.dll that I've included in the demo being not compatible with your setup. I've included it along with the compiled demo to allow users to test it 'out of the box'. You should replace by to one that work for you.

Regarding the problems with HMG_HPDF, I've already noticed fixed for the next release.]]>
<![CDATA[HMG Utilities :: Editor de tablas xbase (es-en) para windows 32-64 bits :: Author nelido]]> 2025-10-01T13:52:01+00:00 2025-10-01T13:52:01+00:00 http://www.hmgforum.com/viewtopic.php?f=10&t=7703&p=71931#p71931 Compilation: © June-2025
Developer: Nélido Sánchez Alvarez, software developer
Translated by Google Translate

Summary:

Dbview is a tool to manage the structure and content of any table (xbase) giving the possibility
to delete all its content, insert-modify-delete rows or columns, repeat values ??from the previous
row, change the direction of the scroll when pressing enter, sort by one or more columns, search
for information, replace values, add data from another table or txt file and copy data to another
table or txt file optionally establishing conditions or filters. This application is very useful
for the development or update of new computer systems.

Dbview has allowed to perform the necessary operations on the tables of applications developed
in Windows 10 at 64 bits, without the need to install other much "heavier" tools on the PCs,
which use a greater amount of computer resources.

The Dbview application is freeware and is delivered with a free license for a period of 40 days
without copy restrictions of any kind. It can be installed automatically for 32 or 64 bits
depending on the type of OS installed on the PC.

Installing Dbview

1-Run DbviewSetup.exe
2-Associate any Xbase table with Dbview.exe of C:\Dbview folder
3-By License option extend the dbview license period (password required)

======================================================================================================

Título: Dbview (Editor de tablas xbase)
Compilación: © Junio-2025
Desarrollador: Nélido Sánchez Alvarez, software developer
Traducido por el Tradutor de Google

Resumen:

El Dbview es una herramienta para gestionar la estructura y el contenido de cualquier tabla (xbase)
dando la posibilidad de borrar todo su contenido, insertar-modificar-eliminar filas o columnas,
repetir valores de la fila anterior, cambiar la dirección del desplazamiento al dar enter, ordenar
por una o varias columnas, hacer búsquedas de información, reemplazar valores, añadir datos desde
otra tabla o archivo txt y copiar datos hacia otra tabla o archivo txt estableciendo opcionalmente
condiciones o filtros. Esta aplicación es muy útil para el desarrollo o la actualización de nuevos
sistemas informáticos.

El Dbview ha permitido realizar las operaciones necesarias en las tablas de las aplicaciones
desarrolladas en Windows 10 a 64 bits, sin la necesidad de tener que instalar en las PC otras
herramientas mucho más "pesadas", que utilizan una mayor cantidad de recursos de las computadoras.

La aplicación Dbview es freeware y se entrega con una licencia gratis por un período de 40 días
sin restricciones de copia de ningún tipo. Se puede instalar automáticamente para 32 ó 64 bits
según el tipo de SO instalado en la PC.

Instalación del Dbview

1-Ejecutar el DbviewSetup.exe
2-Asociar cualquier tabla Xbase con el Dbview.exe de la carpeta c:\Dbview.exe
3-Por opción Licencia extender periodo de licencia del dbview (requiere contraseña)


Dbview.txt
https://drive.google.com/file/d/1N3JkAA ... sp=sharing

DbviewGSetup-en.exe
https://drive.google.com/file/d/1CjzvYF ... sp=sharing
DbviewGSetup-es.exe
https://drive.google.com/file/d/1IR9Tpo ... sp=sharing]]>
Compilation: © June-2025
Developer: Nélido Sánchez Alvarez, software developer
Translated by Google Translate

Summary:

Dbview is a tool to manage the structure and content of any table (xbase) giving the possibility
to delete all its content, insert-modify-delete rows or columns, repeat values ??from the previous
row, change the direction of the scroll when pressing enter, sort by one or more columns, search
for information, replace values, add data from another table or txt file and copy data to another
table or txt file optionally establishing conditions or filters. This application is very useful
for the development or update of new computer systems.

Dbview has allowed to perform the necessary operations on the tables of applications developed
in Windows 10 at 64 bits, without the need to install other much "heavier" tools on the PCs,
which use a greater amount of computer resources.

The Dbview application is freeware and is delivered with a free license for a period of 40 days
without copy restrictions of any kind. It can be installed automatically for 32 or 64 bits
depending on the type of OS installed on the PC.

Installing Dbview

1-Run DbviewSetup.exe
2-Associate any Xbase table with Dbview.exe of C:\Dbview folder
3-By License option extend the dbview license period (password required)

======================================================================================================

Título: Dbview (Editor de tablas xbase)
Compilación: © Junio-2025
Desarrollador: Nélido Sánchez Alvarez, software developer
Traducido por el Tradutor de Google

Resumen:

El Dbview es una herramienta para gestionar la estructura y el contenido de cualquier tabla (xbase)
dando la posibilidad de borrar todo su contenido, insertar-modificar-eliminar filas o columnas,
repetir valores de la fila anterior, cambiar la dirección del desplazamiento al dar enter, ordenar
por una o varias columnas, hacer búsquedas de información, reemplazar valores, añadir datos desde
otra tabla o archivo txt y copiar datos hacia otra tabla o archivo txt estableciendo opcionalmente
condiciones o filtros. Esta aplicación es muy útil para el desarrollo o la actualización de nuevos
sistemas informáticos.

El Dbview ha permitido realizar las operaciones necesarias en las tablas de las aplicaciones
desarrolladas en Windows 10 a 64 bits, sin la necesidad de tener que instalar en las PC otras
herramientas mucho más "pesadas", que utilizan una mayor cantidad de recursos de las computadoras.

La aplicación Dbview es freeware y se entrega con una licencia gratis por un período de 40 días
sin restricciones de copia de ningún tipo. Se puede instalar automáticamente para 32 ó 64 bits
según el tipo de SO instalado en la PC.

Instalación del Dbview

1-Ejecutar el DbviewSetup.exe
2-Asociar cualquier tabla Xbase con el Dbview.exe de la carpeta c:\Dbview.exe
3-Por opción Licencia extender periodo de licencia del dbview (requiere contraseña)


Dbview.txt
https://drive.google.com/file/d/1N3JkAA ... sp=sharing

DbviewGSetup-en.exe
https://drive.google.com/file/d/1CjzvYF ... sp=sharing
DbviewGSetup-es.exe
https://drive.google.com/file/d/1IR9Tpo ... sp=sharing]]>
<![CDATA[HMG Utilities :: Funcion CAPTA y EDITA sobre harbour 3.4.4 :: Author nelido]]> 2025-10-01T14:08:33+00:00 2025-10-01T14:08:33+00:00 http://www.hmgforum.com/viewtopic.php?f=10&t=7704&p=71932#p71932
DOCUMENTACIÓN DE LAS FUNCIONES CAPTA Y EDITA

FUNCTION CAPTA

DESARROLLADOR: NELIDO O. SANCHEZ ALVAREZ, INFORMATICO SANTA CLARA-CUBA

OBJETIVO: ESTA FUNCION PERMITE RELACIONAR LAS DIFERENTES TABLAS XBASES (.dbf)
QUE INTERVIENEN EN EL PROCESO DE CAPTACION Y VALIDACION DE DATOS
DE CUALQUIER APLICACION, FACILITANDO EL USO DEL MOUSE PARA EL
DESPLAZAMIENTO EN LA PANTALLA Y LA EXPORTACION EN FORMATO EXCEL
DE LA INFORMACION CAPTADA.

EL PROGRAMADOR SOLO NECESITA DISEÑAR LA TABLA XBASE PRINCIPAL Y LAS
AUXILIARES. EL PROCESO DE CAPTACION DE DATOS SE LOGRA DE FORMA
AUTOMATICA HACIENDO UNA LLAMADA DESDE SU APLICACION A ESTA FUNCION
PASANDOLE LOS PARAMETROS SEGUN SEAN LAS TABLAS XBASES QUE SE
CREARON PARA CADA OPCION DEL MENU DE ENTRADA DE DATOS DEL SISTEMA.

EL PROGRAMADOR TAMBIEN PUEDE DEFINIR FUNCIONES Y PROCEDIMIENTOS
PARA LA VALIDACION ESPECIFICA DE LOS DATOS DE SU APLICACION
PASANDOLOS COMO PARAMETROS A LA FUNCION CAPTA.

LA FUNCION REALIZA UNA COMPROBACION DE COMPATIBILIDAD DE TIPOS
ENTRE LOS CAMPOS DE LA TABLA XBASE PRINCIPAL Y LAS AUXILIARES.

- Ver ejemplo del uso de esta función en la aplicación Metros.prg

- Ver el Metrosc.bat que compila y enlaza la aplicación Metros.prg con
Captura.o (.obj) que contiene dichas funciones.


LLAMADA:

CAPTA (<ExpN1>,<ExpB1>,<ExpC1>[,<Arr1>[,<Arr2>[,<ExpC2>[,<ExpN2>[,<ExpN3>
[,<ExpC3>[,<ExpN4>[,<ExpC4>[,<Arr3>[,<Arr4>[,<ExpB2>]]]]]]]]]]]]])

DONDE:

<ExpN1> CANTIDAD DE CAMPOS INDICES (MAXIMO 10).
<ExpB1> EXPRESION BOOLEANA PARA FIJAR O NO ULTIMO CAMPO INDICE.
<ExpC1> NOMBRE (SIN EXTENSION) DE LA TABLA XBASE (.dbf) PRINCIPAL A CAPTAR.
<Arr1> ARREGLO CON LOS TITULOS DESEADOS PARA CADA CAMPO DE LA TABLA XBASE
PRINCIPAL A CAPTAR.
<Arr2> ARREGLO CON LOS NOMBRES DE LAS TABLAS XBASES AUXILARES PARA CADA
CAMPO INDICE DE LA TABLA XBASE PRINCIPAL A CAPTAR.
<ExpC2> CADENA CON EL NOMBRE DE UNA FUNCION DEFINIDA POR EL USUARIO (SIN
ESPECIFICAR PARENTESIS O ARGUMENTOS). ESTA FUNCION SERA EMPLEADA
POR CAPTA PARA VALIDAR CUALQUIER CAMPO DE LA TABLA XBASE PRINCIPAL
DE LA ENTRADA DE DATOS.
<ExpN2> FILA DE PANTALLA DONDE APARECERA <ExpC3>.
<ExpN3> COLUMNA DE PANTALLA DONDE APARECERA <ExpC3>.
<ExpC3> CADENA CON EL TITULO DE LA ENTRADA DE DATOS.
<ExpN4> NUMERO DEL ULTIMO CAMPO DE LA TABLA XBASE PRINCIPAL QUE SE DESEA
CAPTAR, SI SE OMITE SE ASUME EL ULTIMO CAMPO DE LA TABLA XBASE.
<ExpC4> CADENA CON EL NOMBRE DE UN PROCEDIMIENTO DEFINIDO POR EL USUARIO
QUE SERA EMPLEADO POR CAPTA PARA VALIDAR Y MOSTRAR VENTANAS DE AYUDA A LOS
CAMPOS QUE NO SON INDICES.
<Arr3> ARREGLO CON LAS LINEAS DE ENCABEZAMIENTOS PARA LOS LISTADOS
PANTALLA-IMPRESORA-FICHERO.
<Arr4> ARREGLO CON LOS NOMBRES DE TABLAS XBASES AUXILIARES, PARA CAPTAR
Y VALIDAR LOS CAMPOS NO INDICES. EL SUBINDICE DEL ARREGLO CORRESPONDE
A LA POSICION DE LA COLUMNA EN LA PANTALLA DE CAPTACION
DESDE EL 1 HASTA EL ULTIMO CAMPO.
<ExpB2> EXPRESION BOOLEANA PARA HABILITAR O NO LA TECLA F2 - ELIMINAR EN LA
OPCION F3-VER/EDITAR.

- CAPTA retorna .T. (Verdadero) si el usuario realizó cambios en la tabla
xbase principal, de lo contrario .F. (Falso).

- EL símbolo [] en la llamada significa que el parámetro es opcional.

RESTRICCIONES:

1) LA APLICACION NO DEBE USAR TABLAS XBASES LLAMADAS: CLTMP.DBF,
CLTMP.DBT, LETMP.DBF NI VARIABLES: VCT, VCE, VCS, VCN.

2) LOS CAMPOS LLAVES DE LA TABLA XBASE PRINCIPAL DEBEN SER LOS
PRIMEROS Y EL NOMBRE DE LOS CAMPOS LLAVES NO DEBE TENER MAS DE 9
CARACTERES PORQUE LA FUNCION ADICIONA 1 CARACTER.



FUNCTION EDITA

DESARROLLADOR: NELIDO O. SANCHEZ ALVAREZ, INFORMATICO SANTA CLARA-CUBA

OBJETIVO: ESTA FUNCION PERMITE EDITAR POR PANTALLA, IMPRESORA Y FICHERO
CUALQUIER INFORME CREADO EN UNA TABLA XBASE (.dbf)
OFRECIENDO LA POSIBILIDAD DE PONERLE TITULOS A CADA COLUMNA Y
ENCABEZADOS Y PIE A LOS INFORMES. LOS INFORMES PUEDEN SER
EXPORTADOS AL FORMATO EXCEL.

- Ver ejemplo de uso de esta función en la aplicación Metros.prg


LLAMADA:

EDITA (<ExpC1>[,<Arr1>[,<Arr2>[,<ExpN1>[,<ExpN2>[,<ExpN3>[,<ExpC2>[,<Arr3>]]]]]]])

DONDE:

<ExpC1> NOMBRE (SIN EXTENSION) DE LA TABLA XBASE A EDITAR.
<Arr1> ARREGLO CON LOS TITULOS DESEADOS PARA CADA CAMPO DE LA TABLA XBASE
<Arr2> ARREGLO CON LAS LINEAS DE ENCABEZAMIENTOS DE LOS INFORMES.
<ExpN1> NUMERO DEL ULTIMO CAMPO QUE SE DESEA EDITAR, SI SE OMITE SE
SE ASUME EL ULTIMO CAMPO DE LA TABLA XBASE.
<ExpN2> FILA DE PANTALLA DONDE APARECERA LA <ExpC2>.
<ExpN3> COLUMNA DE PANTALLA DONDE APARECERA LA <ExpC2>.
<ExpC2> CADENA CON EL TITULO DEL INFORME.
<Arr3> ARREGLO CON LA LINEAS DE PIE DE LOS INFORMES.

- EL símbolo [] en la llamada significa que el parámetro es opcional.

Ejemplo de uso de las funciones:
https://drive.google.com/drive/folders/ ... sp=sharing]]>

DOCUMENTACIÓN DE LAS FUNCIONES CAPTA Y EDITA

FUNCTION CAPTA

DESARROLLADOR: NELIDO O. SANCHEZ ALVAREZ, INFORMATICO SANTA CLARA-CUBA

OBJETIVO: ESTA FUNCION PERMITE RELACIONAR LAS DIFERENTES TABLAS XBASES (.dbf)
QUE INTERVIENEN EN EL PROCESO DE CAPTACION Y VALIDACION DE DATOS
DE CUALQUIER APLICACION, FACILITANDO EL USO DEL MOUSE PARA EL
DESPLAZAMIENTO EN LA PANTALLA Y LA EXPORTACION EN FORMATO EXCEL
DE LA INFORMACION CAPTADA.

EL PROGRAMADOR SOLO NECESITA DISEÑAR LA TABLA XBASE PRINCIPAL Y LAS
AUXILIARES. EL PROCESO DE CAPTACION DE DATOS SE LOGRA DE FORMA
AUTOMATICA HACIENDO UNA LLAMADA DESDE SU APLICACION A ESTA FUNCION
PASANDOLE LOS PARAMETROS SEGUN SEAN LAS TABLAS XBASES QUE SE
CREARON PARA CADA OPCION DEL MENU DE ENTRADA DE DATOS DEL SISTEMA.

EL PROGRAMADOR TAMBIEN PUEDE DEFINIR FUNCIONES Y PROCEDIMIENTOS
PARA LA VALIDACION ESPECIFICA DE LOS DATOS DE SU APLICACION
PASANDOLOS COMO PARAMETROS A LA FUNCION CAPTA.

LA FUNCION REALIZA UNA COMPROBACION DE COMPATIBILIDAD DE TIPOS
ENTRE LOS CAMPOS DE LA TABLA XBASE PRINCIPAL Y LAS AUXILIARES.

- Ver ejemplo del uso de esta función en la aplicación Metros.prg

- Ver el Metrosc.bat que compila y enlaza la aplicación Metros.prg con
Captura.o (.obj) que contiene dichas funciones.


LLAMADA:

CAPTA (<ExpN1>,<ExpB1>,<ExpC1>[,<Arr1>[,<Arr2>[,<ExpC2>[,<ExpN2>[,<ExpN3>
[,<ExpC3>[,<ExpN4>[,<ExpC4>[,<Arr3>[,<Arr4>[,<ExpB2>]]]]]]]]]]]]])

DONDE:

<ExpN1> CANTIDAD DE CAMPOS INDICES (MAXIMO 10).
<ExpB1> EXPRESION BOOLEANA PARA FIJAR O NO ULTIMO CAMPO INDICE.
<ExpC1> NOMBRE (SIN EXTENSION) DE LA TABLA XBASE (.dbf) PRINCIPAL A CAPTAR.
<Arr1> ARREGLO CON LOS TITULOS DESEADOS PARA CADA CAMPO DE LA TABLA XBASE
PRINCIPAL A CAPTAR.
<Arr2> ARREGLO CON LOS NOMBRES DE LAS TABLAS XBASES AUXILARES PARA CADA
CAMPO INDICE DE LA TABLA XBASE PRINCIPAL A CAPTAR.
<ExpC2> CADENA CON EL NOMBRE DE UNA FUNCION DEFINIDA POR EL USUARIO (SIN
ESPECIFICAR PARENTESIS O ARGUMENTOS). ESTA FUNCION SERA EMPLEADA
POR CAPTA PARA VALIDAR CUALQUIER CAMPO DE LA TABLA XBASE PRINCIPAL
DE LA ENTRADA DE DATOS.
<ExpN2> FILA DE PANTALLA DONDE APARECERA <ExpC3>.
<ExpN3> COLUMNA DE PANTALLA DONDE APARECERA <ExpC3>.
<ExpC3> CADENA CON EL TITULO DE LA ENTRADA DE DATOS.
<ExpN4> NUMERO DEL ULTIMO CAMPO DE LA TABLA XBASE PRINCIPAL QUE SE DESEA
CAPTAR, SI SE OMITE SE ASUME EL ULTIMO CAMPO DE LA TABLA XBASE.
<ExpC4> CADENA CON EL NOMBRE DE UN PROCEDIMIENTO DEFINIDO POR EL USUARIO
QUE SERA EMPLEADO POR CAPTA PARA VALIDAR Y MOSTRAR VENTANAS DE AYUDA A LOS
CAMPOS QUE NO SON INDICES.
<Arr3> ARREGLO CON LAS LINEAS DE ENCABEZAMIENTOS PARA LOS LISTADOS
PANTALLA-IMPRESORA-FICHERO.
<Arr4> ARREGLO CON LOS NOMBRES DE TABLAS XBASES AUXILIARES, PARA CAPTAR
Y VALIDAR LOS CAMPOS NO INDICES. EL SUBINDICE DEL ARREGLO CORRESPONDE
A LA POSICION DE LA COLUMNA EN LA PANTALLA DE CAPTACION
DESDE EL 1 HASTA EL ULTIMO CAMPO.
<ExpB2> EXPRESION BOOLEANA PARA HABILITAR O NO LA TECLA F2 - ELIMINAR EN LA
OPCION F3-VER/EDITAR.

- CAPTA retorna .T. (Verdadero) si el usuario realizó cambios en la tabla
xbase principal, de lo contrario .F. (Falso).

- EL símbolo [] en la llamada significa que el parámetro es opcional.

RESTRICCIONES:

1) LA APLICACION NO DEBE USAR TABLAS XBASES LLAMADAS: CLTMP.DBF,
CLTMP.DBT, LETMP.DBF NI VARIABLES: VCT, VCE, VCS, VCN.

2) LOS CAMPOS LLAVES DE LA TABLA XBASE PRINCIPAL DEBEN SER LOS
PRIMEROS Y EL NOMBRE DE LOS CAMPOS LLAVES NO DEBE TENER MAS DE 9
CARACTERES PORQUE LA FUNCION ADICIONA 1 CARACTER.



FUNCTION EDITA

DESARROLLADOR: NELIDO O. SANCHEZ ALVAREZ, INFORMATICO SANTA CLARA-CUBA

OBJETIVO: ESTA FUNCION PERMITE EDITAR POR PANTALLA, IMPRESORA Y FICHERO
CUALQUIER INFORME CREADO EN UNA TABLA XBASE (.dbf)
OFRECIENDO LA POSIBILIDAD DE PONERLE TITULOS A CADA COLUMNA Y
ENCABEZADOS Y PIE A LOS INFORMES. LOS INFORMES PUEDEN SER
EXPORTADOS AL FORMATO EXCEL.

- Ver ejemplo de uso de esta función en la aplicación Metros.prg


LLAMADA:

EDITA (<ExpC1>[,<Arr1>[,<Arr2>[,<ExpN1>[,<ExpN2>[,<ExpN3>[,<ExpC2>[,<Arr3>]]]]]]])

DONDE:

<ExpC1> NOMBRE (SIN EXTENSION) DE LA TABLA XBASE A EDITAR.
<Arr1> ARREGLO CON LOS TITULOS DESEADOS PARA CADA CAMPO DE LA TABLA XBASE
<Arr2> ARREGLO CON LAS LINEAS DE ENCABEZAMIENTOS DE LOS INFORMES.
<ExpN1> NUMERO DEL ULTIMO CAMPO QUE SE DESEA EDITAR, SI SE OMITE SE
SE ASUME EL ULTIMO CAMPO DE LA TABLA XBASE.
<ExpN2> FILA DE PANTALLA DONDE APARECERA LA <ExpC2>.
<ExpN3> COLUMNA DE PANTALLA DONDE APARECERA LA <ExpC2>.
<ExpC2> CADENA CON EL TITULO DEL INFORME.
<Arr3> ARREGLO CON LA LINEAS DE PIE DE LOS INFORMES.

- EL símbolo [] en la llamada significa que el parámetro es opcional.

Ejemplo de uso de las funciones:
https://drive.google.com/drive/folders/ ... sp=sharing]]>
<![CDATA[HMG Utilities :: Re: Funcion CAPTA y EDITA sobre harbour 3.4.4 :: Reply by danielmaximiliano]]> 2025-10-01T18:02:00+00:00 2025-10-01T18:02:00+00:00 http://www.hmgforum.com/viewtopic.php?f=10&t=7704&p=71933#p71933 <![CDATA[HMG Utilities :: Re: Funcion CAPTA y EDITA sobre harbour 3.4.4 :: Reply by Steed]]> 2025-10-03T23:41:57+00:00 2025-10-03T23:41:57+00:00 http://www.hmgforum.com/viewtopic.php?f=10&t=7704&p=71941#p71941
danielmaximiliano wrote: Wed Oct 01, 2025 6:02 pm Gracias por compartir Nelido
Gracias]]>
danielmaximiliano wrote: Wed Oct 01, 2025 6:02 pm Gracias por compartir Nelido
Gracias]]>
<![CDATA[HMG Utilities :: Re: Funcion CAPTA y EDITA sobre harbour 3.4.4 :: Reply by luisvasquezcl]]> 2025-10-14T00:00:46+00:00 2025-10-14T00:00:46+00:00 http://www.hmgforum.com/viewtopic.php?f=10&t=7704&p=71954#p71954 Un saludo desde chile]]> Un saludo desde chile]]> <![CDATA[HMG Utilities :: Compartiendo ideas :: Author nelido]]> 2025-10-23T03:54:09+00:00 2025-10-23T03:54:09+00:00 http://www.hmgforum.com/viewtopic.php?f=10&t=7709&p=71964#p71964

Attachments


IMG_20251022_232858.jpg (48.55 KiB)


IMG_20251022_232921.jpg (156.04 KiB)


IMG_20251022_232941.jpg (169.96 KiB)


IMG_20251022_234331.jpg (174.35 KiB)

]]>

Attachments


IMG_20251022_232858.jpg (48.55 KiB)


IMG_20251022_232921.jpg (156.04 KiB)


IMG_20251022_232941.jpg (169.96 KiB)


IMG_20251022_234331.jpg (174.35 KiB)

]]>
<![CDATA[HMG Utilities :: Re: Compartiendo ideas :: Reply by serge_girard]]> 2025-10-23T08:20:04+00:00 2025-10-23T08:20:04+00:00 http://www.hmgforum.com/viewtopic.php?f=10&t=7709&p=71965#p71965
Serge]]>

Serge]]>
<![CDATA[HMG Utilities :: Re: Compartiendo ideas :: Reply by nelido]]> 2025-10-23T13:07:54+00:00 2025-10-23T13:07:54+00:00 http://www.hmgforum.com/viewtopic.php?f=10&t=7709&p=71966#p71966 <![CDATA[HMG Utilities :: Re: Compartiendo ideas :: Reply by nelido]]> 2025-10-23T14:19:53+00:00 2025-10-23T14:19:53+00:00 http://www.hmgforum.com/viewtopic.php?f=10&t=7709&p=71967#p71967
Un abrazo grande hermano.]]>

Un abrazo grande hermano.]]>
<![CDATA[HMG Utilities :: Re: Compartiendo ideas :: Reply by serge_girard]]> 2025-10-24T07:30:21+00:00 2025-10-24T07:30:21+00:00 http://www.hmgforum.com/viewtopic.php?f=10&t=7709&p=71968#p71968 <![CDATA[HMG Utilities :: Re: Compartiendo ideas :: Reply by nelido]]> 2025-10-24T18:42:44+00:00 2025-10-24T18:42:44+00:00 http://www.hmgforum.com/viewtopic.php?f=10&t=7709&p=71969#p71969 <![CDATA[My HMG Projects :: 📢 Announcement: Exclusive Access to Private MiniGUI 25.10 Builds :: Author gfilatov]]> 2025-10-09T07:54:26+00:00 2025-10-09T07:54:26+00:00 http://www.hmgforum.com/viewtopic.php?f=15&t=7706&p=71945#p71945
We’re pleased to announce the release of exclusive Private MiniGUI 25.10 packages.

The following packages are now available:

🔹 MiniGUI 64-bit Package
Includes:

* Harbour MiniGUI Extended Edition 25.10 (PRO)
* Harbour 3.2.0dev (r2509100708)
* Harbour Make (hbmk2) 3.2.0dev (r2025-09-10 07:08)
* gcc version 15.2.0 (MinGW-W64 x86_64-msvcrt-posix-seh, built by Brecht Sanders, r2) packaged on 2025-10-04

---

🔹 MiniGUI BCC 7.70 Package
Includes:

* Harbour MiniGUI Extended Edition 25.10 (PRO)
* Harbour 3.2.0dev (r2509091755)
* Harbour Make (hbmk2) 3.2.0dev (r2025-09-09 17:55)
* Embarcadero C++ 7.70 for Win32
© 1993–2023 Embarcadero Technologies, Inc.

---

🔹 MiniGUI xHarbour Package
Includes:

* Harbour MiniGUI Extended Edition 25.10 (Standard)
* xHarbour 1.3.2 Intl. (SimpLex) (Build 20250515)
* Embarcadero C++ 7.70 for Win32
© 1993–2023 Embarcadero Technologies, Inc.

---

These builds are exclusively available to MiniGUI donors as a token of our gratitude for your continued support.

Thank you for being part of the MiniGUI community!

Warm regards,
Grigory Filatov
on behalf of the MiniGUI Team]]>

We’re pleased to announce the release of exclusive Private MiniGUI 25.10 packages.

The following packages are now available:

🔹 MiniGUI 64-bit Package
Includes:

* Harbour MiniGUI Extended Edition 25.10 (PRO)
* Harbour 3.2.0dev (r2509100708)
* Harbour Make (hbmk2) 3.2.0dev (r2025-09-10 07:08)
* gcc version 15.2.0 (MinGW-W64 x86_64-msvcrt-posix-seh, built by Brecht Sanders, r2) packaged on 2025-10-04

---

🔹 MiniGUI BCC 7.70 Package
Includes:

* Harbour MiniGUI Extended Edition 25.10 (PRO)
* Harbour 3.2.0dev (r2509091755)
* Harbour Make (hbmk2) 3.2.0dev (r2025-09-09 17:55)
* Embarcadero C++ 7.70 for Win32
© 1993–2023 Embarcadero Technologies, Inc.

---

🔹 MiniGUI xHarbour Package
Includes:

* Harbour MiniGUI Extended Edition 25.10 (Standard)
* xHarbour 1.3.2 Intl. (SimpLex) (Build 20250515)
* Embarcadero C++ 7.70 for Win32
© 1993–2023 Embarcadero Technologies, Inc.

---

These builds are exclusively available to MiniGUI donors as a token of our gratitude for your continued support.

Thank you for being part of the MiniGUI community!

Warm regards,
Grigory Filatov
on behalf of the MiniGUI Team]]>
<![CDATA[My HMG Projects :: Re: 📢 Announcement: Exclusive Access to Private MiniGUI 25.10 Builds :: Reply by mol]]> 2025-10-09T08:12:21+00:00 2025-10-09T08:12:21+00:00 http://www.hmgforum.com/viewtopic.php?f=15&t=7706&p=71946#p71946 I think there are some users which are afraid of asking..]]> I think there are some users which are afraid of asking..]]> <![CDATA[My HMG Projects :: Re: 📢 Announcement: Exclusive Access to Private MiniGUI 25.10 Builds :: Reply by gfilatov]]> 2025-10-09T11:22:19+00:00 2025-10-09T11:22:19+00:00 http://www.hmgforum.com/viewtopic.php?f=15&t=7706&p=71948#p71948
mol wrote: Thu Oct 09, 2025 8:12 am Can you post the minimum amount of donation which will be satisfying?
I think there are some users which are afraid of asking..
Hi Marek,

Thank you for this question. You are correct. :)

The minimal amount of donation is at least $50 without bank fees.

You will also receive the links to any additional Private package for MinGW 15.2, BCC 7.70, MS VC 2022 Community Edition (all are 32/64-bit) by your request. If you need all Private packages, it is possible after discussion. :idea:
Note the updated SQLRDD library is included in these packages along with examples of usage for MySQL server.

If you would like to get the MiniGUI Pro builds for a long time (half or year, one year or more) then you get a minimal payment per month.

As part of my technical support, I also provide quick bug fixes and continue to improve the code.

Please note core sources are now documented for each function parameters, purpose and major notes.

These enhancements are part of our ongoing commitment to improving user experience, system efficiency, and data integrity.

Thank you for your attention.]]>
mol wrote: Thu Oct 09, 2025 8:12 am Can you post the minimum amount of donation which will be satisfying?
I think there are some users which are afraid of asking..
Hi Marek,

Thank you for this question. You are correct. :)

The minimal amount of donation is at least $50 without bank fees.

You will also receive the links to any additional Private package for MinGW 15.2, BCC 7.70, MS VC 2022 Community Edition (all are 32/64-bit) by your request. If you need all Private packages, it is possible after discussion. :idea:
Note the updated SQLRDD library is included in these packages along with examples of usage for MySQL server.

If you would like to get the MiniGUI Pro builds for a long time (half or year, one year or more) then you get a minimal payment per month.

As part of my technical support, I also provide quick bug fixes and continue to improve the code.

Please note core sources are now documented for each function parameters, purpose and major notes.

These enhancements are part of our ongoing commitment to improving user experience, system efficiency, and data integrity.

Thank you for your attention.]]>
<![CDATA[My HMG Projects :: Re: 📢 Announcement: Exclusive Access to Private MiniGUI 25.10 Builds :: Reply by serge_girard]]> 2025-10-09T13:44:32+00:00 2025-10-09T13:44:32+00:00 http://www.hmgforum.com/viewtopic.php?f=15&t=7706&p=71949#p71949 <![CDATA[My HMG Projects :: Re: 📢 Announcement: Exclusive Access to Private MiniGUI 25.10 Builds :: Reply by mol]]> 2025-10-09T15:32:39+00:00 2025-10-09T15:32:39+00:00 http://www.hmgforum.com/viewtopic.php?f=15&t=7706&p=71950#p71950 <![CDATA[My HMG Projects :: Re: 📢 Announcement: Exclusive Access to Private MiniGUI 25.10 Builds :: Reply by mol]]> 2025-10-09T19:55:50+00:00 2025-10-09T19:55:50+00:00 http://www.hmgforum.com/viewtopic.php?f=15&t=7706&p=71951#p71951 <![CDATA[My HMG Projects :: Re: 📢 Announcement: Exclusive Access to Private MiniGUI 25.10 Builds :: Reply by gfilatov]]> 2025-10-10T06:51:00+00:00 2025-10-10T06:51:00+00:00 http://www.hmgforum.com/viewtopic.php?f=15&t=7706&p=71952#p71952
mol wrote: Thu Oct 09, 2025 7:55 pm Do you accept revolut?
Sorry, no. :oops:
But I can provide IBAN number for direct payment to my card account. :arrow:]]>
mol wrote: Thu Oct 09, 2025 7:55 pm Do you accept revolut?
Sorry, no. :oops:
But I can provide IBAN number for direct payment to my card account. :arrow:]]>
<![CDATA[My HMG Projects :: Re: 📢 Announcement: Exclusive Access to Private MiniGUI 25.10 Builds :: Reply by mol]]> 2025-10-10T17:01:57+00:00 2025-10-10T17:01:57+00:00 http://www.hmgforum.com/viewtopic.php?f=15&t=7706&p=71953#p71953