# dev-make command (Windows)

The dev-make BASIC program creates devices
connected to the VME. Devices can be removed with the dev-remov command.

Note: A device cannot be created if the PIB is already in use, the device does not exist, or it is
 opened by another application.

## Syntax

```
 dev-make -t type{-n number} {-a arg{,arg}}
```

## Parameter(s)

| -t type | Device types. |
| --- | --- |
| Serial | Direct serial device. The device number is the PIB number associated to the device. |
| PickRemote | Allows sharing dedicated printers across multiple VMEs. |
| printer | Direct Printer device. The device number is the form queue number associated to the device. |
| Telnet | Telnet port. The device number is the PIB number associated, or nailed, to the Telnet port. |
| SSL | SSL port. The device number is the PIB number associated to the SSL port. |
| tape | Tape device. |
| NTPrinter | Shared Windows Printer process. The device number is the PIB number of the printer process. |
| -n number | Optional device number. The meaning of the device number varies depending on the device type. |
| -a arg {,arg} | Optional device arguments. The meaning of the argument varies depending on the device type. |

## Device Types

The following device types are supported:

**Serial**

Direct serial device. The device number is the PIB
 number associated to the device. If no device number is specified, all devices specified in the
 PIB Configurations tab of the D3 Device Manger are initialized (if they are not
 already).

Note: On Windows, serial devices named \\.\COM1 through \\.\COM9 can be specified
 as COM1 through COM9. Starting at COM10, however, the full name must be used.

The
 device arguments are specified in the following form:

```
 "name, baud, bits, stops, parity{,text 1{,...; text n, ...;}}"
```

| name | Device name. For example: \\.\COM1,\\.\COM2, ...; |
| --- | --- |
| baud | Baud rate in decimal. For example, 9600. |
| bits | Number of bits per characters. |
| stops | Stop bits. For example: 0=1.5; 1, 2 |
| parity | One letter code indicating the parity: n = none; e = even; o = odd |
| text n | Optional text is displayed when the device is initialized. Each comma delimited field is displayed one line at a time. An empty field displays an empty line. Spaces are permitted. |
**PickRemote**

Allows sharing dedicated printers
 across multiple VMEs. The command has this
 form:

```
 dev-make -t PickRemote -n <pib1>-a "<comp.name>, <pib2>, <delay>"
```
where:

| | PIB number of the source machine. |
| --- | --- |
| | Remote VME computer name. |
| | PIB number of the master process on the remote machine. |
| | Connect time-out in milliseconds. |
**printer**

Direct Printer device. The device number
 (required) is the form queue number associated to the device. When a process is assigned to this
 form queue, it spools directly to the Windows printer - bypassing the D3 Spooler.

The
 device arguments are specified in the following form:

```
 "device{,page eject{,options}}"
```

| device | Printer device name (not the printer path) as defined by the Windows Print Manager (for example, HP LaserJet 4L). The printer can be a local or a network printer. Use the name of the printer under a Windows environment. Spaces are permitted. The name to use is the name that displays in the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\ CurrentControlSet\Control\Print\Printers\ | |
| --- | --- | --- |
| page eject | Number of pages to eject after each job. The default is 0. Set this number to 1 for laser printers. | |
| options | s | Suppress leading page eject. For laser printers, it is recommended that the page eject parameter be set to 1 when using this option. |
**Telnet**

Telnet port. The device number is the PIB
 number associated, or nailed, to the Telnet port. This form is used to start nailed clients. The
 PIB number is required. Note that the TCL exit command automatically removes
 a telnet device.

Nailed Clients (Reversed Telnet):The option string
 specifies the server to connect to the optional dev-make arguments.

```
 "c, host{,port{,stack{,stack...;}}}"
```

