22 |
|
|
23 |
|
#include "sysdeps.h" |
24 |
|
#include "util_windows.h" |
25 |
+ |
#include "main.h" |
26 |
|
|
27 |
|
BOOL exists( const char *path ) |
28 |
|
{ |
106 |
|
{ |
107 |
|
TerminateThread(thread, 0); |
108 |
|
} |
109 |
+ |
|
110 |
+ |
|
111 |
+ |
/* |
112 |
+ |
* Check that drivers are installed |
113 |
+ |
*/ |
114 |
+ |
|
115 |
+ |
bool check_drivers(void) |
116 |
+ |
{ |
117 |
+ |
char path[_MAX_PATH]; |
118 |
+ |
GetSystemDirectory(path, sizeof(path)); |
119 |
+ |
strcat(path, "\\drivers\\cdenable.sys"); |
120 |
+ |
|
121 |
+ |
if (exists(path)) { |
122 |
+ |
int32 size = get_file_size(path); |
123 |
+ |
if (size != 6112) { |
124 |
+ |
char str[256]; |
125 |
+ |
sprintf(str, "The CD-ROM driver file \"%s\" is too old or corrupted.", path); |
126 |
+ |
ErrorAlert(str); |
127 |
+ |
return false; |
128 |
+ |
} |
129 |
+ |
} |
130 |
+ |
else { |
131 |
+ |
char str[256]; |
132 |
+ |
sprintf(str, "The CD-ROM driver file \"%s\" is missing.", path); |
133 |
+ |
WarningAlert(str); |
134 |
+ |
} |
135 |
+ |
|
136 |
+ |
return true; |
137 |
+ |
} |