mIRC Home    About    Download    Register    News    Help

Print Thread
#152830 06/07/06 08:59 PM
Joined: Dec 2002
Posts: 580
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
I am please to annouce to all the other DLL developers that I finished writing a Subclassing API for mIRC. This API takes away ALL headaches with subclassing. It also fixes a bug with subclassing that exists in all current versions of mIRC, click here for details. Comes with full source, an example DLL, the API library and include files, as well as documentation. Click here to download.

No more crashing on exit, and no more mishandling of WndProc handles. smile

Enjoy!


NaquadaBomb
www.mirc-dll.com
Joined: Apr 2006
Posts: 464
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
No idea what it does, or can do, but it does sound good laugh
Nice job... I guess :tongue:

Joined: Dec 2002
Posts: 580
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
If you want to know more about subclassing, a couple of good reference are...

MS SDK - Windows Procedures
Safe Subclassing in Win32


NaquadaBomb
www.mirc-dll.com
Joined: Dec 2002
Posts: 580
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
Sorry, there was a minor bug in this initial release... I will have it fixed up today sometime. When it's fixed, you will be able to download the fixed version with this link.

Last edited by NaquadaServ; 07/07/06 01:43 PM.
Joined: Jul 2006
Posts: 5
N
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
N
Joined: Jul 2006
Posts: 5
If I may be so blunt, what is the end result going to be for people who use your subclassing api for mIRC? Does it provide a means by which people can change the visuals of a window in the program (IE - skins?) or what?

It would also be really nice if you could provide some online examples (with screenshots of some of the possiblities) or further detailed description before we use up your bandwidth and our time downloading this!

THANKS!

NACHO FREE

Joined: Dec 2002
Posts: 580
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
If I have to explain to you what subclassing is, than this is not for you...

If you what to know why my Subclassing API make subclassing simple, I can explain further, but breifly here is what it does...

It maintains the window procedureal chain using a linked list rather than having every DLL use it own SetWindowLong(GWL_WNDPROC). It does this using an injected DLL (it uses LoadLibrary()). Besides handling the procedureal linked list, SetWindowLong() and CallWindowProc(), this DLL unsubclasses all windows before the mIRC window processes the WM_CLOSE message (to prevent a bug in existing versions of mIRC, that would cause a subclassing of the mIRC window to Crash-On-Exit) and re-subclasses all the windows if WM_CLOSE is canceled.

There is a lot of comments in the source, please see the source for more information.

There is nothing I could use to give you a screen shot... An API is not an end product, it is a product for those programmers developing an end product.

Last edited by NaquadaServ; 08/07/06 09:46 PM.
Joined: Dec 2002
Posts: 580
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
[Continued]

To answer your first question, "What will the end result be?"... Hopefully a whole bunch of DLL files that can interoperate without knowing anything about the other DLL's being used. And maybe even the development of a mIRC DLL SDK. (wishfull thinking) smile

When multiple DLL's subclass the same window, problems can occur when unsubclassing (in the traditional way). Take for example two DLL's that subclass the toolbar's WndProc. I load DLL 'A' and than DLL 'B'... DLL 'B' is the first WndProc to receive messages (as it was the last to do a SetWindowLong()). At the end of 'B' proc, 'A' proc is called (because SetWindowLong()) returned the previous window proc). At the end of 'A' proc, mIRC's WndProc is called and than DefWindowProc() is called. That a chain...

Now let's say that DLL 'A' needs to unload before DLL 'B'... Without using the Subclassing API, you will have a problem. The chain will be broken, because DLL 'B' wants to call DLL 'A' when it's finished. But DLL 'A' is gone. The result is a crash.

My Subclassing API prevents this problem and simplifies the amount of work a DLL programmer need to put in to writing a subclassed WndProc.


Link Copied to Clipboard