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.
not fully clear about that part , so after the first call to do the processing; say $dll(mydll.dll, Myproc, Data) i make another call to the GetData proc in my dll, $dll(mydll.dll, GetData, N) to check the number of lines, & possibly if there is more data.. withstanding ; then again call the dll with $dll(mydll.dll, Myproc, Data) to fetch the remaining data if neccessary & so on if there are more lines.
Picking up from your post,..I was thinking maybe, make the 1st byte of the return data hold the number of lines, that way it could be checked (by mirc) in the same call (let me know of possible downsides to this)
[Edit:] ..but maybe your method would possibly make for more flexibility & options that could come in use.
Many Thanks for all the info.
-