quote:
Originally posted by felipEx
* felipEx waits for Cookie's reply
That's what I meant, yes.
At phalanxii, hmmm, very good point. I guess this has something todo with the fact that scripts can be unloaded, removed, etc. But then again, as felipEx showed, you could handle that with Uninitialize() and ChatWndDestroyed() and stuff. Dunno really.... This is something for Patchou to answer I think: why it is that it isn't allowed, but still possible.
Anyways, even if it wouldn't have been possible like that, you could also make a very small ActiveX dll which does the same as GetCallbackPtr(). I have used such an ActiveX a long time ago as kind of experiment, before GetCallbackPtr existed, and it worked nice. You call the ActiveX, the ActiveX returns a pointer you could use in a call to the SetWindowLongW API and you needed a var function (like the one used with Xniff and other ActiveX which call back to the script).
And, but I never made this experiment yet, I think you could also device something with a Plus! Window of which you 'borrowed' the WinProc address to be used to overwrite the WinProc of another window. And with OnWindowidEvent_MessageNotification you can catch the window messages of that 'external' window. If this works, it also means you could subclass already long before GetCallbackPtr() existed.