| c | Designates a Telnet nailed client (case insensitive). |
| --- | --- |
| host | Host name, or decimal dotted address. |
| port | TCP port number. If not specified, the default is Telnet port (23). |
| stack | Optional stacked input. Each comma in the text is replaced by a carriage return and passed to the process as if it had been typed. If the first line starts with a \, it is treated as an argument. This field can be used to automatically log on to the process. |

## Nailed Servers

The option string specifies the TCP port to respond to the optional
 dev-make arguments.

```
 "s, port{,stack{,stack...;}}}"
```

| s | Designates a Telnet nailed server (case insensitive). |
| --- | --- |
| port | TCP port number. If not specified, the default is Telnet port (23). |
| stack | Optional stacked input. Each comma in the text is replaced by a carriage return and passed to the process as if it had been typed. If the first line starts with a \, it is treated as an argument. This field can be used to automatically log on to the process. |

 **SSL**

 The option string specifies the SSL port to respond to the optional
 dev-make arguments.

```
 "s,port{,stack{,stack...;}}}"
```

| s | Designates an SSL server (case insensitive). |
| --- | --- |
| port | TCP port number. |
| stack | Optional stacked input. Each comma in the text is replaced by a carriage return and passed to the process as if it had been typed. If the first line starts with a \, it is treated as an argument. This field can be used to automatically log on to the process. |

 **tape**

 Tape device. The next available device number is automatically allocated when the -n argument
 is not specified. When you specify the device number of the tape device to be changed, the tape
 device is changed in place without any shifting of the tape devices. If there is no tape device
 for the specified tape number, the tape device is added to the end of the tape devices.

 The option string specifies the device characteristics:

```
 "name, type{label} ,density{,blksize{,options}}"
```

