all stated from this question:
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_23102229.html
this allows you to register your won protocol (not the default http://, but even “blabla://”) and your whatever namespaces. so you coul dhave in the same program
blabla://res_name/res_name
and
blabla://res_id/res_id
and
etc://whatever/something
of couse, the code requires a little modification in order to support the above stuff, but the modifications are basic/easy level.
attached you can find the pas files involved
contains 2 pas files to demonstrate how to load a mht from a stream