Prevent the CDev from running if NetDiskInit is not present.

This commit is contained in:
Stephen Heumann 2018-08-12 22:44:05 -05:00
parent f3519b3eef
commit 084d44042a
2 changed files with 22 additions and 2 deletions

14
cdev.c
View File

@ -32,7 +32,8 @@
//#define optionsPopUp 6
//#define trianglePic 7
#define mountURLError 3000
#define netDiskMissingError 3000
#define mountURLError 3001
extern void FreeAllCDevMem(void);
@ -91,6 +92,17 @@ void DoHit(long ctlID, CtlRecHndl ctlHandle)
long DoMachine(void)
{
mountURLRec.result = NETDISK_NOT_PRESENT;
mountURLRec.url = "";
SendRequest(MountURL, sendToName|stopAfterOne, (Long)NETDISK_REQUEST_NAME,
(Long)&mountURLRec, NULL);
if (mountURLRec.result == NETDISK_NOT_PRESENT) {
AlertWindow(awResource+awButtonLayout, NULL, netDiskMissingError);
return 0;
}
return 1;
}

View File

@ -260,7 +260,15 @@ resource rTextForLETextBox2 (helpWindow+helpTxt) {
* Error messages
*/
#define mountURLError 3000
#define netDiskMissingError 3000
#define mountURLError 3001
resource rAlertString (netDiskMissingError) {
"62/"
"To use this control panel, you must have NetDiskInit installed "
"in the System:System.Setup folder on the boot disk."
"/^#0\$00"
};
resource rAlertString (mountURLError) {
"32:"