Skip to main content
Home Browse Development Detect New Volume Cpp
Detect New Volume Cpp
Detect New Volume Cpp icon

Detect New Volume Cpp

Development · info-mac
Filenamedetect-new-volume-cpp.hqx
Size82.2 KB (84136 bytes)
Downloads2
About
--========================_13948252==_ Content-Type: text/plain; charset="us-ascii" What: Detect a new mounted volume and "double-click" at a document/application (if found) at a "standard" location on that volume What for: telling the user (a student) what's new on some particular volume and/or how to use it. The document "clicked" by the present WatchVol program may be a text document about what's new on the volume. Or it may be any application that somehow prepares the student how to use the (file server) volume, whenever the volume is mounted. Hot points: Dynamic (transient) patch of the system: doesn't require restarting the system, gets uninstalled when the application quits. Contents: WatchVol - Application (watchdog) itself Watch MountVol.pi - project and resource files to build it Watch MountVol.pi.rsrc WatchMount.cc - Source code of the main module (C++) launcher.cc - Launches an application-creator given FSSpec of the document/application MountVol init.pi - project to compile an Init (not INIT!) code resource that patches the system on-the-fly MountVol init.c - Source code of the _MountVol interceptor (assembly inlined into a dummy C program) The source code contains enough (I hope) comments to show what a particular piece of code does, as well as some tricks involved Language: Symantec C/C++ 6.0 and built-in Assembler System: System 7.x, uses AppleEvents. Tested on IIsi, IIci, Quadras and Centres. Patching the system: _MountVol system trap is patched when the application starts up. The patch is removed (i.e., the trap is restored to its original state) when the application quits. How to run: place the application into your "Startup Items" folder; the application quits when it receives a "QUIT" event, or when it's in the foreground and any keyboard key is pressed. Note: the source code uses a "standard" environment, see myenv-notify.cpt For completeness, the library and the .h file are included as a separate CompactPro archive. However, they (complete with the source code) can be found at various archive sites under the name 'myenv-notify' Comments to: [email protected], [email protected] --========================_13948252==_ Content-Type: application/mac-binhex40; name="DetectNewVolume.cpt" Content-Disposition: attachment; filename="DetectNewVolume.cpt"
File Info

This file is from the info-mac archive. It is BinHex encoded — use The Unarchiver to decode it.

MacTrove — a free archive of classic Macintosh software. Files mirrored from ftp.funet.fi/pub/mac (info-mac + funet legacy). All software provided for historical preservation.