I stored a file on the CD called CDINFO.FIL that contained two lines (CR/LF text format):
CD Information FileLucky Luke On The Daltons Trail
The signature is the second line to look for and compare with (so it can be reused with different games). dest is where the code should stick the name of the CD drive (looking back the parameters should be const char*, char* - passing a string literal as a second parameter isn''t a good idea). The code that called it was in a tiny executable stub that chained to the main game:
// Keep looping until the CD is inserted or cancel is selected while (!CDInDrive("Lucky Luke On The Daltons Trail", NULL)) { retval = MessageBox(hWnd, LanguageText[TEXT_CDINDRIVE_DIRECTX], LanguageText[TEXT_WARNING], MB_RETRYCANCEL); if (retval == IDCANCEL) exit(-1); }
I''m sorry I can''t provide help beyond that, I have forgone all my PC programming sins in favour of consoles.