yes it would

you can force mIRC to keep the DLL loaded all the time, in the unload function

// mIRC wants to close the DLL because /dll -u was called or mIRC exits
if ( timeout == 1 ) {

//clean your stuff here
return 1; // <-- tell mIRC it's ok to unload
}
else
return 0; // <-- tell mIRc we don't want to unload due to idling DLL usage (we want to keep it in memory until it's forced to unload or mIRC's exits)

Now I would really recommend that you build yourself functions to echo some debug messages to mIRC while you develop your stuff. You can take a look in the DCX package for something like mIRCError which will send the contents to mIRC via an //echo -s so I can see stuff that is going on inside the DLL during operations and manipulations to anticipate problems with data structure, invalid params, etc.

us it with the combination of wsprintf() or lstrcpy()

I would suggest you stick with the lstr* functions because they are natively included in the windows API base stuff. Using strcpy or any other variant not lstr* will only add to the size of your DLL as this extra code will be packaged with it. wsprintf() is part of the lstr* functions included.

char error[900]; // <-- no more than 900 because mIRC's data parameter which you will copy the value to send it to mIRC is limited to 900 chars.

int param1 = 12;
char [] blah = "Error occured";
wsprintf( error, "%s : %d", blah, param1 );

mIRCError( error ); // <-- assuming you use the same function is use

Debugging tools are your best bet to help you understand what is going on.

Secondly, I developped a small string library which might interest you, it's in the DCX source code if you can find that online. It's called TString which basically replicates what string does, but it adds the *tok functionality to it so it is easier to parse the parameters passed to a function. You can look into the DCX source code for examples on how to use it.

If you want, I can send you the latest version of that TString library which has quirks fixed (maintained by a friend Ook on IRC). I'm usually online at night or send me a pmsg with your e-mail and I'll send over the library.