create a pcode dll

Re: create a pcode dll

Postby Carles » Mon Jan 12, 2009 9:03 am

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.
Salutacions, saludos, regards

"...programar es fácil, hacer programas es difícil..."

UT Page -> https://carles9000.github.io/
Forum UT -> https://discord.gg/bq8a9yGMWh
Skype -> https://join.skype.com/cnzQg3Kr1dnk
User avatar
Carles
 
Posts: 1090
Joined: Fri Feb 10, 2006 2:34 pm
Location: Barcelona

Re: create a pcode dll

Postby don lowenstein » Mon Jan 12, 2009 5:07 pm

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.
Don Lowenstein
www.laapc.com
User avatar
don lowenstein
 
Posts: 197
Joined: Mon Oct 17, 2005 9:09 pm

Re: create a pcode dll

Postby Antonio Linares » Mon Jan 12, 2009 5:26 pm

Don,

Have you modified buildhdp.bat to call xHarbour instead of Harbour ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: create a pcode dll

Postby don lowenstein » Mon Jan 12, 2009 5:46 pm

Thank you for your prompt response - can we create a pcode dll in xharbour?
Don Lowenstein
www.laapc.com
User avatar
don lowenstein
 
Posts: 197
Joined: Mon Oct 17, 2005 9:09 pm

Re: create a pcode dll

Postby Antonio Linares » Mon Jan 12, 2009 9:02 pm

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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: create a pcode dll

Postby don lowenstein » Mon Jan 12, 2009 11:05 pm

Antonio,

Thank you for all of your assistance - we have been successful in creating a pcode dll passing parameters as needed. :D

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
Don Lowenstein
www.laapc.com
User avatar
don lowenstein
 
Posts: 197
Joined: Mon Oct 17, 2005 9:09 pm

Re: create a pcode dll

Postby Antonio Linares » Tue Jan 13, 2009 12:16 am

Don,

Very good :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: create a pcode dll

Postby Carles » Tue Jan 13, 2009 7:50 am

Don,


In your example, where is HB_LibDo() ?
Salutacions, saludos, regards

"...programar es fácil, hacer programas es difícil..."

UT Page -> https://carles9000.github.io/
Forum UT -> https://discord.gg/bq8a9yGMWh
Skype -> https://join.skype.com/cnzQg3Kr1dnk
User avatar
Carles
 
Posts: 1090
Joined: Fri Feb 10, 2006 2:34 pm
Location: Barcelona

Re: create a pcode dll

Postby Otto » Tue Jan 13, 2009 9:41 am

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:
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm

Re: create a pcode dll

Postby Antonio Linares » Tue Jan 13, 2009 10:07 am

Otto,

Please build FWH\samples\altd.prg this way:

buildh.bat altd /b
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: create a pcode dll

Postby don lowenstein » Tue Jan 13, 2009 3:16 pm

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.
Don Lowenstein
www.laapc.com
User avatar
don lowenstein
 
Posts: 197
Joined: Mon Oct 17, 2005 9:09 pm

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 85 guests