Page 1 of 1

"Possible" bug when calling StdCall PBLibrary func

Posted: Tue Feb 07, 2006 11:44 pm
by El_Choni
Using this as library source:

Code: Select all

format MS COFF

Public PB_Test

Extrn _MessageBoxA@16

section '.text' code readable executable

PB_Test:
  mov eax, [esp+4]
  push 0
  push eax
  push eax
  push 0
  call _MessageBoxA@16
  ret 4
And this as .Desc file (note the StdCall flag):

Code: Select all

ASM
;
1
USER32
;
OBJ
;
0
;
Test.chm
;
Test,String, (String.s)
None | StdCall
;
Works when called through a variable:

Code: Select all

text.s = "This is "+Str(1)+" test"
Test(text)
But fails if the composed string is given directly as an argument:

Code: Select all

Test("This is "+Str(1)+" test")
(BTW, this is the reason I haven't released TailBite yet...)