Hi, and welcome to the wonderful world of writing mIRC DLLs
The version number is stored as two short numbers (the major, and the minor version number), packed together into mVersion. You can use Windows' HIWORD and LOWORD macros to retrieve each half of it; LOWORD retrieves the major version number, and HIWORD retrieves the minor part, as can be seen in the following example.
char version_string[32];
WORD major_version = LOWORD(li->mVersion);
WORD minor_version = HIWORD(li->mVersion);
wsprintf(version_string, "mIRC %d.%d", major_version, minor_version);
MessageBox(NULL, version_string, "info", MB_OK);
Also, in my DLL, how would I ask mIRC for information? for example, if I want to get the value of the $me identifier, what commands would I use to store that in some variable in my DLL?
As it is now, you basically have two choices: either let the user pass this information to you as parameter to the DLL call (eg. "/dll mydll.dll testProc $me"), or you can use the SendMessage way to let mIRC evaluate a string for you (documented in the mIRC helpfile, under "SendMessage"). Good luck!