This source will make a dll when compiled that will work with mIRC by using $dll(dll,GetStuPID,$null) identifier in mIRC
#include <windows.h>
#include <stdlib.h>
int __declspec(dllexport) __stdcall GetStuPID(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause)
{
DWORD pid = GetCurrentProcessId();
sprintf(data, "%u", pid);
return 3;
}