Im interested in collecting data from calls made to various CD-ROM functions
under INT-2Fh(W9x), Im currently at the point where im using a VxD to
hook the interrupt, but need a safe sensible way of collecting/storing the
data and passing it back to my win32 app for show. Anyone got any good ideas which wont reboot me every 5 minutes? ;-)

Posted on 2002-09-03 09:42:52 by [yates]
Hi yates,

If you're simply trying to pass info retrieved from the vxd to Win32, you can store the info in your own vxd structure and pass a pointer to the structure back to your app via lpOutBuffer. This should work OK from within an ISR. Take a look here for an example:


Alternatively, you can write info from the vxd to a file using the VxDCall IFSMgr_Ring0_FileIO series of functions, (then read the file off disk from Win32), BUT you might get some reentrancy / timing issues if these calls are made from the ISR itself. I think a simple structure should suffice for what it sounds like you're trying to do.

Posted on 2002-09-03 11:02:30 by Kayaker
Sorry Yates, I was looking at your question again and realized I may have misinterpreted what you were actually looking for.

.. need a safe sensible way of collecting/storing the data and passing it back to my win32 app for show.

I thought you had already collected your data and was just looking for a way to store it in memory so your Win32 app could access it, but maybe you meant something else instead. What kind of data are you trying to collect? If you've hooked the Int 2F interrupt, then several of the CD_ROM functions use the Int 2F/AX=1500h series of calls, so the value of AX should alert you to a CD function. If you want to find out the *results* of the real system Int2F call, then I'd think you'd have to pre-chain to it first with a
pushf / call OldIntVect and interpret the returned values.

There's a couple of IFS manager functions in the DDK that deal with the CD directly - IFSMgr_CDROM_Detach, IFSMgr_CDROM_Attach, or whatever other functions you might want to call. I'm not sure exactly what you're trying to do, and I certainly won't guarantee you won't have to reboot your system every 5 minutes ;)

Posted on 2002-09-03 18:43:57 by Kayaker
Kayak0r ;)

locked data segments and passing a pointer back to my app may work have to
try it.

basically what im trying to do is write a low level CD monitor, im particularly
interested in the sector read functions, 150B/1510 i think? so i'll be checking
the client struct for these functions, now, i'll be wanting to store this and a
few selected params and send back to my app to be showen in my listbox
with some cute msg, maybe even ability to save the read sectors etc, anyway
getting/storing the information is my issue, i could write a few structs and fill
em with info, but once i filled the structure i need to notify my app i have info,
so it can collect it and wipe the structure, or, i could create an array of about
30 of my structs and stick a sleep in my app to check for info every now and again
and clear it out, but avoiding the situation where the interrupt is called and theres
no space or it wipes previous stored data etc hmm if that makes sense? oh and i dont
want to be calling anything inside the ISR, just moving data if possible.

:stupid: heh
Posted on 2002-09-04 05:47:34 by [yates]