mirror of
https://github.com/sheumann/NetDisk.git
synced 2024-06-01 15:41:29 +00:00
Prevent the CDev from running if NetDiskInit is not present.
This commit is contained in:
parent
f3519b3eef
commit
084d44042a
14
cdev.c
14
cdev.c
|
@ -32,7 +32,8 @@
|
||||||
//#define optionsPopUp 6
|
//#define optionsPopUp 6
|
||||||
//#define trianglePic 7
|
//#define trianglePic 7
|
||||||
|
|
||||||
#define mountURLError 3000
|
#define netDiskMissingError 3000
|
||||||
|
#define mountURLError 3001
|
||||||
|
|
||||||
extern void FreeAllCDevMem(void);
|
extern void FreeAllCDevMem(void);
|
||||||
|
|
||||||
|
@ -91,6 +92,17 @@ void DoHit(long ctlID, CtlRecHndl ctlHandle)
|
||||||
|
|
||||||
long DoMachine(void)
|
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;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
10
cdev.rez
10
cdev.rez
|
@ -260,7 +260,15 @@ resource rTextForLETextBox2 (helpWindow+helpTxt) {
|
||||||
* Error messages
|
* 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) {
|
resource rAlertString (mountURLError) {
|
||||||
"32:"
|
"32:"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user