Aren't most (if not all) callback functions in the form of:
MessageCode, wParam, lParam ??
Making it actually more like:
code:
// instruct Plus! to make a (callback) function internally and let it return its address
var objCallbacks = {}
objCallbacks['EnumWindows'] = MsgPlus.CreateCallback();
Interop.Call('user32', 'EnumWindows', objCallbacks['EnumWindows'], 0);
function OnFunctionCallback(hCallback, Message(or handle to wnd), wParam, lParam) {
switch (hCallback) {
Making it almost the same as OnWindowidEvent_MessageNotification???
Using this 'convention'/method you would have covered almost all callbacks...
(By heart I only know of only 1 callback function which uses 1 more parameter; WindowProc)
Interpreting what the parameters are (just a number or a pointer to something else) is the responsebility of the scripter, imho, just like with OnWindowidEvent_MessageNotification (?)
/me sits beside Matty on his knees begging 