Page 1 of 1
Posted: Mon May 06, 2002 12:58 pm
by BackupUser
Restored from previous forum. Originally posted by marlo.
How can i translate this line of Delphi to PB code?
TYPE MyActionProc = PROCEDURE( IDNum : INTEGER; Name, Hint : PChar;
Params : ARRAY OF BYTE;
NumParams : BYTE );
Thanks for any help!
south south america
Posted: Mon May 06, 2002 2:59 pm
by BackupUser
Restored from previous forum. Originally posted by Danilo.
You dont need to write that.
Its only a declaration, so its not needed to write
it in PB.
You only have to remember this when you translate
the procedure/call to "MyActionProc".
You *could* write something like
Code: Select all
DECLARE MyActionProc(IDNum.l, *Name, *Hint, *Params, NumParams.b)
if you translated the Procedure to PB.
Code: Select all
*Name = Pointer to a String -> Name$ = PeekS(*Name)
*Hint = Pointer to a String -> Hint$ = PeekS(*Hint)
*Params = Pointer to an Byte-Array
NumParams = Count of Bytes @ *Params
To make it better, someone needs the whole Source
to check everything.
Looks like "MyActionProc" is not directly in the source,
but outside in a DLL or something like this.
cya,
...Danilo
(registered PureBasic user)
Posted: Mon May 06, 2002 3:25 pm
by BackupUser
Restored from previous forum. Originally posted by marlo.
Thanks for reply Danilo.
I want to translate a DLL code, which i have in Delphi and/or Visual C++
for use on and authoring tool called Neobook, the host of that dll.
Exist a development kit for DLLs but only in that languages, not VB or basic languages.
Its not a long code, if you can help me i put here the the full code.
Really, thanks a lot.
from the ass of the world
Posted: Mon May 06, 2002 4:11 pm
by BackupUser
Restored from previous forum. Originally posted by Paul.
marlo, like I mentioned before... the DLL created in PB will not work with your Neobook program unless you can change how Neobook calls the DLL.
All call names created in PB for a DLL have a "_" added to them.
Neobook will be looking for: MyActionProc
but the DLL would contain: _MyActionProc
Posted: Mon May 06, 2002 5:40 pm
by BackupUser
Restored from previous forum. Originally posted by Danilo.
Paul is right.
You cant rewrite this DLL with PureBasic
until Fred can change the Linker to not
insert the "_" before the name.
cya,
...Danilo
(registered PureBasic user)
Posted: Mon May 06, 2002 6:49 pm
by BackupUser
Restored from previous forum. Originally posted by marlo.
Thanks Danilo and Paul. I wait Fred can change this if is possible
Txs
from the ass of the world
Posted: Wed May 08, 2002 7:16 am
by BackupUser
Restored from previous forum. Originally posted by Danilo.
Well...
Fred said its not possible atm, because the
Linker adds it automatically.
I think there _must_ be a way to tell the
Linker not to add the "_", but Fred should
know this better.
Its a linker from a C-compiler. But hey,
you can also write DLLs without "_" in C/C++
Fred ??
cya,
...Danilo
(registered PureBasic user)