Originally Posted By: /help sendmessage
Extended Error Information
If cMethod is or'd with the value 16, this will make SendMessage() return more useful error values instead of just 0 for failure and 1 for success. The return values are: 0 = success, 1 = failure or'd with 2 = bad mapfile name, 4 = bad mapfile size, 8 = bad eventid, 16 = bad server, 32 = bad script, 64 = disabled (if disabled in the Other dialog).


If I try to evaluate "$script(0", creating an error, sendmessage returns 1 and not 33

Code:
LPCWSTR l = "mIRC";
HANDLE file = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 4096, l);
LPSTR str = (LPSTR)MapViewOfFile(file, FILE_MAP_ALL_ACCESS, 0, 0, 0);
strcpy(str, "$script(0");
int ss = SendMessage(hwnd, WM_MEVALUATE, 0, 0);


#mircscripting @ irc.swiftirc.net == the best mIRC help channel