Calling the dll multiple times is the easiest way. You can have your dll accept $dll(mydll.dll, GetData, N) where N is a positive integer from 1 to the number of "lines" it returns. You could then make N=0 return the number of lines as expected by convention.

Another way would be using SendMessage: /help SendMessage

There are existing code snippets to use SendMessage with mIRC (google). In this case you would want to send data to a callback alias, so your dll might take: /dll mydll.dll GetData callbackalias where callbackalias was defined as:

alias callbackalias { echo -a $1- }