Hello Geoffray.
Welcome to the list!
You won't be able to use XstCall to make your API call, as XstCall uses a simplified calling protocol and your AdNums API is too complex to be handled by XstCall.
XstCall is a workaround when you don't have a function prototype or (as happened to me once) when the available prototype is incorrectly constructed. Therefore, only consider XstCall as a last resort.
In XBLite, it's crucial to add the correct prototype and then strictly adhere to the parameter list and their respective data types. The XBLite compiler only uses the provided prototype to validate later the syntax of the call in your program.
So, forget about XstCall for the AdNums API.
Good luck with your exploration and learning of XBLite!
Bye! Guy
Hello Everyone:
Is it possible to pass a float (SINGLE) to the array parametersof XstCall? A string is passed as &"My String"?
So the code would be:
Function Prototype: SINGLE AddNums(SINGLE, SINGLE, STRING)'prints string and returns a + b
'some functions in the Win32 and DirectX api use floats
a! = 2.1b! = 3.4
DIM args[2] '0 IS AN ENTRY
args[0] = &a! 'does not work '@a! gives me a type error???
args[1] = &b! 'does not work
args[2] = &"Hello Message" 'works'result returns 0result! = XstCall ("AddNums", "mdll.dll", @args[]) 'does not work
DIM args![2] is also not accepted in the function call, type error.
PRINT "RESULT:= " + STRING(result!)
Please let me know if there is a solution.
Thank you,
--
You received this message because you are subscribed to the Google Groups "xblite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xblite+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/xblite/51922095-8752-4469-be0f-1a37e6527c80n%40googlegroups.com.