If you use CallDll you can return a large amount of data from the Dll back into Blitz via a Bank of memory.
Is this possible with user libs?
As far as I know you can only return a single float or int.
all a bank is, is an integer pointer to the bank. So you use them the same.
So what you're implying is that I can do this? ...
C++ User lib implementation
int MyFunc(void)
{
static int memory;
return (int) &memory;
}
and in Blitz
memory_bank = MyFunc()
memory% = PeekInt(memory_bank,0)
I'm [EDIT*] ->NOT<- exactly sure what you want to do. But if you want to manipulate blitz bank data in C/C++ then this should do it.
C++ part
void MyFunc(int *bank)
{
*bank = 1234567;
}
Blitz
Bank = CreateBank(4)
MyFunc(Bank)
Print PeekInt(Bank,0)
FreeBank(Bank)
Ahh, so it doesn't take a copy of Bank and pass it to MyFunc.
So you just manipulate Bank in your User lib and this makes the changes in Blitz.
Thanks Spindeln, I think this is what I need.