| name | The tape device name must match its counterpart in the VME Tape Devices tab of the D3 Device Manger. The default is usually tape0,tape1, and so on. The device name format is \\.\tape0, \\.\tape1, and so on. | |
| --- | --- | --- |
| type{label} | Specifies the device type which can be followed by a size label for compatibility with tapes generated on other platforms, typically a tape made on a D3 licensee's machine. For example: To read a 4mm tape made on a machine with a label size of 80 bytes, create a device with a tape type of d80. Valid device types are: f = floppy q = QIC/SCT d = 4mm/DAT p = pseudo v = 8mm/Video h = half-inch | |
| density | Tape density. This is required for a floppy devices. Valid options are: q = quad (1.44) h = high (1.2) o = octal (2.88) d = standard (360) s = single (180). For other tape devices (non-floppy), density is included for information only, not for functionality. Possible densities are: h = high m = medium l = low s = standard. | |
| blksize | Physical block size. Valid options are: | |
| f | Indicates the tape is written in fixed size physical blocks of 512 bytes. Do not confuse this option with the attached block size. | |
| 0 | Indicates the tape is written in variable size physical blocks. When the block size is set to 0, the physical block size is determined by blocksize parameter specified from the t-att command. | |
| n | Indicates the tape is written in fixed sized physical blocks of n bytes. Do not confuse this option with the attached block size. | |
| options | e | Indicates that the tape requires special End of Tape processing. Use only to read tapes written on non-D3 Windows platforms where the drive wrote a filemark and erased a section of tape, instead of relying on a physical End Of Tape marker. Note: To specify an option, make sure a block size is specified, or use an additional comma as a placeholder (see the example section below). |

 **NTPrinter**

 Shared Windows Printer process. The device number is the PIB number of the printer process.
 All output to that PIB is directed to the associated Windows printer device. This form is used
 to start the D3 Pick serial printer so all the functionality of the traditional D3 Spooler can
 be used.

 The device number and the port number specified in the associated startptr
 command must be identical.

 The option string specifies the printer to use. Note that the page-eject or leading page-eject
 options are then controlled by the startptr command.

 The printer device name is the name of the device as defined by the Windows Print Manager. The
 printer can be a local or a network printer. On Windows, the printer path name should be used.
 For example: \\CDR\\HP-5L

 Note: Appending the printer port with `,wingdiprinter` creates a Windows GDI
 printer. See [Windows printer interface](https://d3codex.com/tcl/windows-printer-interface/) for more information.

 The name to use is the name that displays in the following registry key:
 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\

## Example(s)

**Example 1**

This example illustrates creating three
 D3 tape
 devices:

```

 dev-make -t tape -a "\\.\tape0,d80,h"
 (80-byte label)
 dev-make -t tape -a "\\.\tape0,d50,h"
 (50-byte label)
 dev-make -t tape -a "\\.\tape0,d,h"
 (defaults to 512)
```
**Example 2**

This example illustrates creating a pseudo tape on the
 C:\Temp\MyTape.D3P file. Note that the pseudo tape filename extension does
 not need to be .D3P, but that the full filename, including the extension,
 must be specified in the dev-make
 command.

```

 dev-make - t tape -a "C:\temp\MyTape.D3P,p"
```
**Example 3**

This example illustrates defining a high density quarter-inch device requiring a
 special end of tape processing option. Note the two commas as a placeholder for the unspecified
 block size.

```

 dev-make - t tape -a "\\.\TAPE1,q,h,,e"
```
**Example 4**

The following two commands will start printer number 0, assigned to output queue
 number 2, running on PIB 5, directing all output to printer port "\\CDR\HP-5L". There will be
 one page ejected at the end of each job and s option will inhibit the initial
 page-eject command at the end of the print
 file.

```

 dev-make - t NTPrinter -n 5 -a "\\CDR\HP-5L"
 startptr 0,2,1,s5 (s
```
**Example 5**

This example uses the `PickRemote` device type form to send output
 from computer1 to a printer that has been installed on computer2:

**Computer 1**
```

 dev-make -t PickRemote -n 5 -a "computer2,10,1000"
 startptr 1,1,1,s5 (s
 sp-assign f1
```
All
 output assigned to form queue 1 is directed to the printer `printername`
 installed on the remote machine computer2.

**Computer 2**
```

 dev-make -t NTPrinter -n 10 -a "printername"
 startptr 0,0,1,s10 (s
```
or

```

 dev-make -t Serial -n 10 -a "com2,9600,8,1,n"
 startptr 0,0,1,s10 (s
```
Printer
 0 is started as usual.

## dev-make arguments

The dev-make command allows stacking data to a newly created process as if a
user had typed it in. The comma is a line delimiter and is replaced
by carriage returns.

Valid arguments are:

| \b | Suppresses the break filter. The set-break TCL command and the BreakChar value specified in the D3 Settings tab of the D3 Device Manger are ignored for this process. |
| --- | --- |
| \e | Suppresses the escape filter. The set-esc TCL command and the EscChar value specified in the D3 Settings tab of the D3 Device Manger are ignored for this process. |
| \s | Suppresses all output. There is no way to turn the output back on. |
| \r | Resets the port. Equivalent to an automatic reset-user when the port is started. A \r purges all stacked input (including the command string) and should be the last data in the stack. No other stacked input can be passed if this option is present. |
| \t | Transparent mode. All characters are passed to the application. This is not the default on Telnet for which, in nontransparent mode, NUL characters are stripped and CRLF sequences are folded into one CR. Serial ports are in transparent mode by default. Note that the break should also be disabled by set-break off. Some Telnet clients cannot be used in transparent mode. |

## See also

- [dev-att command](https://d3codex.com/tcl/dev-att-command/)
- [dev-det command](https://d3codex.com/tcl/dev-det-command/)
- [dev-list command](https://d3codex.com/tcl/dev-list-command/)
- [dev-make command (UNIX)](https://d3codex.com/tcl/dev-make-command-unix/)
- [dev-remov command](https://d3codex.com/tcl/dev-remov-command/)

---
Source: https://d3codex.com/tcl/dev-make-command-windows/ - part of the D3Codex reference.
