Page 2 of 2
Re: create a pcode dll
Posted:
Mon Jan 12, 2009 9:03 am
by Carles
Antonio,
I'm thinking that's a good sample, and i have curiosity for the correct use and compiling. The sample dll maybe can be:
- Code: Select all Expand view
MyDll.dll
Function OneParam( aData )
*-------------------------
LOCAL nI
LOCAL nTotal := Len(aData)
FOR nI := 1 TO nTotal
MsgInfo( aData[ nI ][ 1 ] + CRLF + ;
aData[ nI ][ 2 ] + CRLF + ;
Str( aData[ nI ][ 3 ] ) + CRLF + ;
cValToChar( aData[ nI ][ 4 ] ) + CRLF + ;
DToC( aData[ nI ][ 5 ] )
NEXT
RETU .T.
Re: create a pcode dll
Posted:
Mon Jan 12, 2009 5:07 pm
by don lowenstein
Antonio,
I am using the samples testdllp.prg and pcodell.prg
The pcodedll.prg is giving me the following when I try to make with the buildhdp.bat
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external '_HB_FUN___CLSINST' referenced from T:\FWH\SAMPLES\PC
ODEDLL.OBJ
Error: Unresolved external '_HB_FUN_PCOUNT' referenced from T:\FWH\SAMPLES\PCODE
DLL.OBJ
Error: Unresolved external '_HB_FUN_HB_APARAMS' referenced from T:\FWH\SAMPLES\P
CODEDLL.OBJ
Any help is greatly appreciated.
Re: create a pcode dll
Posted:
Mon Jan 12, 2009 5:26 pm
by Antonio Linares
Don,
Have you modified buildhdp.bat to call xHarbour instead of Harbour ?
Re: create a pcode dll
Posted:
Mon Jan 12, 2009 5:46 pm
by don lowenstein
Thank you for your prompt response - can we create a pcode dll in xharbour?
Re: create a pcode dll
Posted:
Mon Jan 12, 2009 9:02 pm
by Antonio Linares
Don,
Yes, they can be created with xharbour too.
But buildhdp.bat has to be modified to call xharbour.exe and use the xharbour libraries.
Re: create a pcode dll
Posted:
Mon Jan 12, 2009 11:05 pm
by don lowenstein
Antonio,
Thank you for all of your assistance - we have been successful in creating a pcode dll passing parameters as needed.
Here is what we have -
xHarbour calling exe:
- Code: Select all Expand view
function Main()
local dllret, dparm := date(), lparm := .t.
local aparm := {'a', date(), 4321,.t.,{'c'}}
local hDll := LoadLibrary( "mypdll.dll" )
private p1
m->p1 := 'this is a private var'
altd(1)
altd()
//**HB_LibDo( "DLLInit" )
dllret := HB_LibDo( "mydllFunc", {'tstparm1', 'aparm2', 1234, dparm, lparm, aparm } )
? dllret
return .t.
xHarbour pcode dll -
- Code: Select all Expand view
function mydllFunc( aparm )
local i := 0
altd(1)
altd()
? m->p1
for i := 1 to len(aparm)
? aparm[i]
next
return i
Once again thank you for your help
Re: create a pcode dll
Posted:
Tue Jan 13, 2009 12:16 am
by Antonio Linares
Don,
Very good
Re: create a pcode dll
Posted:
Tue Jan 13, 2009 7:50 am
by Carles
Don,
In your example, where is HB_LibDo() ?
Re: create a pcode dll
Posted:
Tue Jan 13, 2009 9:41 am
by Otto
Hello Antonio,
Could you please instruct me how to set up the debugger.
Thanks in advance
Otto
>Is the debugger fixed in the Latest version of xHarbour1.0?
>We have NOT upgraded do to the lack of a debugger.
>
>The xHarbour debugger is properly working with FWH 8.12 and the xHarbour build that FiveTech provides:
Re: create a pcode dll
Posted:
Tue Jan 13, 2009 10:07 am
by Antonio Linares
Otto,
Please build FWH\samples\altd.prg this way:
buildh.bat altd /b
Re: create a pcode dll
Posted:
Tue Jan 13, 2009 3:16 pm
by don lowenstein
HB_LibDo() is a Harbour function.
We have also experienced some Debugger issues in xHarbour v1.0
It seems that the f7 - run to cursor, and f9 - set break do not work with the xHarbour v1.0, as in the previous versions.