System.dll Problem calling dll
I've found the bug in my code it's in bold. Typical that you find the bug just after posting on the net.

I'm having problems getting a call to an external dll to work. I've looked at the docs and some examples seem to use 'C'style function calls and some use 'C++'style. I was trying to use:

Functionname (i r1, i r2) but that didn't work so i changed to Functionname(i,i)(r1,r2) and that seems to work better but i still don't get the expected data back.

System::Call 'dz_ez32::dunzstart() i .r0'
strcpy $1 0
strcpy $2 8
push $0
push $1
System::Call 'dz_ez32::setunzvalue(i,i,i) (r0,r1,r2)'
pop $1
pop $0
System::Call 'dz_ez32::getunzvalue(i,i) (r0,r1) i .r3'
messagebox mb_ok $3

dunzstart() is an initialising function that returns a session ID. r0 has a valid integer in it when the dunzstart routine returns.

setunzvalue should set property r1 of session r0 to r2
getunzvalue should return property r1 of session r0
the messagebox displays 0 as a result when it should come back 8.

Any help would be most welcome

Thanks

Russell