when a bank is created the returned value is an internal struct used by blitz. the correct way would be to pass the bank to the .dll as an address pointer using '*' defined in the .decls function.
*EDIT
so your .decls might look like this
*EDIT
so your .decls might look like this
.lib "mydll.dll" banktest%(bank*):"_banktest@4"