I’ve got a whole bunch of legacy MIDI drivers (the dll kind) that provide
MIDI over alternate transports, talk to PLCs, do GUIs and just a whole bunch
of other oddball things that are appropriate around a theatre.
It turns out that as of SP2 for XP, virtually every builtin NT function or
program opens all of the MIDI drivers when it starts up, and interrogates
all of the MIDI ports on each driver. This wouldn’t be too horrible, except
for one thing. This happens some 8-10 times after boot and before the logon
message is displayed. It happens some 6 or so times before NT even
considers network startup.
If these programs simply loaded the MIDI drivers this might not be horrible
(although it is, obviously). But since they also interrogate all the MIDI
ports, any driver providing transport over the network *must bind to the
network* to respond to these queries.
Well, as a ‘feature’ of SP2, the ‘bind’ function doesn’t time out if the
network isn’t loaded. Nor does it return an error. As a result, boot never
finishes, since all of the network initialization programs open the MIDI
ports before starting the network, and all end up hanging forever in bind.
Which leaves the system in a bind, as it were.
After discovering this lovely little feature, we were able to spend a day or
so of hacking, and finally discovered that if we interrogate the running
usercode before attempting the bind, and looking for about 5 hard-coded
usercodes, that usually we could get the system to boot correctly, by simply
refusing to open and claiming there were no MIDI ports on the drivers.
Isn’t this a lovely ‘fix’ for the problem? It will probably last until SP3,
when they will probably change the strings of some of the usercodes used
during boot. In case anyone is wondering, yes, I consider this a hack and
not a fix. However, it is the ONLY thing I found that seems to work.
Sigh, but it turns out that it isn’t a complete hack. I found out from a
user today that ipconfig opens the MIDI ports too, seemingly after locking
the network in some way or other. So we are up and running, and running as
a user so my hack checks don’t work, and now the user can lock up the system
(and network, I think) again simply by typing ipconfig at the run prompt.
Can anyone think of a way I can hack around this lovely little situation?
It would be ideal if bind simply timed out or returned an error as it
should, but it doesn’t.
And anyone having the temerity to suggest I convert these legacy dlls to KS
drivers will be shot! I once spent an ugly 4 months fighting to get a
dirt-simple MIID-over-serial root-enumerated KS driver working, and I still
have nightmares about it. I don’t even want to consider the possibility of
doing this with something that has to talk to the network, or open a window
and display graphics, or execute a user program. I can do any of those
things in about 2 hours from a dead start using the old dll format. Since
none of those things represent a PnP enumerated hardware device, they fall
FAR outside the range of what KS was ever “designed” to accomplish. It
makes the hacks I’ve had to go through to keep from locking up SP2 systems
look like mil-spec life support system designs.
Help greatly appreciated, as long as it doesn’t include the letters KS.
Thanks,
Loren