Hi,
I'm playing around learning module development, and I have a question about the dwReturnType parameter to thinBasic_LoadSymbol function.
Is there any documentation on what these predefined constants are used for?
thinBasic_ReturnNone
thinBasic_ReturnNumber
thinBasic_ReturnString
thinBasic_ReturnCodeByte
thinBasic_ReturnCodeInteger
thinBasic_ReturnCodeWord
thinBasic_ReturnCodeDWord
thinBasic_ReturnCodeLong
thinBasic_ReturnCodeQuad
thinBasic_ReturnCodeSingle
thinBasic_ReturnCodeDouble
thinBasic_ReturnCodeCurrency
thinBasic_ReturnCodeExt
For example, when do I use thinBasic_ReturnNumber, and when do I use thinBasic_ReturnCodeLong?
So far, I have a script that creates a long typed variable and stores a value in it, then calls a function in my module passing the memory address of the variable as a parameter. The module calls thinBasic_ParseDWord to get the address, casts it into a pointer, then dereferences the pointer and returns the contents of the memory address. I found I had to specify a dwReturnType of thinBasic_ReturnCodeLong in the LoadSymbol function for it to work.
I'm generally confused (as usual), but especially about how to use these dwReturnType constants.
What I'm working at is for the script to pass the address of an array, the data type, and number of elements, and have the module be able work with the array.
Any help or insight you may offer would be very appreciated!
Thanks,
Randall
Bookmarks