473,785 Members | 2,363 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CD Insert Notification in WinXP

Hi,

I'm using Python 2.3 on a Win XP box, and I'm trying to find if there's
a library of some sort that will give you a callback (or something
comparable) when a new disc is inserted into a CD Rom drive. I've done a
little googling and nothing's come up, so I'm not holding my breath. :)

If not, I'm thinking of implementing a thread to periodically read the
volume serial number using GetVolumeInform ation from Mark Hammond's Win
32 extensions, then doing a compare against the last known value. Does
this sound "sane"? Any recommendations would be useful.

Thanks!
Tim
Jul 18 '05 #1
1 1387
> I'm using Python 2.3 on a Win XP box, and I'm trying to find if there's
a library of some sort that will give you a callback (or something
comparable) when a new disc is inserted into a CD Rom drive. I've done a
little googling and nothing's come up, so I'm not holding my breath. :)

If not, I'm thinking of implementing a thread to periodically read the
volume serial number using GetVolumeInform ation from Mark Hammond's Win
32 extensions, then doing a compare against the last known value. Does
this sound "sane"? Any recommendations would be useful.


Tim,

Generally, Windows autoinsert notification can be enabled or disabled
for data and audio disks independantly. When autoinsert notification is
enabled on data disks, the Windows operating system automatically does
what CD:\autorun.inf says.

I would imagine that a similar thing occurs on audio cd inserts, except
that it automatically calls the program that is associated with .cda
files.

Certainly there are hooks into the OS that allow one to intercept
filesystem read/write calls (it is what virus scanners do), which could
be tested to see if the read is from a cdrom drive, but I don't know if
Mark Hammond's extensions would be enough, though it is doubtful.
I would suggest polling the serial number every 5 seconds or so, making
sure to deal with the various exception conditions.

- Josiah

Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1747
by: Guju | last post by:
Hi all, I wanted sql server to shoot an email upon insert into a table. I treated a trigger on that table as below. CREATE TRIGGER ON . FOR INSERT AS exec sp_sendSMTPmail 'user@user.com', 'New records are inserted in table_name table', 'Please investigate and take necessary actions.',
5
6954
by: GEL | last post by:
Hi, I want to open a new browser window, let the user use that window for several minutes, and when they close, I'd like to change the page displayed in the original window. According to numerous articles found Googling, this should work, but on my WinXP system, using Firefox and IE, I get nothing (when allowing pop-ups, if pop-ups are disabled, IE reports the window is closed, Firefox gives a JS error on checking the window handle). No...
6
14461
by: AG | last post by:
ASP.NET 2.0 aspx page with a FormView bound to an ObjectDataSource to view, add and edit records. Can anyone point me to a sample of how to retain the user entered control values when an insert fails? In other words, when inserting a new record, user enters data in the controls, but the insert fails. When the page posts back all the controls are empty or at their default values. I would like to retain the user enter values so they can...
4
15018
by: Mark Olbert | last post by:
I am struggling with trying to retrieve the value of an autoincrement identity field after a DetailsView Insert operation. The DetailsView is bound to an SqlDataSource control. So far as I can tell, nowhere in the arguments for either the Inserted event for the DetailsView or the Inserted event for the SqlDataSource control is the value stored. Adding a dummy bound column for the identity field to the DetailsView doesn't work, either. ...
3
2137
by: =?Utf-8?B?Tm9yZW1hYw==?= | last post by:
Hi, We are writing a Web SSO service for all of our websites through Forms Authentication. We also want to provide our websites with the ability to protect different parts of their website and redirect to different registration pages. We are also required to centrally audit authorization failures to a database only the Web SSO people can see. We are using .NET 2.0 but need solutions that will use the same code run on our clients...
5
4227
by: =?Utf-8?B?Sm9obiBBdXN0aW4=?= | last post by:
I want to ensure that the Insert Key state is 'Insert' rather than 'Overwrite' in a particular textbox (or possibly for the whole form). How can I go about this? -- John Austin
1
2058
by: =?Utf-8?B?Sm9uYXRoYW4=?= | last post by:
I have WinXP Pro SP2 and VS2005 SP1. I'm converting my projects from VS2003 to VS2005 and I receive a lot of warnings in several projects. For example, to one of my projects (for example MyProject.vbproj) I receive the following result in the command prompt: Build succeeded: .... .... (a lot of warnings)
5
3466
by: =?Utf-8?B?bXBhaW5l?= | last post by:
Hello, I am completely lost as to why I can't update a DropDownList inside a DetailsView after I perform an insert into an object datasource. I tried to simply it down to the core demostration: default.aspx:
4
2188
by: =?Utf-8?B?RXJpYyBGYWxza2Vu?= | last post by:
We’re storing our main entity in an insert only table which stores the history of past revisions, but we’re facing problems with storing this history as LINQ will only update the entity, and not reinsert it with a different revision number. Compounding the issue, we’ve also got an associated table storing properties for our entities which is not revisioned, but we still want changes to the children of our entity (additions, changes...
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9485
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9958
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8986
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5390
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5523
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4058
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2890
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.