home *** CD-ROM | disk | FTP | other *** search
-
- Packetsupport.lib
- -----------------
-
- This is a tiny little link.lib to support synchronus dos packet
- sending. It is intended to be used with Lettuce C V5.04, but it should
- be simple to port it to any less sophisticated tool :^} Source is
- included.
-
- The routines are loosely based on an very old packet doc I found on
- Fish 6? by Carolyn Scheppner.
-
- Use in whatever you want, on your own risk :^D
-
- no © by Oliver Wagner,
- Landsberge 5,
- 4322 Sprockhövel
- West Germany
-
-
- The functions:
-
- sendpacket(struct MsgPort *deviceproc,
- long ACTION_what?,
- long arg1,arg2,...arg7);
-
- Will send a StandardPacket with type ACTION_what? to the device
- process deviceproc (can be obtained by a call to DeviceProc(name))
- with the arg1, arg2 set (you can cut of the number of args) and
- return the dp_Res1 field (or 0 if anything went wrong)
-
-
- getres2()
-
- Will return the dp_Res2 field of last packet send via sendpacket()
-
-
- dosinhibit(char *devicename,
- long what)
-
- Will send the packet ACTION_INHIBIT to the deviceproc of device
- "devicename" (e.g. "DF0:") with dp_Arg1 set to what. Inhibit will
- prevent DOS to access a specified device any longer if what = TRUE.
- If what = FALSE, access will be allowed and DOS will act as if a
- disk has been inserted (can be used to force a DOS diskchange).
-
- Note1: dosinhibit() SHOULD be used before *ANY* low level access to
- a device (e.g. via "trackdisk.device"), otherwise you can severly
- corrupt disk structures...
-
- Note2: "devicename" can also be a volume name or anything like
- that.
-