Page 1 of 1

[done] Problem with creating of three procedures

Posted: Sat Nov 20, 2010 8:44 pm
by mpz
Hi,

i have a question to Tailbite and PB 4.51 x86. I want to make three different procedures but Tailbite think these are one procedure with variable arguments
and the lib cant be created. Is it possible to make three procedures or must i use a differnt name like Catch32Font, Catch8Font and CatchFont?

Thanks for help,
Michael

Code: Select all


ProcedureDLL CatchFont32(FontNumber.l, MemoryID, Length)
   
  ProcedureReturn 1
  
EndProcedure

ProcedureDLL CatchFont8(FontNumber.l, MemoryID, Length)
   
  ProcedureReturn 2
  
EndProcedure

ProcedureDLL CatchFont(FontNumber.l, MemoryID, Length, XSize, YSize)
  
  ProcedureReturn 3

EndProcedure


Re: Problem with creating of three procedures

Posted: Sat Nov 20, 2010 10:11 pm
by ts-soft
use tailbite manager, save the source, change the desc and recompile with librarymaker

Re: Problem with creating of three procedures

Posted: Sun Nov 21, 2010 5:29 am
by lexvictory
yes, it appears you will have to rename your functions (simply adding an underscore to the end works fine)
If you dont want to change the names however, you will need to use the /DONT parameter to tailbite.exe, or use TBManager and check the 'Don't build library, only source files.' checkbox (and possibly the 'Keep source files after making the library.' one (/KEEP to tailbite.exe), I'm not sure)

then you'll need to edit the .Desc file in the tailbite library sources folder.
you'll want something like this: (remove "| UNICODE | THREAD" if you don't compile with the multilib option)

Code: Select all

ASM
;
1
KERNEL32
;
LIB
;
0
;
mpz.chm
;
CatchFont32, Long, Long, Long (FontNumber.l, MemoryID, Length)
Long | StdCall | UNICODE | THREAD
;
CatchFont8, Long, Long, Long (FontNumber.l, MemoryID, Length)
Long | StdCall | UNICODE | THREAD
;
CatchFont, Long, Long, Long, Long, Long (FontNumber.l, MemoryID, Length, XSize, YSize)
Long | StdCall | UNICODE | THREAD
;
mpz_Init 
InitFunction | StdCall | UNICODE | THREAD
;
then use the batch file (check that 'generate build batch file' is selected in tb manager if using manager to compile) to compile and install the lib
(make sure to run it as admin if your pb directory is in program files and on vista or 7)

Re: Problem with creating of three procedures

Posted: Sun Nov 21, 2010 6:45 pm
by mpz
Thanks you,

now i understand and think i can use it very well...

Greetings Michael