Not that I've made a .dll before.

But if you want your .dll call in mirc to return your databuffer variable, you'll need to strncpy(data, databuffer, 900). All you are doing is assigning the address of it to a local variable in the function.

Is this the problem?