mdxafx
01-10-2007, 09:22 AM
Hi all, hope the year is going well so far!
I've made a group of discs that have video tutorials on them,
when you insert a disc it is recognised through the setting and
checking of registry keys. The discs option allows the user to
create a short cut link to the cd on the desktop (which copies a small
program to the harddrive and then creates a shortcut to the desktop).
The user double clicks the shortcut it access the cd-rom drives
to see if the disk is in one of the drives set it the Registry!
Problem:-
This all works fine, but i have been trying to add the function that check if there is a CD in the drive first, due to the fact my program does find the drive, asks for the disk, but sometimes get stuck in a loop, because it then calls the .exe on the disc to early.
Q.
So i want to know: how can i check to see if there is a Disc in the drive before executing the program that is on the disc?
I've seen that this can be acheived through calling a DLL function in Kernel32 , "GetVolumeInformation", but is
it there some other way, i m having trouble working out the parameters in
this DLL Call!
Hope someone can help!
:o
I've made a group of discs that have video tutorials on them,
when you insert a disc it is recognised through the setting and
checking of registry keys. The discs option allows the user to
create a short cut link to the cd on the desktop (which copies a small
program to the harddrive and then creates a shortcut to the desktop).
The user double clicks the shortcut it access the cd-rom drives
to see if the disk is in one of the drives set it the Registry!
Problem:-
This all works fine, but i have been trying to add the function that check if there is a CD in the drive first, due to the fact my program does find the drive, asks for the disk, but sometimes get stuck in a loop, because it then calls the .exe on the disc to early.
Q.
So i want to know: how can i check to see if there is a Disc in the drive before executing the program that is on the disc?
I've seen that this can be acheived through calling a DLL function in Kernel32 , "GetVolumeInformation", but is
it there some other way, i m having trouble working out the parameters in
this DLL Call!
Hope someone can help!
:o