Search found 88 matches: phb

Return to advanced search

Re: simulate unknown Function of UDF in IndexKey()

First prototype to create a function at runtime at assign a codeblock to it: 1. As we are using a static PHB_ITEM pCodeBlock, next call to CreateFunction() will overwrite it, so we need to find a solution for this. 2. We could enhance CreateFunction() to allow parameters: CreateFunction( cFunctionNa...
by Antonio Linares
Fri May 05, 2023 10:52 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: simulate unknown Function of UDF in IndexKey()
Replies: 9
Views: 419

Re: CodeBlock

Dear Ari, In harbour/include/hbapi.h you find this: https://github.com/harbour/core/blob/master/include/hbapi.h typedef struct _HB_CODEBLOCK { const HB_BYTE * pCode; /* codeblock pcode */ PHB_SYMB pSymbols; /* codeblocks symbols */ PHB_SYMB pDefSymb; /* symbol where the codeblock was cre...
by Antonio Linares
Tue Nov 01, 2022 7:31 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: CodeBlock
Replies: 2
Views: 276

Ejecutar un CODEBLOCK en C++

Buenas tardes. Alguien sabría decirme como ejecutar un CODEBLOCK de xHarbour en C++. Por ejemplo: Pasar bEjemplo := { |x,y| MiFuncion(x,y,nOtro,cOtro)} a una función en C++ para que se ejecute la función MiFuncion() desde allí. He encontrado la definición: hb_vmEvalBlockV( PHB_ITEM pBlockItem, USHOR...
by antolin
Sat Apr 23, 2022 5:14 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Ejecutar un CODEBLOCK en C++
Replies: 5
Views: 383

Re: Mysql (Result a Array en C) solicitud de ayuda.

Antonio, que direfencia hay entre estas dos funciones? extern HB_EXPORT HB_BOOL hb_arraySetC( PHB_ITEM pArray, HB_SIZE nIndex, const char * szText ); extern HB_EXPORT HB_BOOL hb_arraySetCL( PHB_ITEM pArray, HB_SIZE nIndex, const char * szText, HB_SIZE nLen ); asi esta quedando la funcion, ya en el e...
by carlos vargas
Tue Mar 02, 2021 8:40 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Mysql (Result a Array en C) solicitud de ayuda.
Replies: 7
Views: 577

Re: Mysql (Result a Array en C) solicitud de ayuda.

casi en forma similar, tengo la funcion que pasa a tabla, usando el api de harbour, ya me crea la tabla con las respectivas columnas, y agrego los registos, pero igual que el caso anterior deseo saber como pasar los datos segun su tipo a un PHB_ITEM para poder usar la funcion SELF_PUTVALUE( pArea, u...
by carlos vargas
Mon Mar 01, 2021 5:08 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Mysql (Result a Array en C) solicitud de ayuda.
Replies: 7
Views: 577

lock params from low level

#include <hbapiitm.h>

PHB_ITEM pBlock = NULL;

...

pBlock = hb_itemParam( 1 ); // 1 for first parameter. Automatically calls hb_gcGripGet()

...

hb_evalBlock0( pBlock );

...

hb_itemRelease( pBlock ); // automatically calls hb_gcGripDrop()
by Antonio Linares
Sun Dec 27, 2020 10:23 am
 
Forum: Utilities / Utilidades
Topic: lock params from low level
Replies: 0
Views: 556

convertir gpointer en data

Tengo el siguiente código donde la función KeyPressEvent recive un PHB_ITEM en gpointer pero al convertir no me pasa los valores. Algo estoy haciendo mal ¿si alguien me puede ayuda? g_print("%d %s \n", (int)hb_arrayGetNL( aData, 1 ), (char *)hb_arrayGetC( aData, 2 )); Resultado en Pantalla...
by jgayoso
Tue Aug 04, 2020 3:57 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: convertir gpointer en data
Replies: 1
Views: 375

Re: Garbage Value on Multiply

The error happens without using FWH It seems a Harbour bug using bcc7 64 bits in source\harbour\vm\itemapi.c /* converts a numeric to a string with optional width & precision. */ HB_BOOL hb_itemStrBuf( char * szResult, PHB_ITEM pNumber, int iSize, int iDec ) used from: char * hb_itemStr( PHB_ITE...
by Antonio Linares
Mon Apr 22, 2019 10:25 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: Garbage Value on Multiply
Replies: 6
Views: 1101

Re: evaluate some harbor in c.

I did it some weeks ago: for the EMF, in harbour I have: EnumEnhMetaFile(hDC,hMeta,{|pDC,pTable,pRECORD| MyCB(pdf,pTable,pRECORD) },{0,0,100,100}) and in C I have: int CALLBACK HBEnhEnumProc(HDC hDC,HANDLETABLE *lpHTable,const ENHMETARECORD *lpEMFR,int nObj,LP...
by AntoninoP
Fri Dec 07, 2018 8:38 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: evaluate some harbor in c.
Replies: 1
Views: 628

Re: evaluar algo de harbour en c.

/* static PHB_SYMB pSymbol = NULL; if( ! pSymbol ) pSymbol = hb_dynsymSymbol( hb_dynsymGet( "OBTNEVENTS" ) ); if( pSymbol ) { hb_vmPushSymbol( pSymbol ); hb_vmPushNil(); hb_vmPushNumInt( ( LONG_PTR ) hButton ); hb_vmPushLong( Msg ); hb_vmPushNumInt( wParam ); hb_vmPushNumInt( lParam ); hb...
by carlos vargas
Thu Dec 06, 2018 11:00 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: evaluar algo de harbour en c.
Replies: 7
Views: 1267

Re: access to window via its :hwnd

Here is the "calling program" = babu.prg modified After that is the "dll program" = babudll.prg modified you may want to remove the altd() breaks and the reference to the external debugging libraries. REQUEST HB_GT_WIN REQUEST HB_GT_WIN_DEFAULT ***********************************...
by don lowenstein
Sat Jan 06, 2018 4:08 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: access to window via its :hwnd
Replies: 10
Views: 1790

Al usar hb_itemDoC el aplicativo deja de funcionar

Señores, al alguien sabe de este problema. Al utilizar la instrucción hb_itemDoC el aplicativo deja de funcionar y debo forzar su cierre o también se me bloquea el equipo y debo apagarlo. La idea es ejecutar una función o procedimiento de harbour desde un bloque #pragma BEGINDUMP No se, si es, la de...
by jgayoso
Thu Jun 22, 2017 8:10 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Al usar hb_itemDoC el aplicativo deja de funcionar
Replies: 2
Views: 529

Re: Error al cargar PCode DLL

No funciona, continua el problema. Estoy trabajando con los ejemplos: testdllp.prg y pcodedll.prg a testdllp.prg le añadí el código que me indicas y el resultado de la compilación es el siguiente: Compiling... xHarbour 1.2.3 Intl. (SimpLex) (Build 20170513) Copyright 1999-2017, http://www.xharbour.o...
by RSalazarU
Fri May 26, 2017 7:29 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Error al cargar PCode DLL
Replies: 9
Views: 1343

Re: create a harbour dll containing functions to be executed

Antonio, I'm not sure that I have the Harbour DLL setup properly. I receive the following error An unhandled exception of type 'System.EntryPointNotFoundException' occurred in WindowsFormsApplication1.exe Additional information: Unable to find an entry point named 'OneParam' in DLL 'Mydll.dll'. This...
by rkurian
Thu Sep 08, 2016 8:51 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: create a harbour dll containing functions to be executed
Replies: 23
Views: 4256

Re: create a harbour dll containing functions to be executed

> We can implement it in the function HBDLLENTRY() itself

void pascal __export HBDLLENTRY1( char * cProcName, PHB_ITEM pParam1 )
{
hb_itemDoC( cProcName, 1, pParam1 );

if( HB_ISBYREF( pParam1 ) )
hb_itemPutC( pParam1, hb_retc( -1 ) ); // -1 mean the value returned from cProcName
}
by Antonio Linares
Wed Aug 31, 2016 7:26 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: create a harbour dll containing functions to be executed
Replies: 23
Views: 4256
Next

Return to advanced search